QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#83074#3178. Shattered Cakexiaowuc1AC ✓432ms1872kbC++17332b2023-03-01 05:42:082023-03-01 05:42:19

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 1524kb

input:

4
7
2 3
1 4
1 2
1 2
2 2
2 2
2 1

output:

6

result:

ok single line: '6'

Test #2:

score: 0
Accepted
time: 1ms
memory: 1872kb

input:

5
35
2 1
2 5
1 1
1 3
2 5
1 3
2 3
1 2
1 1
2 1
1 3
1 1
1 2
1 1
2 1
2 3
1 1
1 2
2 3
1 1
2 5
2 1
1 1
1 1
2 5
2 3
2 1
1 2
1 1
1 3
1 2
1 3
2 5
1 1
2 3

output:

25

result:

ok single line: '25'

Test #3:

score: 0
Accepted
time: 1ms
memory: 1572kb

input:

3
18
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1

output:

6

result:

ok single line: '6'

Test #4:

score: 0
Accepted
time: 131ms
memory: 1504kb

input:

500
1292900
1 3
2 5
2 1
1 3
2 3
1 1
2 3
2 5
1 1
1 3
1 2
2 3
1 1
2 1
2 3
2 3
1 2
1 1
1 1
2 5
1 1
2 5
1 2
2 3
2 3
1 1
1 2
1 1
2 1
2 3
2 3
2 1
1 2
1 1
2 3
2 5
2 1
2 5
1 1
1 1
2 1
2 5
1 3
1 2
1 1
1 3
1 1
1 3
1 1
1 2
1 2
1 3
2 3
1 1
2 3
1 3
2 5
2 5
1 2
1 3
2 3
1 1
1 3
1 1
1 1
1 2
1 3
2 5
1 2
2 1
1 1
2 1
...

output:

9235

result:

ok single line: '9235'

Test #5:

score: 0
Accepted
time: 432ms
memory: 1448kb

input:

7345
4421690
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3
2 3
1 1
1 1
2 1
2 5
1 2
1 3...

output:

2150

result:

ok single line: '2150'