Disclaimer: haven't read the problem nor your code. You need to download the input and run your solution to create the output file, then you only upload the output file. That file is expected to start with 'Case #1' per the problem statement.
In live contests, there'll be another box For you to upload the code, along the output file (you always run the program on your own). https://code.google.com/codejam/quickstart.html On Mar 23, 2016 6:13 AM, "Amir Mallick" <[email protected]> wrote: > #include <iostream> > > using namespace std; > > int main() > { int t; > cin>>t; > int out=0; > while(t--) > { > > int a[100000]; > int h[100005]={0}; > int c[100005]={0}; > int i,j,k,n; > //cout<<"enter the sum"<<endl; > cin>>k; > // cout<<"enter the no of elemeents"<<endl; > cin>>n; > j=1; > //cout<<"enter the elements"<<endl; > for(i=0;i<n;i++) > { > cin>>a[i]; > > } > for(i=0;i<n;i++) > { > if((h[a[i]])==0) > { > //cout<<"y"<<endl; > //h[a[i]]=a[i]; > h[a[i]]=a[i]; > c[a[i]]=j; > j++; > if(h[a[i]]==k-h[k-a[i]] && k-a[i]!=a[i] && h[k-a[i]]!=0) > > { > out++; > cout<<"Case #"<<out<<": "<<c[k-a[i]]<<" "<<i+1<<endl; > //"Case #x: " > > > > break; > > } > } > else > { > //cout<<"NO"<<endl; > if(h[a[i]]==k-h[k-a[i]]) > > { > out++; > cout<<"Case #"<<out<<": "<<c[k-a[i]]<<" "<<i+1<<endl; > > break; > > } > } > > } > > > } > > > } > > > > I don't understand the problem with my code.Can You help in sorting out > the solution with the following code. > The error says :Submission for input A-small Rejected: Your output should > start with 'Case #1: > > -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-code/e2c0ad60-8fed-4c50-b0da-e5c4ebe3fd87%40googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/CANxkOGYjXOLi%2B%2BcUhRiHj9Z5DFTGz3cncp5JZCu32gxcY2GiGQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
