Search found 122 matches

by Wei-Ming Chen
Mon Apr 03, 2006 2:14 pm
Forum: Volume 110 (11000-11099)
Topic: 11026 - A Grouping Problem
Replies: 28
Views: 18172

I got WA in this problem

How about the output of
4 20
1 1 2 3
3 2
2 4 6
My output is 17 and 0, did they wrong?
By the way,can someone give me some strick inputs? Thanks
by Wei-Ming Chen
Mon Feb 27, 2006 5:37 pm
Forum: Volume 109 (10900-10999)
Topic: 10996 - Go
Replies: 6
Views: 2491

The inputs there are really really strict.
I debug my code all night, and...AC now.
Thanks everyone's help. :lol:
by Wei-Ming Chen
Mon Feb 27, 2006 6:50 am
Forum: Volume 4 (400-499)
Topic: 400 - Unix ls
Replies: 93
Views: 17399

code cut after AC

<note>
if you want to let a run from 0 to b or c
you can't write for(a=0;a<=b,a<=c;a++)
you should write if(b>c) b=c; for(a=0;a<=b;a++)

I did not notice that and got two WAs (ACM 200 , 400)
by Wei-Ming Chen
Mon Feb 27, 2006 6:47 am
Forum: Volume 109 (10900-10999)
Topic: 10996 - Go
Replies: 6
Views: 2491

Sorry, but I can not find where are the inputs.
Can you tell me the web site again?
by Wei-Ming Chen
Sun Feb 26, 2006 5:04 pm
Forum: Volume 109 (10900-10999)
Topic: 10996 - Go
Replies: 6
Views: 2491

10996 - Go

I got WA in this problem
Can someone give me some strict inputs?
thanks....
by Wei-Ming Chen
Sun Feb 26, 2006 10:43 am
Forum: Volume 4 (400-499)
Topic: 400 - Unix ls
Replies: 93
Views: 17399

ACM 400 please help

what is the output of

Code: Select all

16
1
2aaaaaaaaa
3
4
5
6
7
8
9
10
11
12
13
14
15
16
thanks..
I tried this problem all the afternoon and got WA
by Wei-Ming Chen
Sat Feb 25, 2006 10:52 am
Forum: Bugs and suggestions
Topic: 511 - Do You Know the Way to San Jose? - Do nothing AC
Replies: 62
Views: 4970

ACM 200 WA

Hi, I got Wa on 200. But I tried many inputs and outputs. They were all right. Can some help? #include <stdio.h> #include <string.h> bool a[27][27],b[27]; int c[27]; int dfs(int u) { int v,w,x; for(v=1;v<=26;v++) { if((a[u][v]==1 && b[v]==0) && c[v]==0) { b[v]=1; printf("%c",v+64); for(w=1;w<=26;w++...
by Wei-Ming Chen
Sun Feb 19, 2006 11:30 am
Forum: Volume 104 (10400-10499)
Topic: 10424 - Love Calculator
Replies: 137
Views: 39118

10424 WA

I got WA on problem 10424
Here are my method.

1. If scan EOF return 0
2. If line one = line two = 0 print a blank line
3. If line one = 0 or line two = 0 print 0.00%
4. If line one <= line two print 100.00%
5. Else print line two / line one

Can some tell me where is wrong?
by Wei-Ming Chen
Sun Feb 12, 2006 3:16 pm
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 20010

try this:

change your code to

if(a[j][i])
{
cout << a[j][i];
}
by Wei-Ming Chen
Tue Feb 07, 2006 3:35 pm
Forum: Volume 6 (600-699)
Topic: 621 - Secret Research
Replies: 45
Views: 18823

char str[100]; ......

My code was char s [100] also got RTE
But I changed it to char a[10000], it AC :P
by Wei-Ming Chen
Tue Feb 07, 2006 3:31 pm
Forum: Volume 6 (600-699)
Topic: 661 - Blowing Fuses
Replies: 67
Views: 20124

661 WA please help

AC now
by Wei-Ming Chen
Sun Feb 05, 2006 9:51 am
Forum: Volume 5 (500-599)
Topic: 514 - Rails
Replies: 79
Views: 24512

I'm sorry, your code is right. But have one thing to attention: if(permutation[per]==i) { per++; while(permutation[per]==stack[top]) { top--; per++; } } When you do top--; Maybe top will come to 0!! this is why you got WA so you can change the code to if(permutation[per]==i) { per++; while(permutati...
by Wei-Ming Chen
Sun Feb 05, 2006 9:22 am
Forum: Volume 102 (10200-10299)
Topic: 10212 - The Last Non-zero Digit.
Replies: 63
Views: 30846

65 8
2

5564 665
2

4445 2222
4

7895 2144
2

10 10
8

54 0
0

0 0
0

87 5
4

545454 66666
4

78965 78956
6
by Wei-Ming Chen
Sun Feb 05, 2006 9:17 am
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 61116

Maybe you can first run 0 to 10000 and save it
Then only to check how much between a and b
by Wei-Ming Chen
Sun Feb 05, 2006 9:11 am
Forum: Volume 103 (10300-10399)
Topic: 10346 - Peter's Smokes
Replies: 46
Views: 16050

If the input is
31 2

The output might be 61
But your output says 57


Becare of the problem:
31/2=15...1
15/2=7....1
7/2=3....1
3/2=1....1
so your output is 31+15+7+1=57
But there are five 1 left!!

Go to advanced search