QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#495549#9134. Building a Fenceucup-team253#TL 289ms3896kbC++234.3kb2024-07-27 21:47:552024-07-27 21:47:55

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

7
7 9 4
1 1 2
1 1 4
4 6 2
3 3 5
10 6 4
1 11 5

output:

8
2
4
10
4
8
5

result:

ok 7 numbers

Test #2:

score: 0
Accepted
time: 289ms
memory: 3896kb

input:

8000
1 1 1
1 1 2
1 1 3
1 1 4
1 1 5
1 1 6
1 1 7
1 1 8
1 1 9
1 1 10
1 1 11
1 1 12
1 1 13
1 1 14
1 1 15
1 1 16
1 1 17
1 1 18
1 1 19
1 1 20
1 2 1
1 2 2
1 2 3
1 2 4
1 2 5
1 2 6
1 2 7
1 2 8
1 2 9
1 2 10
1 2 11
1 2 12
1 2 13
1 2 14
1 2 15
1 2 16
1 2 17
1 2 18
1 2 19
1 2 20
1 3 1
1 3 2
1 3 3
1 3 4
1 3 5
1 3...

output:

4
2
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
6
3
2
3
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
8
4
4
2
4
3
4
4
4
4
4
4
4
4
4
4
4
4
4
4
10
5
4
4
2
4
4
3
4
4
4
4
4
4
4
4
4
4
4
4
12
6
4
3
4
2
4
4
4
3
4
4
4
4
4
4
4
4
4
4
14
7
5
4
4
4
2
4
4
4
4
3
4
4
4
4
4
4
4
4
16
8
6
4
4
4
4
2
4
4
4
4
4
3
4
4
4
4
4
4
18
9
6
5
4
3
4
4...

result:

ok 8000 numbers

Test #3:

score: 0
Accepted
time: 170ms
memory: 3508kb

input:

8000
21 21 21
21 21 22
21 21 23
21 21 24
21 21 25
21 21 26
21 21 27
21 21 28
21 21 29
21 21 30
21 21 31
21 21 32
21 21 33
21 21 34
21 21 35
21 21 36
21 21 37
21 21 38
21 21 39
21 21 40
21 22 21
21 22 22
21 22 23
21 22 24
21 22 25
21 22 26
21 22 27
21 22 28
21 22 29
21 22 30
21 22 31
21 22 32
21 22 3...

output:

4
4
4
4
4
4
4
3
4
4
4
4
4
4
4
4
4
4
4
4
5
4
4
4
4
4
4
4
4
4
4
3
4
4
4
4
4
4
4
4
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
4
4
4
4
4
4
4
3
4
4
3
4
4
4
4
4
4
4
5
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
5
4
4
4
4
4
4
4
4
4
4
3
4
4
4
4
4
4
5
5
5
4
4
4
4
4
4
4
4
3
4
4
4
4
4
4
4
4
5
5
5
5
4
4
4
4
4
4
...

result:

ok 8000 numbers

Test #4:

score: 0
Accepted
time: 138ms
memory: 3544kb

input:

8000
41 41 41
41 41 42
41 41 43
41 41 44
41 41 45
41 41 46
41 41 47
41 41 48
41 41 49
41 41 50
41 41 51
41 41 52
41 41 53
41 41 54
41 41 55
41 41 56
41 41 57
41 41 58
41 41 59
41 41 60
41 42 41
41 42 42
41 42 43
41 42 44
41 42 45
41 42 46
41 42 47
41 42 48
41 42 49
41 42 50
41 42 51
41 42 52
41 42 5...

output:

4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
3
4
4
4
4
5
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
3
4
4
5
5
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
5
5
4
4
4
4
4
4
...

result:

ok 8000 numbers

Test #5:

score: -100
Time Limit Exceeded

input:

8000
21 21 1
21 21 2
21 21 3
21 21 4
21 21 5
21 21 6
21 21 7
21 21 8
21 21 9
21 21 10
21 21 11
21 21 12
21 21 13
21 21 14
21 21 15
21 21 16
21 21 17
21 21 18
21 21 19
21 21 20
21 22 1
21 22 2
21 22 3
21 22 4
21 22 5
21 22 6
21 22 7
21 22 8
21 22 9
21 22 10
21 22 11
21 22 12
21 22 13
21 22 14
21 22 1...

output:

84
42
28
21
17
14
12
11
10
9
8
7
7
6
6
6
5
5
5
5
86
43
29
22
18
15
13
11
10
9
8
8
7
7
6
6
6
5
5
5
88
44
30
22
18
15
13
11
10
9
8
8
7
7
6
6
6
5
5
5
90
45
30
23
18
15
13
12
10
9
9
8
7
7
6
6
6
5
5
5
92
46
31
23
19
16
14
12
11
10
9
8
8
7
7
6
6
6
5
5
94
47
32
24
19
16
14
12
11
10
9
8
8
7
7
6
6
6
5
5
96
4...

result: