Search found 185 matches

by htl
Mon Jul 15, 2002 5:41 pm
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8817

I finally got PE... The problem is so trickyyyy!!
by htl
Sun Jul 14, 2002 9:41 am
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8817

This problem really makes me crazy!..><..I've struggled for almost 2 days. And it still get WA.. I followed your suggestions. You can read my code and you'll know what I mean. [c] #include<stdio.h> #include<string.h> void main(void) { int n,x,time,len,y,z,point,len2; double t; char buffer[50],c; str...
by htl
Sun Jul 14, 2002 3:29 am
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8817

My program read your data and replies [quote] 031526 Arrow.town 1526 22 0.38 8.36 0061853279 Australia 853279 3 1.40 4.20 0889256287213 Broad-wood 6287213 122 0.81 98.82 779760 Local 779760 1 0.00 0.00 002832769 Unknown 5 -1.00 0356563 Arrow.town 56563 199 0.38 75.62 088925123 Unknown 6 -1.00 006112...
by htl
Sat Jul 13, 2002 5:59 pm
Forum: Volume 7 (700-799)
Topic: 793 - Network Connections
Replies: 102
Views: 32391

793

I check my code again and again. But it still got RE. I think the number of computers won't be bigger than 10000. Where are the bugs? [c] #include<stdio.h> #include<string.h> void unionfunc(int,int); int find(int); int parent[10000]; void main(void) { int count,x,i,j,n,y,yes,no,temp,rooti,rootj; cha...
by htl
Sat Jul 13, 2002 10:01 am
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8817

I've modified it and get WA. [c] #include<stdio.h> #include<string.h> void main(void) { int n,x,time,len,y,z,point,len2; double t; char buffer[50],c; struct telecom { char num[7],name[26]; double fee; }data[2000]; for(n=0;n<2000;) { scanf("%s",buffer); if(strcmp(buffer,"000000")==0) break; strcpy(da...
by htl
Sat Jul 13, 2002 6:09 am
Forum: Volume 2 (200-299)
Topic: 255 - Correct Move
Replies: 17
Views: 4571

255 - Correct Move

Why does the code get WA? Just position checking... [c] #include<stdio.h> void main(void) { int k,q,m,kx,ky,mx,my,qx,qy; while(scanf("%d %d %d",&k,&q,&m)!=EOF) { if(k==q) { printf("Illegal state\n"); continue; } if(q%8!=m%8 && q/8!=m/8 || m==k || m==q) { printf("Illegal move\n"); continue; } kx=k/8,...
by htl
Sat Jul 13, 2002 1:53 am
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8817

139 - Telephone Tangles

Why does the code get RE? Is the input data over 1000? [c] #include<stdio.h> #include<string.h> void main(void) { int n,x,time,len,y,z,point,len2; double t; char buffer[50],c; struct telecom { char num[7],name[26]; double fee; }data[1000]; for(n=0;;) { scanf("%s",buffer); if(strcmp(buffer,"000000")=...
by htl
Fri Jul 12, 2002 6:11 am
Forum: Volume 1 (100-199)
Topic: 167 - The Sultan's Successors
Replies: 21
Views: 3914

So I have to calculate the solutions instead of list all of them?
by htl
Thu Jul 11, 2002 12:39 pm
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 26901

160

Why does this code alway get WA? I check the code many times and can't find out the bug. [c] #include<stdio.h> #define YES 1 #define NO 0 void main(void) { int prime[25],i,is_prime,x,may_be_prime=5,gap=4,n,ans[25],temp,count; prime[0]=2,prime[1]=3,prime[2]=5; for(x=3;x<25;) { is_prime=YES; gap=6-gap...
by htl
Thu Jul 11, 2002 12:32 pm
Forum: Volume 1 (100-199)
Topic: 167 - The Sultan's Successors
Replies: 21
Views: 3914

I found 12 fundamental solutions. Then I rotate one of them in 4 directions and turn over to rotate it in 4 directions again. Then I got 8*12=96 solutions. Am I right?
by htl
Thu Jul 11, 2002 4:48 am
Forum: Volume 102 (10200-10299)
Topic: 10281 - Average Speed
Replies: 39
Views: 15507

I've fix it and got accepted, thanks.
by htl
Wed Jul 10, 2002 5:21 pm
Forum: Volume 102 (10200-10299)
Topic: 10221 - Satellites
Replies: 34
Views: 13613

Yep, I found that if a>180 my code will give the wrong answer. I've got it AC.
by htl
Wed Jul 10, 2002 12:25 pm
Forum: Volume 1 (100-199)
Topic: 167 - The Sultan's Successors
Replies: 21
Views: 3914

How about this code? It still get WA. [c] #include<stdio.h> void main(void) { int board[8][8],k,x,y,z,ans[8],max; scanf("%d",&k); for(x=0;x<k;x++) { for(y=0;y<8;y++) for(z=0;z<8;z++) scanf("%d",&board[y][z]); ans[0]=board[0][5]+board[1][0]+board[2][4]+board[3][1]+board[4][7]+board[5][2]+board[6][6]+...
by htl
Wed Jul 10, 2002 12:22 pm
Forum: Volume 102 (10200-10299)
Topic: 10281 - Average Speed
Replies: 39
Views: 15507

10281 - Average Speed

Why does this code get WA? [c] #include<stdio.h> #include<string.h> void main(void) { int count,x; long y,nowh,nowm,nows,h,m,s; double dis,speed,t; char time[10],buffer[10]; for(count=1,dis=0,speed=0;scanf("%s",time)!=EOF;count++) { gets(buffer); if(!strlen(buffer) && count==1) { printf("%s 00.00km\...
by htl
Wed Jul 10, 2002 6:47 am
Forum: Volume 102 (10200-10299)
Topic: 10221 - Satellites
Replies: 34
Views: 13613

10221 - Satellites

I get this code WA. I just use cos low to figure out the answer. What's wrong with the code? [c] #include<stdio.h> #include<math.h> #include<string.h> #define PI 3.14159265358979323846 void main(void) { double a,s; char data[4]; while(scanf("%lf %lf %s",&s,&a,data)!=EOF) { if(strcmp(data,"deg")==0) ...

Go to advanced search