Search found 185 matches

by htl
Tue Jul 23, 2002 5:32 pm
Forum: Volume 4 (400-499)
Topic: 422 - Word-Search Wonder
Replies: 18
Views: 6456

Uh...I made an embarrassing mistake... I replaced the '3' with 'n-1' and got accepted.
by htl
Tue Jul 23, 2002 1:48 pm
Forum: Volume 4 (400-499)
Topic: 422 - Word-Search Wonder
Replies: 18
Views: 6456

422

Why does this code get RE? And I don't exactly know that "Words may not ``wrap around'' rows or columns" means. ONLY horizontal and diagonal words proceed from right to left? [c] #include<stdio.h> #include<string.h> #define YES 1 #define NO 0 #define MIN(a,b) ((a)<=(b) ? (a) : (b)) #define ABS(a,b) ...
by htl
Mon Jul 22, 2002 5:53 pm
Forum: Volume 7 (700-799)
Topic: 793 - Network Connections
Replies: 102
Views: 32392

Could someone help me with the code? I really want to know if my code of find&union algo is correct.
by htl
Mon Jul 22, 2002 5:48 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18988

I modified it 3 times and eventually got AC. Although it spent much memory (I declare monkey[][] and table[][] as 1000*1000),I was ranked 21!
by htl
Mon Jul 22, 2002 5:31 pm
Forum: Bugs and suggestions
Topic: 511 - Do You Know the Way to San Jose? - Do nothing AC
Replies: 62
Views: 5498

Could someone help me? I want to know if my code of topology sort algo is correct.
by htl
Sun Jul 21, 2002 5:55 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18988

This is my new code. It still get WA. [c] #include<stdio.h> #include<string.h> #define YES 1 #define NO 0 int table[100][100],row,maxcol,species; char monkey[100][100]; void s(int,int); void output(void); void main(void) { int x,y,exit,len; char buffer[300]; while(1) { row=maxcol=0; exit=YES; while(...
by htl
Sun Jul 21, 2002 1:35 pm
Forum: Volume 2 (200-299)
Topic: 275 - Expanding Fractions
Replies: 47
Views: 22182

275 - Expanding Fractions

Why does this code get WA? [c] #include<stdio.h> #define YES 1 #define NO 0 int gcd(int,int); void main(void) { int x,y,found,z,ans,digit[1200],temp[1200],a,b; while(1) { scanf("%d %d",&a,&b); if(a==0 && b==0) break; x=gcd(a,b); a/=x,b/=x; a=a%b; if(a==0) { printf(".\nThis expansion terminates.\n\n"...
by htl
Sun Jul 21, 2002 12:43 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18988

You mean maybe the species > 100 and I only set the column[] as 1 or 2?
by htl
Sun Jul 21, 2002 8:54 am
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18988

776

Does the code have any bug? I solved the problem like this one all got acceptd.. [c] #include<stdio.h> #include<string.h> #define YES 1 #define NO 0 int table[100][100],row,maxcol,species; char monkey[100][100]; void s(int,int); void output(void); void main(void) { int x,y,exit,len; char buffer[300]...
by htl
Sun Jul 21, 2002 8:51 am
Forum: Volume 1 (100-199)
Topic: 143 - Orchard Trees
Replies: 90
Views: 13645

143

Why does this code get WA? I think my algo isn't wrong. Maybe it's the problem of range of points(1~99?) or precision... [c] #include<stdio.h> #define CHECK(lx1,ly1,lx2,ly2,px,py) ((lx2-lx1)*(py-ly1)-(px-lx1)*(ly2-ly1)) void main(void) { int x,a,b,c,d,y,ans; double p[3][2],left,right,up,down; while(...
by htl
Sun Jul 21, 2002 8:47 am
Forum: Volume 5 (500-599)
Topic: 531 - Compromise
Replies: 73
Views: 26819

531 - Compromise

Why does this code get WA? [c] #include<stdio.h> #include<string.h> void main(void) { int n,x,n1,n2,table[101][101],y,z,ans[101],count,px,py; char text1[101][31],text2[101][31],c; scanf("%d",&n); for(x=0;x<n;x++) { c=getchar(); if(c==EOF) break; for(n1=0;;) { scanf("%s",text1[n1]); if(strcmp(text1[n...
by htl
Sun Jul 21, 2002 4:56 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 26902

I've got accepted. Thanx
by htl
Tue Jul 16, 2002 6:08 pm
Forum: Bugs and suggestions
Topic: 511 - Do You Know the Way to San Jose? - Do nothing AC
Replies: 62
Views: 5498

200

It always get RE. But I don't know what's wrong with my program. Could someone help me? I think the code isn't hard for you read. [c] #include<stdio.h> #include<string.h> #include<stdlib.h> #define YES 1 #define NO 0 void main(void) { int len1,len2,len,x,cost[26][26],in[26],y,stack[26],top,v[26]; ch...
by htl
Tue Jul 16, 2002 6:04 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 45578

101

This problem should be a easy one. But I alway got RE. I rewrite it several times and cannot get AC. Could someone help me? [c] #include<stdio.h> #include<string.h> int block[25][25],top[25],pos[25]; void unload(int); void main(void) { int n,x,a,b,temp[25],count,t,y; char com1[5],com2[5]; scanf("%d"...
by htl
Mon Jul 15, 2002 5:49 pm
Forum: C
Topic: Handling RE
Replies: 1
Views: 2033

Handling RE

I recently have trouble handling the code with RE bug. However I modify the code, it still get RE. Could someone share your experience and method of solving this problem? Thanks!

Go to advanced search