Search found 5 matches

by shamim(aiub)
Tue Nov 04, 2003 1:23 pm
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 40721

116::::HELP!!!!!!

I got WA.But I didn't find any mistake. Plz somebody tell me why did i got WA? [cpp] #include<stdio.h> long m[20][110],a[20][110],path[20][110]; long row,r,c; long min(long i,long j){ long t,s=9999999; t=(i-1+r)%r; if(a[t][j+1]<s){ s=a[t][j+1]; row=t;} if(a [j+1]<=s){ if(a [j+1]<s) row=i; else if(i<...
by shamim(aiub)
Mon Nov 03, 2003 11:25 pm
Forum: Volume 101 (10100-10199)
Topic: 10100 - Longest Match
Replies: 95
Views: 22387

10100::::what will be the output

i got WA.
plz anybody tell me the output for
input:
---------------------------
this is a test
this is is a a test
76.67 67
67 67 76
---------------------------[/img]
by shamim(aiub)
Sun Nov 02, 2003 4:31 pm
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 33752

just reply

i have solved the problem and got AC(without changing "isprime()").
there was some miskate.

to shamim,
should i change my ID?

shamim(aiub)
by shamim(aiub)
Sat Nov 01, 2003 7:00 pm
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 33752

what is wrong

i think my isprime() function is OK.
and
for 6
OUTPUT:6 is not prime(correct)
i couldn't understand that u(Joseph Kurniawan) want to say.
PLZ reply
by shamim(aiub)
Wed Oct 29, 2003 12:29 am
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 33752

10235-Why?.. WA

plz somebody tell me why WA? i didn't find any mistake [cpp] #include<stdio.h> long isprime(long x){ long i=2; while(i*i<=x){ if(x%i==0) return 0; i++; } return 1; } long rev(long x) { long r=0,i=1; if(x<10) return x; r=x; while(r>9){ r=r/10; i*=10; } r=0; while(x>0){ r=r+((x%10)*i); x=x/10; i=i/10;...

Go to advanced search