## Search found 8 matches

Fri Apr 16, 2004 3:48 pm
Forum: Algorithms
Topic: tree matching algorithm
Replies: 3
Views: 3650
Thank you very much
This answer is very useful for me.
Fri Apr 16, 2004 10:18 am
Forum: Algorithms
Topic: tree matching algorithm
Replies: 3
Views: 3650

### tree matching algorithm

I meet a tree matching problem.

Does any one know how to compare whether two trees are the same or not ?
Mon Oct 06, 2003 7:28 am
Forum: Volume 102 (10200-10299)
Topic: 10207 - The Unreal Tournament
Replies: 23
Views: 6668

### 10207 anyone tell me the output ??

0.8 10
1000 1000
800 1000
500 10
800 100
400 400
300 300
200 200
10 3
1001 1001
0 0
1.0 0
thx u
Fri Sep 05, 2003 4:42 am
Forum: Volume 100 (10000-10099)
Topic: 10053 - Envelopes
Replies: 12
Views: 3604
one envelope can appear just one time

my AC program for this input is

Case #1

this is a matching problem but no need to use maximum flow
Fri Aug 15, 2003 11:22 am
Forum: Volume 103 (10300-10399)
Topic: 10341 - Solve It
Replies: 64
Views: 35989
I got wa many times and finally got AC because of the error set too big

WA
#define error 0.00001
...
while(right-left>error)
{
......
}

AC
#define error 0.00000001
....
while(right-left>error)
{
......
}
Wed May 14, 2003 7:56 pm
Forum: Volume 2 (200-299)
Topic: 222 - Budget Travel
Replies: 17
Views: 5724
I got WA many times Finally I got AC You should note : 1.If it is not enough gasoline, you never go to the station. 2.If you don't fill the tank in this station you can't go to the next station. 3.If the station is the destination you can always go there no matter how much gasoline it has. 4.If the ...
Wed Apr 02, 2003 6:10 am
Forum: Volume 103 (10300-10399)
Topic: 10340 - All in All
Replies: 129
Views: 33768
thx
you are right
the cost of strlen() is expensive
Tue Apr 01, 2003 8:17 pm
Forum: Volume 103 (10300-10399)
Topic: 10340 - All in All
Replies: 129
Views: 33768

### 10340 TLE ????? i can't believe it

#include <stdio.h> #include <string.h> int main() { char str1[100000],str2[100000]; int top; int i; while(scanf("%s %s",str1,str2)!=EOF) { top=0; for(i=0;i<=strlen(str2)-1;i++) { :evil: if(str1[top]==str2 ) top++; } if(top>=strlen(str1)-1) printf("Yes\n"); else printf("No\n"); } return 0; }