Search found 3 matches

by b1gm4f14
Fri Apr 17, 2015 8:49 am
Forum: Volume 4 (400-499)
Topic: 416 - LED Test
Replies: 34
Views: 9957

416 - LED Test

checked my output with Udebug..... tried all the possible inputs and outputs.... everything is right although UVA is giving WA.... will u plz check my code? #include<bits/stdc++.h> using namespace std; int led[]={126,48,109,121,51,91,95,112,127,123}; bool chk[10],flag=false; int main() { int Count=0...
by b1gm4f14
Sun Apr 13, 2014 7:21 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79073

10038 why getting WA

#include<stdio.h> #include<math.h> #include<stdlib.h> #include<ctype.h> int main() { int a[3010],b[3010],c[3001],i,j,t,s,k; scanf("%d",&t); for(i=1;i<=t;i++) scanf("%d",&a ); for(i=1;i<t;i++) { s=abs(a[i+1]-a ); b[s]=1; } for(i=1;i<t;i++) { if(b ==0||b >=t) { printf("Not jolly\n"); break; } if(i==t-...
by b1gm4f14
Sat Apr 12, 2014 12:52 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79073

10038 why getting WA

#include<stdio.h> #include<math.h> int main() { int a[3000],b[3000],i,j,t,s; scanf("%d",&t); for(i=1;i<=t;i++) scanf("%d",&a ); for(i=1;i<t;i++) { b =abs(a -a[i+1]); } if(b[1]>b[2]) { for(j=1;j<t-1;j++) { if(b[j]-1!=b[j+1]) { printf("Not jolly\n"); break; } if(j==(t-2)) printf("Jolly\n"); } } if(b[1...

Go to advanced search