Hi bro can i have your number to for further communication. Because I have some doubts
On Tue, Mar 31, 2020, 9:03 PM PAGADALA SAINADTH <[email protected]> wrote: > #include<iostream> > #include <bits/stdc++.h> > #include<set> > #include<algorithm> > using namespace std; > int main(){ > ios::sync_with_stdio(0); > cin.tie(0); > int te; > cin>>te; > for(int i = 1; i <= te; i++){ > int limit; cin>>limit; > int length; cin>>length; > > int primes[length+1]; > int products[length]; > for(int j = 0; j<length; j++){ > cin>>products[j]; > } > for(int j = 0; j<length-1; j++){ > primes[j] = products[j]/(__gcd(products[j], products[j+1])); > } > primes[length-1] = __gcd(products[length-2], products[length-1]); > primes[length] = products[length-1]/__gcd(products[length-2], > products[length-1]); > int dup[length+1]; > copy(primes, primes+length+1, dup); > sort(dup, dup+length+1); > set<int> s(dup, dup+length+1); > int alpha[26]; > copy(s.begin(), s.end(), alpha); > string decode = ""; > for(int j =0; j<=length; j++){ > decode += char(65+distance(alpha,find(alpha, alpha+26, > primes[j]))); > } > cout<<"Case #"<<i<<": "<<decode<<endl; > } > } > > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-code/589fdab6-6c5c-4c53-ae49-0a34cff4857e%40googlegroups.com > <https://groups.google.com/d/msgid/google-code/589fdab6-6c5c-4c53-ae49-0a34cff4857e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/CAJ5A_ojgtOTMzCmtxVmnBKy%2B2d%3DTzZiJt8%3DuB0xur3MOOGEjhw%40mail.gmail.com.
