Search found 5 matches

Sat Oct 25, 2014 7:04 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 75606

Re: 10038 - Jolly Jumpers

why WA?someone help plz......... #include<iostream> #include<cstdio> #include<cstdlib> using namespace std; #define MAX 3002 int main() { int a,b; int A[MAX]; while(cin>>a) { int flag =1; for(int i=1;i<=a;i++) { scanf("%d",&A[i]); } for(int i=1;i<a;i++) { b=abs(A[i]-A[i+1]); { if(b<1 ||b>a-1) { flag...
Sat Oct 25, 2014 6:50 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 75606

Re: 10038 - Jolly Jumpers

why WA?someone help plz...... #include<iostream> #include<cstdio> #include<cstdlib> using namespace std; #define MAX 3002 int main() { int a,b,flag =1; int A[MAX]; while(cin>>a) { for(int i=1;i<=a;i++) { scanf("%d",&A[i]); } for(int i=1;i<a;i++) { b=abs(A[i]-A[i+1]); { if(b<1 ||b>a-1) { flag=0; } } ...
Sat Oct 25, 2014 6:49 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 75606
.
Sat Oct 18, 2014 5:09 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 54639

Re: 10035 - Primary Arithmetic

why wa?checked a lot.someone help plz.... #include<iostream> #include<cstdio> using namespace std; int main() { long long int a,b; while(scanf("%lld %lld\n",&a,&b)) { if(a==0 && b==0) return 0; int m,n; int count=0; int p=0; while(a||b) { m=a%10; n=b%10; a=a/10; b=b/10; if(m+n+p>9) { count++; p=(m+n...
Thu Oct 16, 2014 7:51 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 54639

Re: 10035

why WA? #include<iostream> #include<cstdio> using namespace std; int main() { long long int a,b; freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); while(scanf("%lld %lld\n",&a,&b)) { if(a==0 && b==0) return 0; int m,n; int count=0; int p=0; while(a||b) { m=a%10; n=b%10; a=a/10; b=b/1...