QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#236332#1286. Ternary String CountingZhangYiDeWA 2ms5868kbC++173.0kb2023-11-03 20:57:292023-11-03 20:57:30

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3852kb

input:

4
1 0
2 0
3 0
5 2
1 3 3
4 5 1

output:

3
9
27
18

result:

ok 4 tokens

Test #2:

score: -100
Wrong Answer
time: 2ms
memory: 5868kb

input:

741
5 3
1 5 3
3 4 2
1 4 3
4 3
2 4 2
1 4 1
2 3 3
10 3
9 10 2
3 6 3
1 9 1
3 4
2 3 2
1 3 2
2 3 3
1 3 3
10 4
6 6 1
9 10 2
4 8 3
4 10 3
6 3
1 4 3
2 4 2
2 2 2
4 3
1 4 1
1 1 2
2 3 1
5 3
4 5 2
4 5 1
1 4 3
9 3
2 3 2
1 9 2
2 4 2
4 3
1 3 3
2 3 2
1 2 3
8 4
5 8 1
4 8 1
3 5 3
1 3 3
9 3
4 5 1
1 5 3
3 8 2
8 3
5 7 2...

output:

90
0
0
0
40176
0
0
0
3990
0
0
2898
2340
198
13230
12150
0
0
0
0
0
0
0
36
0
0
114
6
0
0
420
0
0
0
108
0
3510
0
0
0
0
0
0
0
2916
0
0
0
0
0
4050
0
0
0
0
324
8748
270
0
0
0
0
0
1440
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4824
0
0
324
0
0
4362
0
0
0
0
12
90
0
54
0
0
3150
0
0
0
0
756
0
0
0
0
0
0
5190
0
0
0
0
0
0
0...

result:

wrong answer 5th words differ - expected: '24300', found: '40176'