At first I got accepted in ZJU judge but still was getting wa in uva.
After a lot of trials and errors finally i got ac with edge variable type as long int . I found that there are some inputs where u = v & w != 0 . I was relaxing edges where u and v are not equal (as i was using a adjacency matrix ...
Search found 14 matches
- Tue Sep 02, 2008 9:55 pm
- Forum: ACM ICPC Archive Board
- Topic: 3985 - Board games
- Replies: 4
- Views: 3533
- Mon Sep 01, 2008 11:54 am
- Forum: ACM ICPC Archive Board
- Topic: 3985 - Board games
- Replies: 4
- Views: 3533
3985 - Board games
I also did the same thing mentioned by andmej and in addition i also resubmitted the solution considering the graph to be undirected but still getting wa. Can anyone who solved this give some sample i/o (and/or tricky)?
- Thu Aug 21, 2008 9:00 am
- Forum: Volume 1 (100-199)
- Topic: 138 - Street Numbers
- Replies: 93
- Views: 21335
Re: problem no 138--help pls
I think its not illegal to disclose the last pair
:
Hope it will help to debug your code and guess the range.

Code: Select all
46611179 65918161
- Mon Jul 21, 2008 6:04 pm
- Forum: Volume 1 (100-199)
- Topic: 121 - Pipe Fitters
- Replies: 36
- Views: 6643
Re: #121 - Pipe Fitters
My AC program generates below outputs for the following intputs:
INPUT:
0.2 128
0.4 128
0.6 128
0.8 128
1 128
1.2 128
1.4 128
1.6 128
1.8 128
2 128
2.2 128
2.4 128
2.6 128
2.8 128
3 128
3.2 128
3.4 128
3.6 128
3.8 128
4 128
4.2 128
4.4 128
4.6 128
4.8 128
5 128
5.2 128
5.4 128
5.6 128
5.8 128
6 ...
INPUT:
0.2 128
0.4 128
0.6 128
0.8 128
1 128
1.2 128
1.4 128
1.6 128
1.8 128
2 128
2.2 128
2.4 128
2.6 128
2.8 128
3 128
3.2 128
3.4 128
3.6 128
3.8 128
4 128
4.2 128
4.4 128
4.6 128
4.8 128
5 128
5.2 128
5.4 128
5.6 128
5.8 128
6 ...
- Tue Jul 01, 2008 6:00 am
- Forum: Volume 114 (11400-11499)
- Topic: 11460 - Balance
- Replies: 9
- Views: 2529
Re: 11460 - Balance
Can there be any inputs like below?
The problem description doesn't clarify this...
Input:
The problem description doesn't clarify this...
Input:
Code: Select all
2
5
-3 2
0 -1
3 2
3 -2
-3 -2
6
-3 2
-1 0
1 0
3 2
3 -2
-3 -2
- Mon Jun 30, 2008 3:46 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11460 - Balance
- Replies: 9
- Views: 2529
11460 - Balance
I'm getting wa.
For the below Inputs my code generates following outputs.
Input: 15
5
0 3
4 1
3 -1
-3 -1
-4 1
5
-3 -1
3 -1
4 1
0 3
-4 1
8
0 0
0 1
2 3
4 1
4 -3
2 -3
2 -1
0 -1
7
0 1
0 -1
2 -1
2 -3
4 -3
4 1
2 3
7
0 1
2 3
4 1
4 -3
2 -3
2 -1
0 -1
7
0 -1
2 -1
2 -3
4 -3
4 1
2 3
0 1
7
4 -3
4 1
2 3
0 1
0 ...
For the below Inputs my code generates following outputs.
Input: 15
5
0 3
4 1
3 -1
-3 -1
-4 1
5
-3 -1
3 -1
4 1
0 3
-4 1
8
0 0
0 1
2 3
4 1
4 -3
2 -3
2 -1
0 -1
7
0 1
0 -1
2 -1
2 -3
4 -3
4 1
2 3
7
0 1
2 3
4 1
4 -3
2 -3
2 -1
0 -1
7
0 -1
2 -1
2 -3
4 -3
4 1
2 3
0 1
7
4 -3
4 1
2 3
0 1
0 ...
- Mon Jun 23, 2008 4:10 pm
- Forum: Volume 9 (900-999)
- Topic: 993 - Product of digits
- Replies: 19
- Views: 16404
993 - Product of digits
Followings are some inputs/outputs generated by my AC code:
Input:
Output:
Input:
Code: Select all
17
10
123456789
216
1999
1000000000
888888888
12
24
32
48
17
34
22
288
96
1
0
Code: Select all
25
-1
389
-1
555555555888
-1
26
38
48
68
-1
-1
-1
489
268
1
10
- Sat Jun 21, 2008 6:53 pm
- Forum: Volume 4 (400-499)
- Topic: 416 - LED Test
- Replies: 34
- Views: 15157
416 - LED Test
Thanks for the discussion.
My mindset took this problem like a count down timer and i was thinking that it will count from say, 4 3 2 1 0 9 8 7 ... But i got ac now after considering there is not wrapping around . I wasn't careful at the statement " N, with value greater than zero (0) and less than ...
My mindset took this problem like a count down timer and i was thinking that it will count from say, 4 3 2 1 0 9 8 7 ... But i got ac now after considering there is not wrapping around . I wasn't careful at the statement " N, with value greater than zero (0) and less than ...
- Sat May 31, 2008 8:26 pm
- Forum: Volume 5 (500-599)
- Topic: 538 - Balancing Bank Accounts
- Replies: 18
- Views: 10677
Re: 538 please help
following input/output may help (generated by my AC program using greedy algo):
Input
2 1
Donald
Dagobert
Donald Dagobert 15
4 4
John
Mary
Cindy
Arnold
John Mary 100
John Cindy 200
Cindy Mary 40
Cindy Arnold 150
2 2
A
B
A B 10
B A 10
5 6
A
B
C
D
E
A B 50
B C 10
D E 20
E A 5
A D 20
D B 15
0 0 ...
Input
2 1
Donald
Dagobert
Donald Dagobert 15
4 4
John
Mary
Cindy
Arnold
John Mary 100
John Cindy 200
Cindy Mary 40
Cindy Arnold 150
2 2
A
B
A B 10
B A 10
5 6
A
B
C
D
E
A B 50
B C 10
D E 20
E A 5
A D 20
D B 15
0 0 ...
- Sat May 31, 2008 8:13 pm
- Forum: Volume 5 (500-599)
- Topic: 538 - Balancing Bank Accounts
- Replies: 18
- Views: 10677
Re: 538 - Balancing Bank Accounts
Yes,
Greedy seems enough to comply with "Your solution must consist of at most n-1 transactions."
I also got AC with greedy to compute the transactions.
Greedy seems enough to comply with "Your solution must consist of at most n-1 transactions."
I also got AC with greedy to compute the transactions.
- Sat May 31, 2008 4:08 pm
- Forum: Volume 4 (400-499)
- Topic: 444 - Encoder and Decoder
- Replies: 155
- Views: 44584
Re: Why #444 WA?
Following considerations may help to avoid WA for this problem.
1. Consider the array size at least to hold 80 * 3(if the ASCII is >= 100) + 1(Null char)= 2401 characters.
2. Consider the reverse of 100 (for d) as 001 and same for others ending with 0.
3. Consider that there may be empty line in ...
1. Consider the array size at least to hold 80 * 3(if the ASCII is >= 100) + 1(Null char)= 2401 characters.
2. Consider the reverse of 100 (for d) as 001 and same for others ending with 0.
3. Consider that there may be empty line in ...
- Tue May 06, 2008 11:11 am
- Forum: Volume 102 (10200-10299)
- Topic: 10246 - Asterix and Obelix
- Replies: 29
- Views: 14685
Re: 10246 - Asterix and Obelix
My code is below. Always getting WA. The code may seem hasty. Please somebody help me to point out the error. Please help.
Code: Select all
deleted
- Mon May 05, 2008 4:10 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10246 - Asterix and Obelix
- Replies: 29
- Views: 14685
Re: 10246 - Asterix and Obelix
Hi,
I've checked with many sets of inputs from file and it works perfectly but getting WA from OJ. Could there be any tricky input which i might be missing?
I've checked with many sets of inputs from file and it works perfectly but getting WA from OJ. Could there be any tricky input which i might be missing?
- Wed Apr 30, 2008 12:50 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10215 - The Largest/Smallest Box ...
- Replies: 55
- Views: 38455
Re: 10215 - The Largest/Smallest Box...
Hi Jan,
Don't know whether you'll notice this post on this old fat issue. This is my first posting in this forum. Thanks a million for your info on eps without which i possibly could never get the problem accepted.
Don't know whether you'll notice this post on this old fat issue. This is my first posting in this forum. Thanks a million for your info on eps without which i possibly could never get the problem accepted.