QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#71371#4620. If You Can't Beat Them, Join Them!larryzhongAC ✓2624ms22084kbC++171.9kb2023-01-09 21:03:392023-01-09 21:03:40

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2624ms
memory: 22084kb

input:

5
1000
100 200 35
1 2
1 12
1 14
1 15
1 55
1 100
2 3
2 5
2 11
2 23
2 39
2 60
2 79
2 18
3 4
3 7
3 16
3 18
3 31
3 44
3 20
4 6
4 10
4 63
5 8
5 49
5 88
5 22
5 52
6 25
6 89
6 29
6 17
7 17
7 27
7 85
8 9
8 20
8 54
8 42
8 94
9 13
9 80
9 27
10 27
10 47
10 70
10 81
10 74
10 60
11 19
11 84
11 63
12 21
12 50
12 ...

output:

325998728
792
235
509
776469527

result:

ok 5 lines