Search found 22 matches

by Waddle
Wed Jul 18, 2007 4:59 pm
Forum: Volume 103 (10300-10399)
Topic: 10340 - All in All
Replies: 129
Views: 31670

I got WA....= =

#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char s[100000], t[100000]; long int m, n, i, j, D=0; while( scanf("%s %s",&s,&t) == 2 ) { m = strlen(s); n = strlen(t); D = 0; i = 0; for(j=0;j<m;j++) { while(i < n) { if(s[j] == t[i]) { s[j] = '*'; break; } else i++; } } for(j=...
by Waddle
Wed Jun 20, 2007 12:47 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 78630

Oh~I got it.
Thank you!!!
by Waddle
Wed Jun 06, 2007 5:58 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 78630

[quote="sohel"][quote="Waddle"]why the third case " 10 1 2 3 4 5 6 7 8 9 10" Not jolly ?[/quote]

What makes you think [10 1 2 3 4 5 6 7 8 9 10] is Jolly?[/quote]
10-9=1
9-8=1
8-7=1
7-6=1
6-5=1
5-4=1
4-3=1
3-2=1
2-1=1
1 <= All of them <= n-1 = 9
by Waddle
Wed Jun 06, 2007 2:51 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 78630

why the third case " 10 1 2 3 4 5 6 7 8 9 10" Not jolly ?[/quote]
by Waddle
Wed Jun 06, 2007 2:51 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 78630

[quote="chunyi81"]My AC program has a slightly different output than the one above. My AC program outputs: [code] Jolly Not jolly Not jolly Jolly Jolly Not jolly Jolly Jolly Jolly Not jolly Not jolly Jolly Jolly Not jolly Jolly Not jolly Jolly [/code] As for which one is correct, it all comes down t...
by Waddle
Wed Jun 06, 2007 10:50 am
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 13118

Where do I go wrong?

[code]#include <string.h> #include <stdio.h> #include <stdlib.h> int lcs( int[], int[]); int len[101][101]; int lenth ,n_1, n_2, i, j; int main() { int str1[101] ; int str2[101] ; int p = 0; while(1) { p++; scanf("%d %d",&n_1,&n_2); if(n_1 == 0 && n_2 == 0) break; for(i=0;i<n_1;i++) scanf("%d",&str1...
by Waddle
Fri Jun 01, 2007 5:18 pm
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 13118

Case.....I need more cases!!!

Give me more cases.
I need more cases. \=皿=/
by Waddle
Sat Apr 07, 2007 2:55 pm
Forum: Volume 100 (10000-10099)
Topic: 10071 - Back to High School Physics
Replies: 49
Views: 7523

does the output always be positive
by Waddle
Thu Mar 01, 2007 1:20 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30399

I GOT AC~~~
thanks everybody~
by Waddle
Tue Feb 27, 2007 6:22 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30399

I still got PE
I almost gave up.
I think i have a blank line at the end of the last triangle.
Did you see my output ?

The Last:
1\n
22\n
333\n
22\n
1\n
\n --->you mean this,right?

Thank you.
by Waddle
Thu Feb 22, 2007 5:06 am
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30399

Like this?

\n
1\n
22\n
333\n
22\n
1\n
\n
by Waddle
Sun Feb 18, 2007 5:24 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30399

MY INPUT:
2

3
2

4
3


MY OUTPUT:
1\n
22\n
333\n
22\n
1\n
\n
1\n
22\n
333\n
22\n
1\n
\n
1\n
22\n
333\n
4444\n
333\n
22\n
1\n
\n
1\n
22\n
333\n
4444\n
333\n
22\n
1\n
\n
1\n
22\n
333\n
4444\n
333\n
22\n
1\n
\n
by Waddle
Thu Feb 15, 2007 4:05 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30399

I'm sorry that I can only understand C.
But I thought getting a PE has no concern with thread.
by Waddle
Thu Feb 15, 2007 11:38 am
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30399

488 Why PE

The code has been removed.
by Waddle
Mon Feb 12, 2007 8:32 am
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 21752

#include <stdio.h> #include <string.h> #include <ctype.h> int main() { int i,n,m; char sl[40]; while(gets(sl)) { n=0; i=0; if(isalpha(sl[0]) != 0) i++; while(sl[n] != '\0') { if(isalpha(sl[n+1]) != 0 && sl[n] == ' ') i++ ; if(n != 0 && isalpha(sl[n]) != 0 && isalpha(sl[n-1]) == 0) i++; n++; } printf...

Go to advanced search