Re: [gcj] Store Credits

2015-09-05 Thread Luke Pebody
It won't work for the large data set because you have only made an array of
size 100 and you might need an array of size 2000.

On Sat, Sep 5, 2015 at 7:30 AM, yatingarg12  wrote:

> # include 
> using namespace std;
> int main()
> {int n,c,p,a[100],x,y;
> cin>>n;
> for(int i=0;i {cin>>c>>p;
> for(int j=0;j {cin>>a[j];}
> for(int j=0;j for(int k=j+1;k {if(a[j]+a[k]==c){x=j+1;y=k+1; break;}}
> cout<<"Case #"< return 0;
> }
>
> --
> 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 google-code+unsubscr...@googlegroups.com.
> To post to this group, send email to google-code@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/0cc78c96-b7c8-4421-a21c-b2029c4d4fce%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 google-code+unsubscr...@googlegroups.com.
To post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAECKw-Ok9HoNbhb2FArAhZvs88zkAQcXA8FCk%3DgtH3WK7DT6hw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[gcj] Store Credits

2015-09-05 Thread yatingarg12
# include 
using namespace std;
int main()
{int n,c,p,a[100],x,y;
cin>>n;
for(int i=0;i>c>>p;
for(int j=0;j>a[j];}
for(int j=0;j