12700 - Banglawash
Moderator: Board moderators
12700 - Banglawash
I am getting WA in 12700 - Banglawash. Problem Link: http://uva.onlinejudge.org/external/127/12700.html
Please help me to find any bug. Any critical Test Case would be appreciated.
Here is my code
removed after AC
Please help me to find any bug. Any critical Test Case would be appreciated.
Here is my code
removed after AC
Last edited by moudud99 on Fri Jul 25, 2014 8:38 am, edited 1 time in total.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 12700 - Banglawash
Look at the first post in this thread.
Check input and AC output for thousands of problems on uDebug!
Re: 12700 - Banglawash
3
3
BTW
Case 1: DRAW 1 1
3
BTA
Case 2: BANGLADESH 1 - 0
3
TTA
Case 3: DRAW 0 2

Re: 12700 - Banglawash
My code passed all cases here and on the problem but still getting WA.

Code: Select all
Pretest Passed :D
Last edited by moudud99 on Fri Jul 25, 2014 8:38 am, edited 1 time in total.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 12700 - Banglawash
Try running your code on the sample input.
Check input and AC output for thousands of problems on uDebug!
-
- New poster
- Posts: 12
- Joined: Sun Jul 07, 2013 7:32 pm
Re: 12700 - Banglawash
The sample output in the UVA page is quite misleading, make sure that you put newline '\n' on each test case. I screwed up quite a few times before getting AC. (I hope judge should REALLY fix this.)
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 12700 - Banglawash
http://uva.onlinejudge.org/external/127/12700.pdf is missing the newlines in the sample output.
The correct problem statement is at: http://uva.onlinejudge.org/contests/327 ... 12700.html and http://uva.onlinejudge.org/contests/327 ... /12700.pdf
The correct problem statement is at: http://uva.onlinejudge.org/contests/327 ... 12700.html and http://uva.onlinejudge.org/contests/327 ... /12700.pdf
Check input and AC output for thousands of problems on uDebug!
-
- New poster
- Posts: 32
- Joined: Tue Jul 22, 2014 1:17 am
12700 - Banglawash

Last edited by ehsanulbigboss on Thu Feb 05, 2015 10:04 pm, edited 1 time in total.
-
- New poster
- Posts: 32
- Joined: Tue Jul 22, 2014 1:17 am
12700 - Banglawash
Got AC!
Code: Select all
Used sting for taking input instead of char!
Last edited by ehsanulbigboss on Sun Nov 23, 2014 12:19 am, edited 3 times in total.
Re: 12700 - Banglawash
Don't double post. It is difficult to understand your code.
Code: Select all
Post your code in code tags.
A person who sees the good in things has good thoughts. And he who has good thoughts receives pleasure from life... Bediuzzaman
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 12700 - Banglawash
Next time post in the existing thread.
Input:AC output:
Input:
Code: Select all
100
4
TBWT
2
TT
4
AATT
10
ATBWABWWBB
5
WTTTA
4
ATBT
7
WBWWWWT
1
W
7
ATWWATA
7
TWABWWA
2
AB
10
TTBBBBWBTT
10
AWBWAWWWWB
6
WAWWAA
8
TBBABTWW
6
BBABTA
4
BAAA
9
BWTTTTABA
10
ATBAWTWATT
2
WT
1
A
7
TAATAAT
10
ABBTABBTBA
6
AAAATW
10
TATWAWBTBB
5
BTWWA
1
A
10
TAAABTATAA
10
BAWTBAWTTB
8
TWTAATAT
3
AAT
9
BWAWTATWB
4
BAWT
9
BATATAATB
10
AWBTBTTWBT
10
BWTBWTWWAB
7
TABBWWB
5
ATAWA
1
A
5
ATAWW
2
BW
7
TATTWBT
8
AAAWTBBT
4
WBBW
8
TWWTABBA
10
BBABWATBBT
8
BBAABATW
5
ATATB
7
ABBTBAA
6
BTWBWW
4
TATT
5
TTWTB
3
WWA
8
TBBWBAWB
1
A
5
BBBTW
9
BTBTTWBAW
9
WABATAWAB
1
T
5
WWTAT
9
ATABTAABB
8
WWBBBAWA
5
TAWBW
1
A
10
WTBAWBBWTW
10
ATBTBTTBTA
3
BAW
6
WBTWTB
3
TTA
2
WW
1
W
7
ATTWATW
3
WWB
1
B
9
TTBTBWTAT
8
AWBBWTBA
5
WWAAW
8
WTTBTTWW
2
BW
2
AW
3
ATW
4
WWTW
8
BTTAWTBB
4
WATT
3
ABW
9
WAAWWABBT
4
TBWW
6
BWBBAT
4
TTTB
1
W
1
T
5
ABWWW
4
BWTW
2
WT
3
TAW
7
BWBTBAB
7
ABTTWAT
1
W
1
A
4
WTTB
Code: Select all
Case 1: DRAW 1 2
Case 2: DRAW 0 2
Case 3: DRAW 0 2
Case 4: BANGLADESH 4 - 3
Case 5: WWW 1 - 0
Case 6: BANGLADESH 1 - 0
Case 7: WWW 5 - 1
Case 8: WHITEWASH
Case 9: WWW 2 - 0
Case 10: WWW 3 - 1
Case 11: BANGLAWASH
Case 12: BANGLADESH 5 - 1
Case 13: WWW 6 - 2
Case 14: WHITEWASH
Case 15: BANGLADESH 3 - 2
Case 16: BANGLADESH 3 - 0
Case 17: BANGLAWASH
Case 18: BANGLADESH 2 - 1
Case 19: WWW 2 - 1
Case 20: WWW 1 - 0
Case 21: ABANDONED
Case 22: DRAW 0 3
Case 23: BANGLADESH 5 - 0
Case 24: WWW 1 - 0
Case 25: BANGLADESH 3 - 2
Case 26: WWW 2 - 1
Case 27: ABANDONED
Case 28: BANGLADESH 1 - 0
Case 29: BANGLADESH 3 - 2
Case 30: WWW 1 - 0
Case 31: DRAW 0 1
Case 32: WWW 3 - 2
Case 33: DRAW 1 1
Case 34: BANGLADESH 2 - 0
Case 35: BANGLADESH 3 - 2
Case 36: WWW 4 - 3
Case 37: BANGLADESH 3 - 2
Case 38: WWW 1 - 0
Case 39: ABANDONED
Case 40: WWW 2 - 0
Case 41: DRAW 1 0
Case 42: DRAW 1 4
Case 43: BANGLADESH 2 - 1
Case 44: DRAW 2 0
Case 45: DRAW 2 2
Case 46: BANGLADESH 5 - 1
Case 47: BANGLADESH 3 - 1
Case 48: BANGLADESH 1 - 0
Case 49: BANGLADESH 3 - 0
Case 50: WWW 3 - 2
Case 51: DRAW 0 3
Case 52: DRAW 1 3
Case 53: WHITEWASH
Case 54: BANGLADESH 4 - 2
Case 55: ABANDONED
Case 56: BANGLADESH 3 - 1
Case 57: BANGLADESH 3 - 2
Case 58: DRAW 2 1
Case 59: DRAW 0 1
Case 60: WWW 2 - 0
Case 61: BANGLADESH 3 - 0
Case 62: DRAW 3 0
Case 63: WWW 2 - 1
Case 64: ABANDONED
Case 65: WWW 4 - 3
Case 66: BANGLADESH 3 - 0
Case 67: DRAW 1 0
Case 68: DRAW 2 2
Case 69: DRAW 0 2
Case 70: WHITEWASH
Case 71: WHITEWASH
Case 72: WWW 2 - 0
Case 73: WWW 2 - 1
Case 74: BANGLAWASH
Case 75: BANGLADESH 2 - 1
Case 76: BANGLADESH 3 - 2
Case 77: WHITEWASH
Case 78: WWW 3 - 1
Case 79: DRAW 1 0
Case 80: WHITEWASH
Case 81: WWW 1 - 0
Case 82: WWW 3 - 0
Case 83: BANGLADESH 3 - 1
Case 84: WWW 1 - 0
Case 85: DRAW 1 0
Case 86: WWW 3 - 2
Case 87: WWW 2 - 1
Case 88: BANGLADESH 3 - 1
Case 89: BANGLADESH 1 - 0
Case 90: WHITEWASH
Case 91: DRAW 0 1
Case 92: WWW 3 - 1
Case 93: WWW 2 - 1
Case 94: WWW 1 - 0
Case 95: WWW 1 - 0
Case 96: BANGLADESH 4 - 1
Case 97: DRAW 1 3
Case 98: WHITEWASH
Case 99: ABANDONED
Case 100: DRAW 1 2
Check input and AC output for thousands of problems on uDebug!
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 12700 - Banglawash
Next time make a new post so it is more clear that you have updated your code.
I got AC by changing your input parsing to read the results of the matches as a string.
I got AC by changing your input parsing to read the results of the matches as a string.
Check input and AC output for thousands of problems on uDebug!