Search found 14 matches

by battirunner
Fri Jan 09, 2015 11:08 am
Forum: Volume 116 (11600-11699)
Topic: 11600 - Masud Rana
Replies: 3
Views: 1166

Re: 11600 - Masud Rana

but how in this problem ? If you please explain just 2 sample input & output of the question ,, thanks in advance...
by battirunner
Tue Jan 06, 2015 10:25 am
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 16245

Re: 10018 - Reverse and Add

Getting Compile error in ANSI C.... which can be the problem ? anyone help plzzz.... #include<stdio.h> #include<string.h> #include<stdlib.h> int main() { int itaration,test; unsigned int number1,number2; char num1[50],num2[50]; scanf("%d",&test); getchar(); while(test--) { gets(num1); itaration=0; w...
by battirunner
Fri Dec 26, 2014 8:04 pm
Forum: Volume 3 (300-399)
Topic: 341 - Non-Stop Travel
Replies: 38
Views: 10900

Re: 341 Non-Stop Travel

oulongbin wrote:Hi,i used the "Dijkstra" to solve this problem,but got WA.i don't know why i was wrong,can somebody give me some special case??thank you .

Code: Select all

got AC..... was a bit of tricky input
 

by battirunner
Thu Dec 25, 2014 1:55 pm
Forum: Volume 116 (11600-11699)
Topic: 11600 - Masud Rana
Replies: 3
Views: 1166

Re: 11600 - Masud Rana

i don't get the sample input output of this problem.... why the day is represented in fraction ? it'll be very helpful if anyone just enlighten it
by battirunner
Fri Dec 19, 2014 4:54 pm
Forum: Volume 3 (300-399)
Topic: 341 - Non-Stop Travel
Replies: 38
Views: 10900

Re: 341 - Non-Stop Travel

Got AC....
by battirunner
Thu Oct 09, 2014 5:47 pm
Forum: Volume 2 (200-299)
Topic: 280 - Vertex
Replies: 95
Views: 21008

Re: 280 - Vertex

why WA ? please help #include<stdio.h> int main() { //freopen("input.txt","r",stdin); int a[103][103],b,c,d[103],n,m,i,j,k,initial,enq,u,l; while(1) { scanf("%d",&n); if(n==0) { break; } for(i=1; i<=n; i++) { for(j=1; j<=n; j++) { a[i][j]=0; } } int color[103]={0},enque[102]={0}; while(1) { scanf("%...
by battirunner
Tue Sep 09, 2014 7:15 am
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 18493

Re: 490 - Rotating Sentences

how could it be extra space, i have checked it in uDebug, it provide the same answer, also with the critical input of uDebug, that was same too. It is said to print the sentence same to same including spaces just by rotate it. So i can't figure out the problem
by battirunner
Tue Sep 09, 2014 7:02 am
Forum: Volume 125 (12500-12599)
Topic: 12541 - Birthdates
Replies: 3
Views: 940

Re: 12541 - Birthdates

battirunner wrote:

Code: Select all

Thanks brainfry
by battirunner
Mon Sep 08, 2014 8:52 pm
Forum: Volume 125 (12500-12599)
Topic: 12541 - Birthdates
Replies: 3
Views: 940

Re: 12541 - Birthdates

why WA ? #include<stdio.h> #include<string.h> int main() { int test,d,m,y,day,mn,mx,t; char name[20],older[20],younger[20]; scanf("%d",&test); t=test; while(test--) { scanf("%s",name); scanf("%d%d%d",&d,&m,&y); day=d+(31*m)+(y*12*31); if(test==t-1) { mn=day; mx=day; strcpy(older,name); strcpy(young...
by battirunner
Wed Sep 03, 2014 6:32 pm
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 18493

Re: 490 - Rotating Sentences

why getting WA, checked with critical input in uDebug, please help, thanks in advance #include<stdio.h> #include<string.h> int main() { char a[125][125]; int i=0,j,k=0,x=0,maxi=0; //freopen("in.txt","r",stdin); for(i = 0; i < 125;i++) { for(j = 0; j < 125;j++) a [j] = ' '; } i=0; while(gets(a )) { x...
by battirunner
Wed Sep 03, 2014 6:24 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 54648

Re: 10035 - Primary Arithmetic

what a childish calculation mistake..........
thanks a lot
by battirunner
Sun Aug 31, 2014 11:40 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 54648

Re: 10035 - Primary Arithmetic

why WA, checked a lot,,,, pleas help. #include<stdio.h> #include<string.h> int main() { char a[14],b[14]; int c=0,i,l,carry=0; while(1) { scanf("%s%s",a,b); if(a[0]=='0'&&b[0]=='0') break; i=strlen(a); l=strlen(b); i--; l--; while(i>=0&&l>=0) { if(((a +b[l])+carry-96)>9) { c++; carry=1; } else carry...
by battirunner
Sun Aug 31, 2014 5:16 am
Forum: Volume 115 (11500-11599)
Topic: 11579 - Triangle Trouble
Replies: 20
Views: 9748

Re: 11579 - Triangle Trouble

I tried out every possible input, still getting WA. need help for some critical input.. thanks in advance....
by battirunner
Sun Aug 24, 2014 1:05 am
Forum: Volume 109 (10900-10999)
Topic: 10948 - The primary problem
Replies: 27
Views: 17634

Re: 10948 - The primary problem

i have test for all kind of possible case but still getting WA. need some help with tricky test case here is my code #include<stdio.h> #include<cstdio> int p=0; int prm[136]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,16...

Go to advanced search