QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#96134#5093. 会议LeafSeek26 1160ms521568kbC++142.2kb2023-04-13 13:16:342023-04-13 13:16:37

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 2
Accepted

Test #1:

score: 2
Accepted
time: 4ms
memory: 6476kb

input:

1
100
0 4
0 4
0 1
1 1
0 2
0 2
1 3
1 2
0 2
1 5
0 2
0 3
0 3
0 4
1 8
1 9
1 6
0 1
0 2
0 1
1 11
1 12
0 2
1 13
1 14
1 4
0 2
1 15
0 3
1 16
0 4
0 2
0 2
1 17
1 19
1 7
0 3
1 20
0 4
1 21
0 4
1 22
0 1
0 3
1 23
1 24
0 3
1 25
0 1
0 4
1 26
1 27
0 4
0 1
1 29
1 28
0 4
1 30
0 1
0 3
0 4
0 4
0 3
0 2
1 34
0 4
0 4
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
1 4
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 ...

result:

ok both questions correct

Test #2:

score: 2
Accepted
time: 4ms
memory: 8316kb

input:

1
100
0 1
0 1
0 1
0 2
1 3
0 1
0 1
1 5
0 2
0 2
0 2
1 9
0 1
1 1
0 2
0 2
1 11
1 10
1 12
1 8
1 4
1 6
0 2
1 13
0 1
1 14
0 2
1 15
0 1
0 2
1 16
0 1
0 2
1 19
1 18
0 1
1 20
1 17
0 1
1 21
0 1
0 2
1 22
1 2
0 1
1 24
0 2
1 25
0 2
1 26
0 1
0 2
0 1
1 29
1 28
1 27
0 2
1 30
0 1
1 31
0 1
1 32
0 1
1 33
0 2
0 1
1 35
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
...

result:

ok both questions correct

Test #3:

score: 2
Accepted
time: 0ms
memory: 8420kb

input:

1
100
0 3
0 2
0 3
1 2
0 1
0 2
0 1
0 1
1 7
1 3
0 2
1 8
1 4
0 1
1 9
1 5
0 2
0 1
0 1
0 3
0 4
0 4
1 15
1 10
0 3
0 3
1 17
1 16
0 1
0 3
1 18
1 13
0 1
1 20
0 3
1 21
1 12
0 2
0 2
1 23
0 2
0 3
0 2
1 24
0 1
0 2
0 1
0 1
0 3
1 27
0 1
1 32
0 1
0 3
0 1
1 35
1 28
1 34
0 2
1 30
1 31
0 2
0 1
0 2
0 1
0 1
0 1
1 37
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #4:

score: 2
Accepted
time: 1ms
memory: 7960kb

input:

1
100
0 3
0 2
0 1
1 3
0 1
1 2
0 1
1 5
0 2
1 6
0 1
0 2
1 8
0 1
1 9
0 4
0 1
1 10
1 11
0 2
1 12
1 4
0 3
1 13
0 1
1 14
0 1
1 15
0 1
0 4
0 4
0 1
1 19
0 2
0 1
0 1
1 21
0 2
0 1
0 1
0 1
1 25
1 23
1 24
0 1
1 27
1 26
1 16
1 18
0 3
0 1
0 1
0 2
0 1
1 30
0 2
0 1
1 28
1 34
0 1
1 32
0 1
1 35
1 29
1 36
1 7
0 1
0 1
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 3
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #5:

score: 2
Accepted
time: 2ms
memory: 7976kb

input:

1
100
0 5
0 2
0 5
1 3
0 2
1 2
0 3
1 4
0 1
0 6
0 7
1 6
1 8
0 6
1 9
0 3
0 2
1 10
1 11
0 2
1 5
1 1
0 2
0 4
0 5
1 15
1 14
1 12
0 5
0 2
1 16
0 6
0 1
1 19
0 3
0 5
0 7
1 21
1 22
0 2
0 1
1 24
1 23
0 5
1 7
1 17
1 20
1 25
0 3
1 26
0 5
0 6
0 1
1 27
1 28
0 3
0 3
1 30
1 31
0 1
0 5
0 2
1 33
1 34
0 1
1 35
1 29
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 5
0 -1
1 5
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #6:

score: 2
Accepted
time: 4ms
memory: 8328kb

input:

1
100
0 1
0 3
0 3
1 3
0 8
1 4
0 5
1 5
0 3
0 5
1 7
1 6
0 5
0 4
0 8
1 9
0 1
1 10
0 6
0 1
1 13
1 12
1 11
1 8
0 7
1 14
0 3
0 4
0 1
1 17
1 15
1 16
0 1
0 7
1 18
1 19
0 8
1 20
0 6
1 21
0 4
0 6
1 22
0 3
0 3
1 24
1 25
0 1
0 7
1 26
0 4
1 28
1 27
0 2
0 6
1 29
0 2
1 30
0 5
0 6
0 4
1 34
1 33
1 32
0 7
0 2
0 1
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #7:

score: 2
Accepted
time: 2ms
memory: 6328kb

input:

1
100
0 5
0 5
0 7
1 1
0 5
1 2
0 2
0 9
1 6
1 4
0 10
0 6
1 8
1 5
0 7
1 9
0 4
0 6
0 10
0 1
0 5
1 12
0 3
1 11
0 6
0 6
1 15
1 13
0 8
1 17
1 16
0 7
1 14
1 18
1 7
0 1
0 13
0 5
1 22
0 9
1 23
1 20
0 4
0 11
1 24
1 25
1 10
1 21
0 2
1 26
0 13
0 10
0 4
0 2
1 28
1 29
1 30
1 27
0 1
1 31
0 2
1 32
0 13
1 33
0 9
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 5
1 5
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7...

result:

ok both questions correct

Test #8:

score: 2
Accepted
time: 1ms
memory: 8332kb

input:

1
100
0 5
0 12
0 2
1 2
0 1
0 2
1 1
0 1
0 7
1 5
0 3
1 4
1 8
0 6
0 1
1 9
1 3
1 7
0 4
0 3
0 2
0 4
0 1
1 13
0 1
1 14
1 12
0 9
1 17
1 15
0 7
0 2
0 1
0 6
0 1
0 4
1 21
0 1
0 10
1 24
1 22
1 23
1 11
0 1
1 20
0 8
0 10
0 2
0 1
1 27
1 30
0 4
1 31
1 28
0 6
1 32
0 13
1 29
1 16
1 18
1 26
0 12
1 34
1 6
1 10
0 10
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #9:

score: 2
Accepted
time: 5ms
memory: 9848kb

input:

1
100
0 14
0 14
0 14
1 3
0 7
1 4
0 18
0 21
0 18
1 7
1 5
0 17
0 24
0 11
1 6
0 7
0 8
0 3
1 1
1 13
1 10
0 7
0 3
0 24
0 19
0 9
0 13
0 1
1 20
0 17
1 21
0 24
0 1
1 16
0 25
1 22
1 14
1 24
0 16
0 10
1 25
1 15
0 3
0 6
1 9
1 27
1 8
1 18
0 14
0 24
1 29
1 30
1 28
1 12
0 9
1 31
1 23
0 2
0 15
1 32
0 1
1 34
0 10
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 14
1 14
1 14
1 14
1 14
1 14
1 14
0 -1
0 -1
0 -1
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #10:

score: 2
Accepted
time: 5ms
memory: 7996kb

input:

1
100
0 1
0 1
0 16
1 2
0 19
0 4
1 5
0 19
0 7
1 7
0 7
0 15
1 8
0 9
0 5
1 10
1 9
0 3
0 12
1 12
1 11
0 5
0 8
0 9
1 14
0 1
1 16
0 2
0 3
1 19
0 5
1 18
1 20
0 10
0 4
1 21
1 22
1 4
1 3
0 9
0 1
1 23
0 11
0 2
0 6
0 12
0 17
0 13
1 25
0 11
1 31
0 8
0 17
0 5
0 8
0 15
0 10
0 3
1 37
0 16
0 5
0 6
0 5
1 42
0 12
1 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #11:

score: 2
Accepted
time: 0ms
memory: 8168kb

input:

1
100
0 2
0 4
0 4
1 3
0 4
0 4
0 3
1 6
1 2
0 3
1 7
1 1
0 4
0 4
0 2
0 3
0 4
1 8
1 10
0 3
1 9
0 4
0 3
0 3
0 4
0 4
0 3
1 15
0 4
1 14
1 16
1 12
0 4
1 5
1 21
1 4
0 3
0 4
0 4
0 4
0 3
1 23
1 24
0 3
0 4
0 2
1 26
1 27
0 4
1 30
0 4
0 4
0 3
1 22
1 33
1 32
1 31
1 28
0 4
1 34
1 11
1 13
1 18
0 2
0 4
0 3
0 2
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 3
1 2
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 3
0 -1
1 4
1 4
1 4
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
...

result:

ok both questions correct

Test #12:

score: 2
Accepted
time: 0ms
memory: 8376kb

input:

1
100
0 4
0 2
0 1
1 2
0 2
0 1
0 4
0 1
1 5
0 3
1 6
1 7
0 1
1 9
0 1
1 10
0 2
0 2
0 2
0 1
0 4
1 12
0 4
1 11
1 13
0 2
0 3
1 18
1 15
1 14
0 2
1 19
0 4
0 3
0 3
1 20
1 21
1 16
0 4
1 23
0 3
1 24
0 4
0 4
0 3
1 17
1 3
0 1
1 28
1 1
0 3
1 26
1 4
1 29
1 22
1 27
0 1
0 2
1 31
1 30
0 3
0 3
0 1
1 34
0 2
1 32
0 2
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #13:

score: 2
Accepted
time: 4ms
memory: 8164kb

input:

1
100
0 4
0 3
0 4
0 3
0 4
1 1
0 4
1 6
0 4
1 4
0 4
1 2
1 7
0 4
1 9
1 3
0 3
0 2
1 11
1 10
0 4
0 4
0 4
0 3
0 3
1 12
1 13
1 16
0 1
0 4
1 17
1 14
0 4
0 3
0 4
0 4
0 4
0 2
1 20
1 18
1 19
0 3
0 1
1 26
0 2
1 27
1 25
0 3
1 21
0 3
1 29
0 2
1 23
1 22
1 28
1 15
1 5
1 30
0 3
1 31
0 1
1 32
0 4
1 33
0 3
1 34
0 4
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 3
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #14:

score: 2
Accepted
time: 4ms
memory: 7996kb

input:

1
100
0 7
0 7
0 6
0 6
0 9
1 5
0 9
1 6
0 7
0 7
1 8
0 7
0 5
1 7
1 1
0 9
0 4
0 8
1 11
0 8
0 9
1 13
0 4
1 14
1 12
0 6
0 8
1 16
0 4
1 19
1 15
0 4
1 17
1 4
1 10
1 18
1 20
1 3
0 7
0 9
1 22
1 21
0 7
1 23
0 8
0 9
0 9
1 26
0 5
0 7
0 4
0 7
1 28
0 8
0 9
1 29
1 30
0 4
1 24
1 32
0 8
0 8
1 34
0 9
1 35
1 31
0 9
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #15:

score: 2
Accepted
time: 3ms
memory: 7956kb

input:

1
100
0 8
0 7
0 7
1 3
0 9
0 9
1 4
1 5
0 7
0 8
1 7
0 8
1 8
1 1
0 9
0 7
0 7
0 6
0 4
0 7
1 12
1 9
1 10
0 5
1 15
1 6
1 13
0 3
1 2
1 16
0 5
0 6
1 17
1 11
0 8
1 19
0 9
1 20
0 8
0 8
1 22
1 21
0 9
1 23
0 7
0 7
0 9
1 24
1 25
1 26
0 9
1 27
0 5
1 28
0 7
1 29
0 7
0 8
1 31
1 18
0 6
1 32
0 8
1 33
0 6
0 9
1 34
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 3
1 8
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #16:

score: 2
Accepted
time: 2ms
memory: 8300kb

input:

1
100
0 13
0 7
0 15
1 2
0 14
0 13
1 1
0 10
1 4
0 10
1 7
1 6
0 9
1 8
0 4
1 9
0 13
1 10
0 12
0 15
1 11
0 7
1 12
0 9
1 14
0 11
0 8
1 16
0 14
1 17
1 15
1 5
0 10
1 18
0 13
1 19
0 13
1 3
0 15
1 21
0 14
1 22
0 7
1 23
0 13
0 15
1 24
1 25
0 14
1 26
0 7
1 27
0 2
0 15
1 28
1 20
0 15
0 15
1 31
1 30
0 11
1 32
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 13
0 -1
0 ...

result:

ok both questions correct

Test #17:

score: 2
Accepted
time: 4ms
memory: 6324kb

input:

1
100
0 15
0 12
0 15
0 13
0 12
1 2
0 14
0 15
1 3
0 14
0 13
1 8
0 4
0 7
1 10
1 9
0 13
1 11
1 1
1 4
1 12
0 14
1 5
0 15
0 15
0 11
0 13
0 15
0 12
0 12
0 12
0 14
0 14
0 14
1 15
1 22
1 21
1 19
1 17
1 14
0 15
1 20
0 13
0 13
0 8
1 27
0 7
1 29
0 11
0 7
1 30
1 28
1 26
1 6
0 12
0 11
1 33
0 13
0 12
1 32
1 18
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 15
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #18:

score: 2
Accepted
time: 2ms
memory: 8308kb

input:

1
100
0 6
0 23
0 26
1 2
0 18
0 22
0 20
0 29
0 17
1 7
0 23
1 9
0 22
1 1
1 6
1 4
0 20
0 24
1 12
0 29
0 23
0 28
0 27
0 16
0 27
0 27
0 28
0 25
0 25
0 30
1 19
0 15
1 17
1 16
1 13
0 27
1 25
0 30
1 15
0 26
0 24
0 25
1 23
1 26
1 21
1 18
0 11
1 20
1 3
0 17
0 12
1 31
0 23
1 32
0 18
1 33
1 34
0 30
0 19
1 36
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #19:

score: 2
Accepted
time: 4ms
memory: 6360kb

input:

1
100
0 23
0 20
0 29
0 24
0 26
0 23
0 17
1 4
0 26
0 16
1 8
0 26
1 6
1 10
0 30
1 9
0 19
1 1
1 7
1 5
1 11
0 27
1 13
0 20
1 14
1 12
0 24
0 23
1 16
1 15
0 20
0 30
0 26
1 17
1 18
0 15
0 24
1 20
1 21
0 28
0 14
1 23
0 27
0 16
0 19
1 25
0 17
0 30
0 27
0 16
1 27
1 30
1 24
1 26
1 29
0 23
1 31
0 24
0 29
0 22
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 23
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 20
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #20:

score: 2
Accepted
time: 0ms
memory: 8344kb

input:

1
100
0 43
0 47
0 31
0 38
1 1
0 44
0 36
1 6
1 3
1 2
0 46
0 49
0 41
0 16
1 9
0 40
1 11
1 4
1 8
0 49
1 12
0 44
0 41
0 46
1 15
0 34
1 14
0 19
0 21
0 50
0 27
0 42
1 21
1 18
0 36
0 41
0 42
0 26
0 36
0 49
0 3
1 24
1 25
1 22
0 36
0 29
0 49
0 19
0 49
1 31
1 29
1 30
1 10
0 49
0 42
1 35
0 46
1 5
0 20
1 37
1 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 43
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #21:

score: 2
Accepted
time: 4ms
memory: 8108kb

input:

1
100
0 28
0 44
0 35
1 3
0 46
1 1
0 42
1 2
0 48
0 49
1 6
0 40
1 7
0 41
0 43
0 43
1 11
0 49
0 45
1 13
0 26
1 9
1 10
1 12
1 14
0 44
0 14
1 16
1 15
1 5
0 35
1 17
0 32
1 18
0 47
1 19
0 30
0 46
0 47
1 21
1 22
0 28
0 45
0 44
1 24
0 40
0 37
0 41
1 27
1 26
1 20
1 28
0 15
1 29
1 23
0 43
1 25
0 33
0 46
1 32
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 28
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #22:

score: 2
Accepted
time: 1ms
memory: 8348kb

input:

1
100
0 9
0 10
0 9
0 9
0 10
0 9
1 2
0 10
0 7
0 10
1 6
1 3
1 8
0 9
1 10
0 9
0 10
0 8
1 13
0 10
0 10
1 14
0 7
1 16
1 1
0 9
1 12
1 7
1 5
0 9
1 9
1 11
1 4
1 15
0 7
0 10
0 9
0 10
0 10
1 19
1 22
1 23
1 20
1 18
0 10
0 10
1 24
0 8
1 21
1 17
0 10
0 10
1 28
1 26
0 9
1 29
0 9
0 10
1 31
1 30
0 10
0 10
0 10
0 7
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
1 10
0 -1
1 10
0 -1
1 10
0 -1
1 10
1 10
1 10
1 10
1 10
1 10
1 10
1 10
1 10
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
0 -1
0 -1
0 -1
1 1...

result:

ok both questions correct

Test #23:

score: 2
Accepted
time: 3ms
memory: 8428kb

input:

1
100
0 1
0 3
0 1
1 2
0 2
1 4
0 1
0 2
0 3
1 6
1 5
0 1
1 1
0 4
1 9
0 4
0 1
1 11
1 10
0 2
1 12
0 1
0 3
1 13
1 3
1 14
0 3
1 15
0 3
1 16
0 4
0 4
0 2
0 4
0 3
1 18
0 4
1 22
1 19
0 1
0 2
0 3
0 2
1 23
1 24
1 21
1 26
1 20
0 3
1 27
0 4
1 28
0 4
1 29
1 17
0 1
1 30
0 2
0 2
0 2
0 4
0 3
0 1
0 4
0 1
0 3
0 2
1 39
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -...

result:

ok both questions correct

Test #24:

score: 2
Accepted
time: 4ms
memory: 8180kb

input:

1
100
0 16
0 18
0 14
0 13
0 15
1 2
1 3
0 17
1 4
0 14
0 14
1 8
1 6
0 16
0 18
0 18
0 18
1 10
0 15
0 17
1 11
1 9
0 16
1 15
0 12
0 16
0 15
1 1
0 12
1 19
1 17
0 13
1 20
1 7
1 14
1 18
0 16
0 16
1 22
1 21
1 5
1 12
0 18
1 23
0 15
1 24
0 18
0 17
1 25
1 26
0 16
1 27
0 18
0 18
0 17
1 28
0 12
1 29
1 31
0 18
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
0 -1
0...

result:

ok both questions correct

Test #25:

score: 2
Accepted
time: 0ms
memory: 8364kb

input:

1
100
0 36
0 40
0 37
1 3
0 40
0 32
0 37
0 35
0 39
0 39
1 4
1 7
1 2
0 37
1 10
0 37
1 11
1 6
1 1
0 39
0 40
0 36
1 13
0 36
0 33
1 16
0 39
1 17
0 34
0 38
1 18
1 19
1 14
1 8
0 36
1 20
0 37
1 21
1 12
1 9
0 39
0 38
0 37
0 39
1 23
1 25
0 38
0 39
1 27
0 40
0 38
0 36
1 30
0 34
0 37
1 31
1 32
0 37
0 38
0 37
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 36
0 -1
0 -1
0 -1
1 40
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 39
1 39
1 39
0 -1
1 39
0 -1
0 -1
0 -1
1 39
0 -1
0 -1
0 -1
0 -1
0 -1
1 39
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #26:

score: 2
Accepted
time: 0ms
memory: 8264kb

input:

1
100
0 99
0 107
0 108
0 106
0 104
0 103
0 106
1 2
0 108
1 8
0 110
1 5
0 110
0 109
0 110
1 12
1 10
0 109
1 13
0 109
0 97
0 108
1 15
1 9
0 109
0 108
1 18
0 100
1 19
0 99
1 1
0 82
0 106
0 107
0 101
0 108
0 108
1 24
0 109
1 26
0 103
1 28
1 25
0 79
1 29
0 110
1 30
0 109
0 109
1 32
1 31
0 110
0 109
0 108...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 99
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #27:

score: 2
Accepted
time: 0ms
memory: 8020kb

input:

1
100
0 30
0 28
0 30
0 30
0 30
0 27
0 30
0 28
1 2
0 26
1 9
1 1
0 29
1 10
1 5
0 28
1 6
1 8
0 28
1 3
1 12
0 28
1 13
0 30
1 14
1 7
0 26
0 30
1 16
0 28
1 15
1 17
0 29
1 18
0 30
1 11
0 29
0 30
1 20
0 30
1 22
1 21
0 30
1 23
0 26
1 24
0 30
1 25
0 30
0 29
1 27
1 26
0 29
1 28
0 30
1 29
0 28
0 30
1 31
0 30
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 3
1 30
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
0 -1
1 30
1 30
1 30
0 -1
1 30
0 -1
1 30
1 30
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
1 28
0 -1
0 -1
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1...

result:

ok both questions correct

Test #28:

score: 2
Accepted
time: 4ms
memory: 7968kb

input:

1
100
0 15
0 20
0 2
1 2
0 12
1 3
0 4
1 5
0 1
1 4
0 9
0 8
0 12
1 9
1 8
0 1
1 10
1 7
0 1
0 5
0 2
0 10
1 11
1 14
0 5
0 8
0 10
0 14
0 14
0 4
1 18
1 16
1 15
1 20
1 12
1 6
1 13
0 2
1 21
1 19
0 3
0 1
1 23
1 22
0 2
1 24
0 21
1 1
0 10
1 26
0 2
0 5
0 2
1 27
1 29
1 28
0 4
1 30
0 2
1 31
0 1
1 32
0 1
1 33
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #29:

score: 2
Accepted
time: 2ms
memory: 8388kb

input:

1
100
0 1
0 3
0 3
0 3
1 2
1 4
0 2
1 3
0 1
1 6
0 4
1 5
0 3
1 7
0 4
1 9
0 4
1 10
0 7
1 11
0 2
1 12
0 2
0 1
0 1
1 14
1 13
0 1
0 2
0 2
1 18
1 16
0 2
0 2
1 20
0 5
0 1
0 1
1 22
1 17
1 21
1 19
0 2
0 4
1 24
0 7
0 2
1 27
1 26
0 1
0 1
0 1
1 29
1 30
0 9
1 31
1 25
1 23
0 1
0 4
0 2
1 33
1 34
0 3
0 1
1 36
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
1...

result:

ok both questions correct

Test #30:

score: 2
Accepted
time: 1ms
memory: 7968kb

input:

1
100
0 1
0 3
0 10
0 1
0 2
0 2
0 1
0 2
1 8
0 8
1 1
0 2
1 6
0 1
0 4
0 1
0 1
1 13
1 12
1 14
0 1
0 7
1 15
0 2
1 17
1 16
1 5
0 2
0 1
1 19
1 10
1 2
1 7
0 2
0 6
1 21
0 13
0 1
1 22
1 23
0 1
1 24
0 1
0 1
0 1
1 27
1 26
0 2
0 3
1 29
1 28
0 4
1 30
1 25
0 4
1 31
1 11
1 3
1 9
1 18
0 2
1 32
0 1
1 4
0 1
0 6
0 2
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -...

result:

ok both questions correct

Test #31:

score: 2
Accepted
time: 5ms
memory: 6384kb

input:

1
100
0 13
0 9
0 27
1 3
0 12
0 8
1 5
0 6
0 8
1 6
1 7
0 86
0 22
1 9
0 8
1 8
1 2
0 48
1 4
1 11
0 10
0 50
1 12
0 36
1 14
0 6
0 9
1 16
0 17
1 13
0 12
0 6
0 2
0 8
1 18
1 19
0 8
1 22
1 17
0 3
1 23
0 8
1 21
0 26
1 20
1 24
0 6
0 7
1 27
0 5
0 11
0 69
0 7
0 15
0 1
1 32
1 29
0 1
1 34
1 33
0 17
0 1
1 36
1 26
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #32:

score: 2
Accepted
time: 1ms
memory: 10464kb

input:

1
100
0 10
0 11
0 32
0 4
0 3
1 2
0 7
0 32
0 5
1 7
1 1
1 5
0 28
0 44
1 9
1 6
1 4
1 10
0 24
0 16
0 2
0 57
1 12
0 7
0 7
1 14
0 7
1 17
0 9
1 18
0 15
0 24
0 4
0 72
0 6
0 4
0 15
1 22
0 20
0 27
0 2
0 25
1 26
0 6
0 11
1 31
1 20
1 21
0 25
0 40
0 7
0 41
1 32
1 25
1 34
1 35
0 8
1 15
0 4
1 37
1 11
1 8
0 8
0 50
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #33:

score: 2
Accepted
time: 2ms
memory: 8048kb

input:

1
100
0 26
0 10
0 22
1 1
0 2
0 23
0 17
0 32
1 5
0 19
1 8
0 9
1 9
0 8
1 10
1 6
0 32
1 3
1 4
0 6
1 12
1 7
0 2
0 6
0 5
0 8
1 14
0 12
1 13
1 16
0 17
1 18
1 15
1 17
0 11
1 19
0 43
0 8
0 5
0 19
0 26
0 3
1 21
0 9
0 1
0 21
0 25
0 17
1 28
0 4
0 19
0 59
1 33
0 4
0 17
1 26
1 30
0 11
0 2
0 7
1 27
0 10
1 39
0 17...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 26
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 32
0 -1
1 32
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #34:

score: 2
Accepted
time: 0ms
memory: 7992kb

input:

1
100
0 4
0 6
0 4
1 2
0 3
0 4
1 3
1 5
0 6
1 6
0 7
0 7
1 7
0 6
1 9
1 1
0 8
1 10
0 3
0 6
0 5
0 5
1 14
1 12
0 4
1 15
1 11
0 7
0 1
1 16
1 17
1 13
0 3
1 18
0 5
1 19
0 4
1 20
0 7
0 1
0 8
1 22
1 23
1 21
0 4
1 24
0 8
0 1
0 4
1 26
1 25
0 5
1 27
1 28
0 7
1 29
0 5
0 1
1 31
1 30
0 9
0 9
1 32
0 5
0 6
0 9
0 3
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #35:

score: 2
Accepted
time: 4ms
memory: 8136kb

input:

1
100
0 2
0 2
0 21
0 7
1 4
0 4
0 7
1 5
0 3
1 1
0 43
1 8
0 17
0 7
1 10
0 6
1 2
0 3
1 3
1 11
1 12
0 2
1 13
1 9
0 13
1 14
0 2
1 6
0 48
0 16
0 9
0 2
0 20
1 18
1 20
1 17
0 14
1 21
1 15
1 16
0 5
0 5
1 22
0 4
1 24
0 14
1 23
1 25
0 9
0 19
0 3
1 26
0 3
1 27
0 36
1 30
1 28
1 19
0 8
0 4
1 31
1 32
0 4
0 27
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #36:

score: 2
Accepted
time: 5ms
memory: 7944kb

input:

1
100
0 5
0 9
0 17
1 2
0 2
1 3
0 5
1 4
0 7
0 15
1 5
1 7
0 15
0 9
1 8
1 9
0 2
0 9
0 11
0 16
0 17
1 12
1 11
0 13
0 4
0 15
0 15
0 11
1 19
0 15
1 20
0 11
0 5
1 22
0 5
1 23
1 15
1 14
1 21
0 41
0 13
0 5
1 26
0 22
0 1
0 14
1 27
1 28
0 1
0 2
0 11
0 8
0 23
0 7
1 33
1 29
1 30
0 32
1 36
1 25
1 31
1 18
0 52
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
1 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #37:

score: 2
Accepted
time: 2ms
memory: 9872kb

input:

1
100
0 8
0 25
0 15
1 1
0 6
0 6
1 5
0 47
1 6
0 35
0 11
0 19
0 6
1 8
0 13
0 10
0 31
0 1
0 16
0 9
0 16
0 25
1 12
0 4
0 11
0 22
0 13
0 17
1 21
1 22
0 19
1 14
1 16
1 7
1 23
1 17
0 17
1 25
0 21
1 10
1 20
0 1
1 9
1 13
0 11
0 11
1 29
1 15
1 11
1 26
1 2
1 28
1 18
0 4
0 2
0 8
1 30
1 32
0 3
1 33
1 31
0 11
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #38:

score: 2
Accepted
time: 5ms
memory: 8300kb

input:

1
100
0 12
0 4
0 1
1 3
0 5
0 8
0 8
0 1
0 6
1 5
1 4
0 22
1 6
0 3
0 2
0 15
1 12
1 2
0 5
0 12
1 14
0 5
1 15
1 8
1 9
1 7
0 2
1 13
0 6
1 16
1 1
0 6
0 3
0 1
0 3
1 21
0 12
0 2
0 1
0 10
1 23
1 22
1 24
1 10
1 18
0 1
0 17
0 15
1 28
1 26
1 27
1 17
1 11
0 8
1 29
1 19
0 1
0 5
0 12
1 31
0 10
0 3
1 33
0 17
0 4
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #39:

score: 2
Accepted
time: 2ms
memory: 8228kb

input:

1
100
0 1
0 11
0 1
1 1
0 9
1 4
0 16
1 5
0 6
0 9
1 2
1 7
0 20
1 8
0 3
1 9
0 10
1 6
0 3
0 1
0 1
1 11
1 12
1 13
0 1
1 14
0 8
1 15
0 5
1 16
0 1
1 17
0 2
1 18
0 5
0 1
1 19
0 5
1 20
0 3
1 22
1 21
0 15
0 1
1 23
0 13
1 24
1 25
0 5
0 11
1 26
1 27
0 3
1 10
0 23
0 2
0 2
0 8
0 12
1 32
0 5
0 9
0 3
1 30
1 34
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #40:

score: 2
Accepted
time: 0ms
memory: 6480kb

input:

1
100
0 27
0 25
0 6
1 3
0 1
0 15
0 3
1 5
0 12
1 7
1 4
0 38
1 6
0 4
1 1
0 8
1 10
0 1
0 3
0 4
1 8
1 9
0 18
0 11
0 20
1 14
1 16
0 16
1 17
1 11
1 12
1 15
0 4
0 11
1 18
0 5
1 20
0 5
0 5
0 4
0 1
1 24
0 19
0 6
0 19
0 7
0 3
0 8
0 2
0 6
1 32
0 8
0 1
0 9
0 7
0 7
1 34
1 37
0 11
1 27
1 31
1 26
1 22
1 23
0 47
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #41:

score: 2
Accepted
time: 3ms
memory: 9812kb

input:

1
100
0 1
0 4
0 5
1 1
0 4
1 4
0 4
1 5
0 15
1 6
0 21
1 7
0 4
0 31
0 8
0 35
0 33
0 8
1 9
0 2
0 4
1 10
1 2
0 2
0 23
0 3
0 12
0 12
1 18
0 30
0 23
1 21
1 17
1 22
1 16
1 19
0 1
0 11
1 15
0 2
0 13
1 26
1 25
0 53
1 3
0 17
1 28
1 8
1 13
0 45
1 29
1 12
0 11
0 2
1 30
1 31
0 8
0 14
0 18
0 1
0 26
1 32
1 34
0 16
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #42:

score: 2
Accepted
time: 2ms
memory: 8176kb

input:

1
100
0 498
0 492
0 498
1 1
0 494
0 484
1 3
1 2
0 500
1 6
0 492
1 7
0 480
0 493
1 8
0 483
1 10
0 499
1 4
0 489
1 12
0 498
0 488
1 13
0 481
1 14
1 11
1 9
0 492
1 16
0 487
0 497
0 486
0 500
1 20
1 19
1 18
0 491
1 21
0 494
1 22
0 499
1 23
1 15
0 495
0 488
1 24
1 5
0 495
1 26
0 498
0 494
1 28
0 492
0 45...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 498
0 -1
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #43:

score: 2
Accepted
time: 7ms
memory: 8332kb

input:

1
100
0 496
0 470
0 498
0 481
0 489
0 489
1 3
1 2
0 493
0 477
0 493
0 498
0 494
1 11
1 7
1 10
1 1
0 488
1 8
1 6
0 500
1 9
0 498
1 14
1 13
0 497
0 490
0 500
0 478
1 18
0 496
0 492
0 497
0 490
1 19
1 20
1 17
0 491
0 498
1 24
1 5
1 4
0 497
1 23
0 496
0 483
0 496
1 26
0 479
1 27
0 498
0 493
1 30
0 488
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #44:

score: 2
Accepted
time: 3ms
memory: 7968kb

input:

1
100
0 498
0 499
0 500
0 487
0 500
1 1
0 499
0 499
1 7
1 2
1 4
0 496
1 8
1 6
0 500
1 9
0 495
1 5
0 480
1 10
0 497
1 11
0 494
1 13
0 499
1 14
0 499
1 15
0 500
1 16
0 500
0 497
0 499
1 18
0 500
0 499
0 499
0 496
1 20
0 499
0 496
0 500
1 19
1 21
1 17
0 499
1 27
1 26
0 500
0 498
1 28
1 25
0 495
0 498
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
1 500
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #45:

score: 2
Accepted
time: 1ms
memory: 7976kb

input:

1
100
0 8
0 8
0 5
1 2
0 2
0 7
1 3
1 5
0 9
1 1
0 7
1 4
0 8
1 8
0 7
1 9
0 3
0 3
1 10
0 7
1 12
1 11
0 8
0 4
1 14
0 1
0 9
0 5
1 16
1 13
1 15
0 9
1 17
1 6
0 7
0 1
0 6
1 21
0 8
1 19
1 20
1 22
0 4
1 23
0 9
0 7
0 1
1 26
1 25
1 24
0 3
0 3
0 8
1 29
0 7
1 28
1 27
0 2
0 5
1 32
1 31
0 3
1 33
1 30
0 3
0 8
0 8
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 8
1 8
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #46:

score: 2
Accepted
time: 2ms
memory: 7988kb

input:

1
100
0 496
0 493
0 500
0 499
1 2
0 499
0 500
1 6
1 3
1 1
0 499
1 4
0 485
1 8
0 500
1 9
0 499
1 7
0 500
1 11
0 493
0 500
1 12
1 13
0 497
1 14
0 497
0 500
0 495
1 16
0 498
1 15
1 17
1 18
0 495
1 19
0 497
1 20
0 500
0 500
0 498
0 492
0 500
0 499
0 498
1 24
1 27
0 491
1 28
1 26
0 499
1 29
0 500
1 30
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
1 499
0 -1
1 499
1 499
1 499
1 499
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
1 499
1 499
1 499
1 499
1 499
1 499
0 -1
0 -1
...

result:

ok both questions correct

Test #47:

score: 2
Accepted
time: 2ms
memory: 7968kb

input:

1
100
0 490
0 500
0 500
0 499
1 2
0 495
1 1
1 4
0 498
1 3
0 500
1 7
0 499
1 6
0 498
1 8
0 500
1 10
0 499
0 500
0 499
0 499
1 13
1 11
0 498
1 12
1 5
1 15
0 499
1 16
0 500
1 17
0 500
1 18
0 500
0 492
1 20
0 499
0 497
0 498
0 499
1 23
0 500
1 22
1 19
1 25
0 498
1 21
1 26
0 497
0 500
0 499
1 29
1 27
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 490
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 498
0 -1
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
1...

result:

ok both questions correct

Test #48:

score: 2
Accepted
time: 2ms
memory: 6444kb

input:

1
100
0 500
0 498
0 500
0 498
1 3
1 4
0 500
0 499
0 498
1 5
0 499
1 7
1 1
1 8
0 500
1 2
0 499
0 500
0 500
1 10
1 11
1 12
0 499
1 13
0 500
0 500
0 500
0 500
0 500
0 500
1 16
1 18
1 15
1 19
1 17
0 498
1 20
1 9
0 498
0 499
0 496
1 22
1 21
0 500
0 500
1 24
0 497
0 498
1 26
0 500
1 27
1 28
1 23
0 496
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 500
0 -1
1 500
0 -1
1 498
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
0 -1
0 -1
0 -1
1 499
0 -1
1 500
1 500
1 500
0 -1
1 499
0 -1
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #49:

score: 2
Accepted
time: 2ms
memory: 6240kb

input:

1
100
0 1
0 1
0 1
1 2
0 1
0 1
1 3
0 1
1 6
0 1
1 7
0 1
1 8
1 1
0 2
0 1
0 1
0 2
1 12
1 9
0 1
0 3
1 14
1 10
0 2
0 1
1 16
1 4
0 2
1 17
1 5
1 13
0 1
1 18
0 1
0 1
1 20
0 3
1 21
1 15
0 1
0 2
1 23
0 1
0 4
1 24
0 4
0 1
0 1
0 2
0 2
1 29
1 27
1 25
0 2
0 3
0 2
1 33
1 32
1 31
0 2
0 3
1 34
1 35
0 1
0 2
1 36
1 22
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
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
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
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -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
0 -1
0 -...

result:

ok both questions correct

Test #50:

score: 2
Accepted
time: 0ms
memory: 7988kb

input:

1
100
0 1
0 1
0 5
1 1
0 2
1 4
0 2
0 1
1 2
0 2
1 3
0 1
1 8
0 1
1 5
0 4
1 7
0 1
0 3
0 2
0 1
0 2
1 15
1 12
0 1
0 2
1 17
1 16
0 2
0 2
1 19
1 11
1 10
0 1
1 20
1 14
1 18
1 9
0 2
1 21
0 1
0 1
0 2
1 22
1 24
0 1
1 25
1 23
0 3
0 2
1 26
0 1
0 2
1 28
1 29
0 1
0 1
0 1
0 1
1 33
0 4
0 1
0 3
0 1
0 2
0 2
1 39
1 34
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 2
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
1...

result:

ok both questions correct

Test #51:

score: 2
Accepted
time: 5ms
memory: 8044kb

input:

1
100
0 48
0 99
0 6
0 99
0 99
0 99
0 99
0 42
0 99
0 39
0 99
0 18
0 99
0 99
0 47
0 99
0 99
0 45
0 99
0 99
0 8
0 99
0 99
0 34
0 99
0 22
0 36
0 49
0 99
0 31
0 99
0 99
0 99
0 99
0 40
0 99
0 12
0 43
0 7
0 30
0 99
0 29
0 19
0 26
0 99
0 99
0 1
0 37
0 46
0 99
0 41
0 11
0 10
0 99
0 99
0 99
0 9
0 99
0 4
0 24
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 48
0 -1
0 -1
0 -1
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1...

result:

ok both questions correct

Test #52:

score: 2
Accepted
time: 2ms
memory: 8160kb

input:

1
100
0 25
1 1
0 19
1 2
0 58
1 3
0 99
1 4
0 39
1 5
0 45
1 6
0 41
1 7
0 3
1 8
0 90
1 9
0 95
1 10
0 9
1 11
0 54
1 12
0 67
1 13
0 39
1 14
0 53
1 15
0 23
1 16
0 44
1 17
0 95
1 18
0 22
1 19
0 16
1 20
0 31
1 21
0 58
1 22
0 7
1 23
0 31
1 24
0 32
1 25
0 6
1 26
0 7
1 27
0 21
1 28
0 78
1 29
0 47
1 30
0 70
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 0
1 25
0 -1
1 19
0 -1
1 58
0 -1
1 99
0 -1
1 39
0 -1
1 45
0 -1
1 41
0 -1
1 3
0 -1
1 90
0 -1
1 95
0 -1
1 9
0 -1
1 54
0 -1
1 67
0 -1
1 39
0 -1
1 53
0 -1
1 23
0 -1
1 44
0 -1
1 95
0 -1
1 22
0 -1
1 16
0 -1
1 31
0 -1
1 58
0 -1
1 7
0 -1
1 31...

result:

ok both questions correct

Test #53:

score: 2
Accepted
time: 0ms
memory: 8456kb

input:

1
100
0 99
0 99
0 23
0 99
0 99
0 6
0 99
0 47
0 99
0 22
0 99
1 5
0 48
1 12
0 99
0 99
1 10
0 99
0 5
1 1
0 99
0 99
0 33
0 99
0 40
0 41
1 21
1 6
0 18
0 34
0 11
0 16
1 23
1 24
0 3
1 27
1 25
1 19
1 4
1 3
0 99
0 46
0 30
0 99
0 31
0 99
1 29
0 99
0 99
0 7
1 35
0 99
0 42
1 28
0 99
0 9
1 39
0 99
0 1
0 99
1 42
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1 99
1...

result:

ok both questions correct

Test #54:

score: 2
Accepted
time: 3ms
memory: 6260kb

input:

1
100
0 1
0 3
0 3
0 3
0 1
0 4
0 4
1 4
0 3
1 1
1 8
0 4
0 4
0 2
0 2
0 3
1 9
0 1
0 4
1 11
1 6
1 5
1 15
0 1
1 16
1 2
0 2
1 17
0 3
0 1
1 18
1 19
1 14
0 4
0 1
1 21
1 12
1 7
1 13
0 2
0 3
1 23
1 22
1 3
0 4
0 3
0 2
1 24
0 2
1 25
0 3
0 1
1 28
0 2
0 3
0 1
0 4
0 3
0 1
1 32
1 30
1 34
1 35
0 2
0 1
0 1
0 4
1 38
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 1
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -...

result:

ok both questions correct

Test #55:

score: 2
Accepted
time: 1ms
memory: 8304kb

input:

1
100
0 1
0 1
0 3
0 3
0 2
1 1
1 5
1 4
0 1
1 6
0 2
1 3
0 2
1 7
0 2
1 9
0 1
0 3
1 10
0 1
1 2
1 8
0 4
0 1
0 1
1 13
0 1
1 15
0 3
0 2
1 18
1 14
0 4
0 3
1 16
0 4
0 4
0 4
1 22
0 1
0 4
1 23
0 4
1 25
0 1
1 24
1 21
0 3
0 1
1 29
0 1
1 30
0 3
1 31
0 3
0 2
1 32
0 3
0 1
1 35
1 28
0 3
1 34
1 19
1 11
1 26
0 4
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 3
0 -1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #56:

score: 2
Accepted
time: 1ms
memory: 8276kb

input:

1
100
0 3
0 3
0 7
1 1
0 6
1 4
0 5
1 5
0 7
1 6
0 3
1 2
0 1
1 8
0 4
0 9
1 10
1 7
0 7
1 9
0 1
1 12
0 7
0 3
1 13
1 14
0 7
0 8
0 4
1 15
0 3
0 5
0 8
0 7
1 21
1 20
0 7
0 7
0 7
0 6
0 4
1 25
0 9
1 16
0 7
1 26
0 7
0 6
0 9
0 6
1 22
0 7
0 7
0 2
1 33
1 34
0 8
1 35
0 8
1 37
1 27
1 29
1 17
0 7
0 9
1 38
0 4
1 18
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
1 7
1 7
1 7
1 7
0 -1
0 -...

result:

ok both questions correct

Test #57:

score: 2
Accepted
time: 4ms
memory: 7964kb

input:

1
100
0 5
0 7
0 6
0 3
1 4
1 2
0 8
1 5
0 3
1 1
0 6
1 7
0 6
1 8
0 3
0 1
1 9
0 3
1 6
1 3
0 2
1 12
0 3
0 6
0 2
1 13
0 4
0 8
1 16
0 2
1 14
1 15
0 6
1 19
1 17
1 18
0 2
0 5
1 21
0 2
1 22
1 20
0 4
1 23
0 6
0 1
0 2
0 4
1 25
0 2
1 24
1 26
0 3
1 28
0 6
1 30
0 8
1 31
0 3
0 4
0 7
1 33
1 32
0 3
0 6
0 2
1 35
1 36
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 6
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #58:

score: 2
Accepted
time: 4ms
memory: 8068kb

input:

1
100
0 2
0 5
0 2
1 2
0 5
0 8
0 6
1 6
0 2
1 4
1 1
1 3
0 3
0 2
1 8
0 5
1 5
1 9
0 6
0 5
1 11
1 12
0 7
0 8
1 14
1 13
0 3
0 4
0 5
0 1
0 3
1 16
1 19
1 18
0 1
1 20
1 7
1 17
0 4
1 21
0 1
1 22
0 3
0 4
0 2
1 24
0 5
0 1
0 6
0 6
1 26
0 1
0 5
1 31
1 27
0 4
1 29
1 25
1 28
0 4
0 7
1 23
1 33
1 32
0 2
0 5
0 1
0 2
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #59:

score: 2
Accepted
time: 0ms
memory: 7988kb

input:

1
100
0 18
0 4
0 32
0 25
1 2
1 4
0 30
1 5
0 27
0 7
1 7
0 15
1 3
1 6
0 4
0 8
0 24
1 10
1 9
1 1
0 14
0 30
1 12
0 8
0 11
1 15
1 13
1 8
0 13
0 6
1 11
1 14
0 25
0 14
0 32
1 20
0 18
1 19
1 18
1 17
0 9
1 22
0 9
0 6
1 24
1 23
0 20
1 21
0 20
1 26
0 18
0 4
1 28
0 5
1 27
1 29
0 2
1 30
0 16
0 13
1 32
0 23
0 8
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 18
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #60:

score: 2
Accepted
time: 4ms
memory: 8064kb

input:

1
100
0 31
0 10
0 20
0 16
1 4
0 5
1 5
1 1
0 12
0 28
0 17
1 6
0 7
1 8
1 9
1 3
0 18
0 2
0 21
0 1
1 13
1 12
1 7
1 2
0 8
1 14
0 24
0 1
0 26
0 31
1 17
0 7
0 7
0 9
0 9
1 16
0 12
0 14
1 23
1 24
0 22
0 27
0 2
1 21
1 22
0 21
0 25
1 28
1 20
1 19
0 22
0 1
1 31
0 4
1 32
1 25
0 30
0 2
0 2
1 35
1 34
0 2
0 16
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 31
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #61:

score: 2
Accepted
time: 2ms
memory: 7968kb

input:

1
100
0 2
0 2
0 4
1 3
0 3
0 1
1 2
1 4
0 2
1 6
0 1
0 2
1 8
0 3
1 7
0 4
0 3
1 10
1 11
1 5
0 3
0 2
0 2
1 14
0 2
1 13
0 1
1 15
1 9
0 4
1 17
0 4
0 4
0 3
0 3
1 20
1 21
0 2
1 22
0 2
0 4
0 2
0 2
0 1
1 24
1 18
1 25
0 3
1 28
1 27
0 4
1 29
1 19
0 2
0 3
1 30
0 2
1 32
0 1
1 31
1 33
0 2
0 3
0 4
0 2
0 1
0 1
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #62:

score: 2
Accepted
time: 4ms
memory: 7972kb

input:

1
100
0 2
0 3
0 4
1 3
0 3
1 1
0 2
1 5
0 3
1 6
0 4
1 2
0 1
0 1
0 3
0 1
1 9
1 11
0 4
1 12
0 1
0 3
1 8
1 10
1 14
1 4
0 1
1 15
0 4
1 16
0 1
0 1
1 17
1 13
0 2
0 3
0 3
0 1
1 21
0 1
0 3
1 24
1 23
0 3
1 22
0 1
0 2
0 4
0 4
0 3
1 29
1 28
1 27
0 1
0 3
1 30
0 3
0 2
1 32
0 4
0 1
1 25
1 33
1 20
1 26
0 4
0 4
1 38
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 1
0 -1
1 4
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #63:

score: 2
Accepted
time: 4ms
memory: 8084kb

input:

1
100
0 4
0 5
0 1
0 7
0 5
0 2
1 3
0 2
0 5
1 8
0 5
1 5
1 6
0 2
0 8
1 11
1 1
0 6
1 12
0 7
0 3
1 13
1 14
1 4
0 1
1 10
0 8
1 16
1 7
1 9
0 2
0 3
1 18
1 17
0 4
0 5
0 5
0 1
1 22
1 21
0 4
1 19
1 20
0 7
0 2
1 24
1 25
1 15
0 7
0 3
0 3
0 6
1 26
1 27
1 29
1 23
0 6
1 30
0 8
0 3
1 31
1 32
0 7
0 5
1 34
1 33
0 8
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #64:

score: 2
Accepted
time: 2ms
memory: 8056kb

input:

1
100
0 8
0 2
0 5
0 6
1 3
1 4
0 2
0 4
1 2
0 6
0 7
1 7
1 5
1 8
0 8
0 6
1 9
0 6
0 5
0 4
0 7
0 3
1 12
0 2
1 15
0 7
0 5
1 11
1 18
1 10
1 14
1 13
0 8
1 6
1 1
0 8
0 4
0 3
1 20
1 21
1 22
1 16
0 5
0 1
0 7
1 25
0 3
0 5
1 23
1 26
0 1
1 27
0 7
0 4
0 2
0 2
0 5
1 29
1 31
1 30
0 7
0 1
1 33
0 1
0 4
1 37
0 6
0 7
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #65:

score: 2
Accepted
time: 0ms
memory: 8452kb

input:

1
100
0 17
0 17
0 26
0 21
0 1
1 2
1 3
0 31
1 6
1 5
0 30
0 5
1 4
1 8
0 10
0 8
0 3
1 11
1 1
1 9
0 13
1 12
0 2
0 11
0 18
1 15
1 13
1 14
0 20
0 14
1 17
0 16
1 18
0 10
1 19
0 21
1 20
1 16
0 17
0 30
0 25
0 25
0 2
0 3
0 4
1 27
1 25
1 21
0 14
0 23
0 19
1 29
1 28
1 22
0 24
0 26
1 31
0 32
1 33
0 23
0 3
0 31
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 17
1 17
1 17
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #66:

score: 2
Accepted
time: 2ms
memory: 8080kb

input:

1
100
0 29
0 23
0 14
0 13
0 2
0 5
0 24
1 1
0 13
0 18
1 7
0 16
0 19
1 10
0 30
0 1
0 3
1 14
1 8
1 9
0 31
0 28
1 11
0 2
1 12
1 15
0 3
1 18
0 23
0 11
0 9
0 17
1 20
0 30
1 23
0 24
0 1
1 21
1 19
1 2
0 15
1 13
1 25
0 31
1 27
1 3
0 2
0 8
1 28
1 29
1 22
0 21
1 17
1 16
0 13
1 31
1 30
1 26
0 23
1 32
1 5
0 3
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #67:

score: 2
Accepted
time: 2ms
memory: 6508kb

input:

1
100
0 6
0 2
0 6
1 1
0 12
0 2
1 4
0 11
0 12
0 12
0 3
0 3
1 7
0 10
0 9
0 13
1 5
1 13
1 9
0 7
0 14
1 15
1 12
0 3
0 2
1 17
0 1
0 14
0 13
1 19
1 20
1 10
0 15
1 3
1 16
1 6
1 18
1 8
1 14
0 7
1 22
1 11
0 8
0 4
0 7
0 2
0 1
1 27
1 26
0 6
1 24
0 3
1 29
0 8
1 30
0 7
0 13
1 32
0 9
1 33
0 5
1 34
1 31
1 21
0 4
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 6
0 -1
1 6
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #68:

score: 2
Accepted
time: 1ms
memory: 8332kb

input:

1
100
0 1
0 2
0 3
1 2
0 4
1 1
0 4
1 5
0 4
1 4
0 3
0 1
0 2
1 8
0 1
0 4
1 11
1 7
1 10
0 4
1 12
0 2
0 2
1 14
1 9
1 13
0 2
1 15
0 1
0 3
1 17
0 4
1 16
0 4
0 4
0 2
0 1
0 4
0 2
1 19
0 4
1 18
1 22
0 4
0 4
0 2
0 2
0 3
1 26
1 30
0 3
1 25
1 31
0 1
0 2
0 3
1 32
0 3
1 35
1 33
1 27
0 4
0 3
1 36
1 20
1 28
1 24
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #69:

score: 2
Accepted
time: 1ms
memory: 8040kb

input:

1
100
0 1
0 3
0 3
1 3
0 4
0 3
1 5
1 4
0 1
1 1
0 3
0 2
0 1
0 4
0 3
0 2
0 2
0 4
0 3
1 9
1 13
1 6
0 3
0 3
1 17
0 4
1 18
0 3
0 1
0 1
1 19
0 1
1 8
0 2
0 3
1 24
1 23
0 2
0 3
0 3
0 1
0 2
0 4
0 1
1 26
0 2
1 32
0 2
1 30
1 27
1 15
0 2
0 3
0 4
0 4
1 35
0 1
1 38
0 4
1 34
1 21
0 4
0 2
1 41
0 4
1 10
1 31
1 42
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #70:

score: 2
Accepted
time: 2ms
memory: 8436kb

input:

1
100
0 15
0 1
0 5
1 3
0 6
1 4
0 13
0 2
0 3
1 7
0 5
1 8
1 1
1 2
0 4
1 9
0 10
1 10
0 7
0 1
1 11
1 12
0 6
1 13
0 2
0 13
1 14
1 15
0 3
0 14
1 16
1 17
0 2
1 18
0 8
0 15
1 19
1 20
0 7
0 3
0 6
1 22
1 21
0 7
1 23
1 6
0 9
1 25
0 5
1 26
0 15
1 27
0 11
0 4
0 9
0 6
0 9
0 10
0 6
0 13
1 33
0 14
0 5
0 2
0 14
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #71:

score: 2
Accepted
time: 4ms
memory: 8036kb

input:

1
100
0 10
0 8
0 2
0 14
0 7
1 1
0 2
1 6
1 4
0 5
1 5
1 2
0 11
1 3
0 4
1 9
0 4
0 1
0 4
0 6
1 11
1 10
0 9
0 14
0 4
0 10
1 16
1 12
1 15
0 7
0 6
1 18
1 13
1 17
0 14
1 20
0 5
0 10
0 3
1 22
0 6
1 21
0 13
0 1
1 26
0 2
1 27
1 24
1 8
0 14
0 10
1 29
1 28
1 25
0 7
1 30
0 6
1 14
0 9
0 4
0 3
0 4
1 33
0 12
0 12
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Subtask #2:

score: 6
Accepted

Test #72:

score: 6
Accepted
time: 39ms
memory: 37792kb

input:

2
5000
0 2
0 1
0 3
1 3
0 4
1 4
0 3
1 5
0 1
0 2
1 7
1 1
0 2
0 3
0 3
1 9
1 8
1 10
0 1
1 11
0 2
0 4
1 12
0 4
0 4
0 3
1 14
1 15
0 1
1 13
0 3
0 3
1 2
0 4
0 3
1 21
0 1
1 22
1 20
1 6
1 16
1 19
0 3
1 23
0 4
0 1
0 1
1 25
1 18
1 17
0 4
0 4
0 1
0 4
0 2
1 31
1 28
1 27
0 4
1 32
1 29
1 26
0 4
1 33
0 2
0 3
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 4
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 4
...

result:

ok both questions correct

Test #73:

score: 6
Accepted
time: 29ms
memory: 32120kb

input:

2
5000
0 1
0 2
0 1
1 3
0 2
0 2
0 1
1 4
0 1
1 5
1 1
1 6
0 2
1 2
0 1
0 2
1 9
0 2
1 10
1 11
0 2
0 2
0 2
1 13
0 2
1 14
1 15
0 2
0 2
0 1
0 2
1 17
0 1
1 19
0 1
1 18
1 16
0 1
0 1
0 2
1 23
1 22
0 1
0 1
1 25
1 26
1 24
1 7
1 21
0 1
0 1
1 28
0 1
0 1
0 2
1 31
1 29
1 30
1 27
0 2
1 32
1 20
0 1
1 12
0 1
1 34
0 1
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 1
1 1
1...

result:

ok both questions correct

Test #74:

score: 6
Accepted
time: 37ms
memory: 33312kb

input:

2
5000
0 3
0 2
0 2
1 3
0 3
1 1
0 1
0 2
1 4
1 2
0 2
0 2
1 8
1 7
0 1
0 2
1 9
0 2
1 11
0 1
1 12
1 5
0 1
0 1
0 4
0 3
0 3
0 3
0 3
1 16
0 2
0 1
1 20
1 18
1 15
1 17
0 1
1 19
0 1
1 13
1 21
1 14
1 10
0 1
1 24
0 3
1 25
0 2
1 26
0 2
0 2
1 27
1 28
0 3
1 29
0 1
0 2
1 30
1 22
1 31
0 3
0 1
0 1
0 1
1 32
1 35
1 33
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
1 2
0 -1
1 3
0 -1
0 -1
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 2
0...

result:

ok both questions correct

Test #75:

score: 6
Accepted
time: 31ms
memory: 33764kb

input:

2
5000
0 3
0 1
0 1
0 1
1 3
0 1
1 1
0 1
0 1
0 3
0 2
1 7
1 6
0 2
1 9
0 2
0 4
1 11
1 2
0 2
1 13
1 5
1 12
1 10
0 1
1 14
0 1
1 15
0 3
0 2
1 16
1 17
0 2
1 18
0 1
1 19
0 2
0 2
0 1
0 1
1 21
1 22
0 1
0 2
0 2
1 24
0 2
0 2
1 23
1 25
0 3
1 28
0 2
1 30
0 1
0 1
0 2
0 2
0 2
0 3
0 1
1 31
1 35
0 1
1 33
0 1
1 34
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
...

result:

ok both questions correct

Test #76:

score: 6
Accepted
time: 50ms
memory: 34472kb

input:

2
5000
0 1
0 6
0 2
1 3
0 2
1 4
0 6
0 4
1 5
0 3
0 3
1 8
0 4
1 9
1 6
1 1
0 5
0 2
1 10
1 11
0 2
1 12
0 4
1 13
0 2
1 14
0 2
1 15
0 1
0 1
0 6
0 2
1 19
0 1
1 17
0 1
0 1
0 5
1 23
1 18
1 16
1 20
1 22
1 2
0 6
0 3
1 24
0 4
0 4
0 6
0 5
0 5
0 5
0 6
0 8
0 1
0 7
1 30
1 27
0 4
0 2
1 32
1 28
0 7
1 37
0 1
0 3
1 39
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -...

result:

ok both questions correct

Test #77:

score: 6
Accepted
time: 56ms
memory: 37480kb

input:

2
5000
0 3
0 1
0 2
1 2
0 6
0 6
1 1
1 3
0 2
0 3
1 6
1 7
0 7
1 8
0 7
0 3
1 10
1 9
0 8
1 11
0 3
1 5
0 7
1 12
0 4
1 14
0 2
0 1
0 3
0 2
1 18
1 15
0 6
0 6
1 19
1 16
0 1
1 21
0 5
0 3
0 7
0 3
1 23
1 24
0 1
0 5
1 27
1 25
0 5
0 2
0 9
1 30
0 1
1 31
1 26
1 29
1 22
0 2
1 17
1 32
0 1
0 2
0 2
0 3
0 3
1 37
1 36
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #78:

score: 6
Accepted
time: 73ms
memory: 33280kb

input:

2
5000
0 3
0 5
0 2
1 1
0 1
1 2
0 3
0 3
0 11
0 5
0 10
0 1
0 4
1 5
0 2
1 10
0 3
0 5
0 4
1 6
0 1
0 14
1 17
1 15
0 1
0 13
0 9
0 7
0 1
1 21
0 7
1 18
0 6
0 3
0 3
1 24
1 19
0 8
0 3
1 27
0 8
0 2
0 8
0 3
0 1
1 32
0 6
1 30
1 23
1 25
1 29
1 31
1 11
0 5
1 4
1 20
0 3
0 9
0 6
1 37
1 36
0 9
0 2
1 38
0 9
0 12
1 41
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #79:

score: 6
Accepted
time: 82ms
memory: 33988kb

input:

2
5000
0 1
0 8
0 10
1 2
0 5
1 1
0 9
0 9
0 6
1 7
1 3
1 5
0 7
0 3
1 9
1 8
0 8
0 9
1 11
0 11
1 12
1 6
0 9
0 4
1 13
0 12
0 8
0 1
1 17
0 10
0 3
1 19
1 15
1 14
1 16
1 10
0 2
0 1
1 20
0 6
1 22
0 11
1 23
1 18
0 2
0 10
0 8
0 2
1 26
0 9
0 11
1 25
1 28
0 6
1 30
0 4
0 7
0 2
1 31
1 33
0 2
1 34
0 5
0 5
1 36
1 29
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #80:

score: 6
Accepted
time: 99ms
memory: 34764kb

input:

2
5000
0 15
0 2
0 13
1 3
0 18
1 4
0 8
0 11
0 2
1 7
1 6
0 18
0 1
1 5
0 8
0 1
0 8
0 9
0 1
1 10
1 12
1 8
0 13
1 9
1 15
0 2
0 23
0 6
1 18
0 19
0 10
0 15
1 20
0 5
1 22
0 1
1 19
1 16
1 17
1 11
0 3
0 6
1 25
1 24
0 6
0 7
1 27
1 26
1 21
0 18
1 28
1 2
1 23
0 11
0 8
1 29
0 20
0 1
1 32
1 31
1 30
1 1
0 6
0 9
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #81:

score: 6
Accepted
time: 110ms
memory: 34848kb

input:

2
5000
0 11
0 20
0 3
1 1
0 4
0 17
1 5
1 2
0 16
1 4
0 24
0 9
1 8
1 7
0 4
1 9
0 11
0 3
1 10
0 17
1 11
1 12
0 1
1 3
0 16
1 14
0 14
1 15
0 13
1 16
0 23
0 4
1 17
0 15
1 19
1 18
0 17
0 15
1 21
0 17
0 20
0 3
1 24
0 8
1 22
0 22
1 26
1 20
0 9
1 27
1 23
0 11
1 28
1 25
0 8
1 6
0 24
0 11
0 1
1 32
0 1
1 33
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #82:

score: 6
Accepted
time: 21ms
memory: 32928kb

input:

2
5000
0 4
0 4
0 3
1 1
0 2
1 2
0 4
0 2
0 3
1 3
0 4
1 5
0 4
0 3
1 10
1 6
0 4
1 11
0 4
0 4
1 13
0 3
0 4
1 12
1 7
1 14
1 8
0 4
1 16
1 15
0 3
0 2
1 18
0 4
0 2
0 2
0 2
1 19
0 4
1 23
1 17
1 21
1 22
0 2
0 3
0 4
1 26
0 4
0 4
0 4
1 29
0 4
0 3
0 3
0 4
1 30
0 4
1 34
0 4
1 35
0 4
0 4
0 4
0 3
0 4
0 4
1 38
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #83:

score: 6
Accepted
time: 58ms
memory: 35852kb

input:

2
5000
0 2
0 2
0 3
1 1
0 4
0 2
0 4
1 3
0 4
0 1
1 2
0 1
0 3
1 10
0 4
0 2
0 2
0 1
0 3
1 12
0 3
0 3
1 14
1 16
0 4
1 13
0 2
1 18
0 4
0 3
0 2
0 2
1 23
1 19
1 15
1 9
1 20
1 6
0 4
0 4
0 4
1 25
1 24
0 3
0 4
1 26
1 27
0 2
0 1
0 2
1 30
1 29
0 3
1 7
1 4
1 17
1 5
1 32
1 31
1 22
1 21
1 28
0 4
1 33
0 4
1 34
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #84:

score: 6
Accepted
time: 30ms
memory: 32100kb

input:

2
5000
0 4
0 4
0 3
1 3
0 4
1 4
0 3
1 1
0 3
0 2
1 2
1 5
0 4
1 8
0 4
1 6
0 2
0 2
1 11
1 10
0 4
1 12
0 4
0 4
0 3
0 4
0 4
0 4
0 4
1 15
0 3
1 20
1 18
1 16
1 14
0 4
0 2
0 4
1 21
0 4
0 3
1 24
1 25
1 22
1 9
0 2
0 4
0 4
1 28
1 26
0 4
0 3
1 30
1 29
0 4
1 31
0 4
1 32
0 4
1 33
0 4
1 34
0 4
0 3
0 3
1 35
0 4
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 ...

result:

ok both questions correct

Test #85:

score: 6
Accepted
time: 73ms
memory: 39220kb

input:

2
5000
0 9
0 5
0 9
1 3
0 9
1 4
0 7
1 1
0 8
0 9
1 2
1 5
0 6
1 7
0 6
1 9
0 8
0 5
1 10
0 8
0 8
1 12
1 13
1 11
0 4
1 14
0 9
0 8
1 15
1 16
0 6
1 17
0 9
1 18
0 9
1 8
0 9
0 5
1 20
0 5
0 9
1 23
0 4
0 6
1 24
0 5
1 21
1 26
1 22
0 9
0 6
0 5
0 8
0 6
0 9
1 31
1 28
1 27
1 32
1 30
1 25
0 9
1 33
1 29
0 8
0 8
0 8
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 9
0 -1
1 9
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 8
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #86:

score: 6
Accepted
time: 88ms
memory: 34528kb

input:

2
5000
0 8
0 3
0 9
0 9
1 1
0 9
0 9
1 2
0 7
1 4
0 8
0 8
1 6
0 9
0 8
0 8
0 8
0 8
0 9
0 6
0 7
0 4
0 8
1 16
1 5
0 9
0 9
1 18
0 8
1 12
1 19
0 9
1 22
0 8
1 24
1 10
1 21
1 17
0 6
0 9
1 25
0 7
0 7
1 28
0 8
1 29
1 15
1 27
1 11
1 3
0 8
0 7
1 30
1 31
0 9
0 7
1 33
0 7
0 8
0 7
0 7
1 35
1 32
0 9
0 9
0 3
0 8
0 6
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 8
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
1 8
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #87:

score: 6
Accepted
time: 132ms
memory: 33904kb

input:

2
5000
0 11
0 7
0 10
0 14
1 2
1 1
0 13
1 5
0 13
1 6
0 12
0 15
1 7
0 5
0 10
1 9
1 10
0 9
1 11
0 15
1 12
0 13
0 12
1 4
1 14
0 7
1 15
0 14
0 15
0 7
0 11
0 15
1 20
0 13
1 16
0 10
0 14
0 15
1 21
0 10
1 25
0 10
1 22
1 26
1 18
0 11
1 27
0 15
1 28
0 10
1 29
0 4
1 24
1 30
0 9
0 12
1 31
1 32
1 23
1 17
1 13
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #88:

score: 6
Accepted
time: 91ms
memory: 34212kb

input:

2
5000
0 10
0 15
0 11
1 2
0 6
0 14
0 8
0 11
1 6
0 14
0 7
0 15
1 10
1 7
0 15
1 11
1 1
1 8
0 15
0 11
0 13
1 13
0 12
0 12
1 15
1 5
0 15
1 4
1 3
0 13
1 14
0 15
1 17
1 19
1 9
1 12
0 10
0 4
1 21
1 20
0 6
0 5
1 23
1 18
0 13
0 13
1 24
1 25
0 12
0 12
0 10
0 12
0 14
1 28
0 13
0 7
1 31
0 14
1 32
1 26
1 29
0 7
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #89:

score: 6
Accepted
time: 80ms
memory: 34464kb

input:

2
5000
0 29
0 27
0 24
1 2
0 9
1 3
0 28
1 5
0 27
1 4
0 15
0 29
1 8
1 7
0 30
1 9
0 14
0 23
0 30
0 27
1 11
0 30
0 30
0 27
1 13
0 12
1 12
1 16
1 10
0 30
0 15
1 18
0 28
0 23
1 20
0 28
1 22
1 17
1 6
1 19
1 14
1 15
0 20
1 23
0 21
1 24
0 19
0 16
0 16
0 29
0 14
1 27
1 29
0 26
1 25
1 28
0 17
1 31
1 30
1 21
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #90:

score: 6
Accepted
time: 93ms
memory: 36592kb

input:

2
5000
0 25
0 28
0 23
0 25
0 27
1 1
1 5
1 4
0 27
0 18
0 17
0 20
1 6
1 2
1 3
0 28
0 29
1 11
1 8
0 17
1 12
1 7
0 24
1 13
0 22
0 14
0 29
1 15
0 26
0 26
0 21
0 23
0 28
1 18
0 24
0 16
0 26
1 23
0 23
0 27
1 26
1 22
0 17
1 17
0 30
1 28
1 24
1 14
1 20
1 25
1 27
0 16
1 29
1 19
1 16
1 21
0 27
1 30
0 22
0 21
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 25
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #91:

score: 6
Accepted
time: 109ms
memory: 32516kb

input:

2
5000
0 38
0 25
0 43
0 40
0 42
1 3
0 18
0 50
0 21
1 7
1 5
1 1
1 6
1 4
0 31
1 9
0 36
1 8
0 44
0 40
0 35
0 40
1 12
0 50
1 15
1 14
0 45
1 13
1 16
0 50
1 17
0 48
0 32
0 46
1 20
0 21
0 38
0 45
0 41
1 21
0 28
0 40
1 18
1 24
1 25
0 37
0 32
1 27
1 19
0 45
1 29
1 23
1 22
1 26
1 2
1 28
0 28
0 40
0 36
0 25
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 38
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #92:

score: 6
Accepted
time: 94ms
memory: 33148kb

input:

2
5000
0 49
0 33
0 42
1 2
0 43
1 1
0 48
0 35
0 44
1 4
0 50
1 8
0 43
1 5
0 44
1 10
0 49
0 44
1 12
1 11
0 31
1 13
1 3
1 9
0 49
1 14
0 34
0 26
0 40
0 37
1 15
0 43
0 44
1 16
0 29
0 39
1 22
1 17
1 18
0 26
1 19
0 46
1 24
0 46
0 36
0 48
0 46
1 26
0 28
0 42
0 29
0 50
1 30
1 25
1 32
0 34
1 33
0 49
0 42
1 29
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 49
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #93:

score: 6
Accepted
time: 58ms
memory: 34436kb

input:

2
5000
0 9
0 7
0 9
0 5
0 10
1 4
0 9
0 7
1 2
1 7
1 5
0 10
0 8
1 8
0 6
0 10
1 11
0 9
1 12
1 10
0 10
0 9
0 9
1 15
0 10
0 6
1 13
1 14
1 17
1 16
0 3
1 18
0 8
0 9
1 19
0 10
0 9
1 21
1 22
0 10
1 23
1 20
1 6
1 1
0 10
0 9
1 25
0 10
0 8
1 26
1 27
0 10
0 9
1 29
1 28
1 24
0 8
0 10
1 31
1 30
0 6
0 10
1 32
0 9
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 9
0 -1
1 9
0 -1
0 -1
0 -1
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
1 9
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #94:

score: 6
Accepted
time: 43ms
memory: 37960kb

input:

2
5000
0 2
0 4
0 3
1 2
0 3
1 3
0 1
0 4
0 2
1 5
1 6
1 7
0 4
1 8
0 2
1 9
0 4
1 10
0 2
0 3
1 12
1 11
0 3
1 13
0 3
0 3
0 1
1 16
1 14
0 4
0 2
1 15
1 17
0 4
1 1
1 18
0 4
1 20
0 4
1 21
0 3
1 22
0 4
1 23
0 1
0 4
0 4
0 4
0 2
0 2
1 24
1 28
1 25
1 26
1 29
1 27
0 4
0 1
1 31
0 4
1 32
1 30
0 3
1 33
0 1
0 4
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 3
0 -1
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1...

result:

ok both questions correct

Test #95:

score: 6
Accepted
time: 71ms
memory: 33888kb

input:

2
5000
0 13
0 10
0 15
0 14
0 17
0 17
0 17
1 2
0 17
1 8
0 13
0 9
1 9
1 7
0 8
1 11
1 6
1 4
1 5
1 1
0 15
0 18
1 13
0 14
0 15
0 15
0 10
1 15
1 12
1 16
0 15
1 14
1 17
1 10
0 17
1 19
0 16
1 20
0 18
1 21
0 16
0 18
0 18
0 9
1 22
0 16
0 14
1 27
1 24
0 11
1 28
1 23
1 25
1 18
0 17
1 29
0 18
0 18
0 14
0 12
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 17
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
0 -1
1 15
0 -1
1 15
1 15
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #96:

score: 6
Accepted
time: 52ms
memory: 37452kb

input:

2
5000
0 38
0 37
0 37
1 1
0 38
0 34
0 36
0 39
1 7
0 39
0 40
0 40
0 38
0 40
0 39
1 10
1 9
1 4
0 38
1 6
0 39
1 11
0 39
0 38
0 32
1 16
1 3
0 38
1 19
0 40
1 20
0 35
1 21
0 39
1 22
0 32
0 36
0 40
1 25
1 24
0 39
0 39
0 39
1 27
0 39
1 28
1 29
1 26
1 15
1 18
1 13
0 38
0 39
0 39
0 39
0 40
1 32
0 40
0 38
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 38
0 -1
1 37
1 37
1 37
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #97:

score: 6
Accepted
time: 86ms
memory: 33540kb

input:

2
5000
0 110
0 110
0 109
0 106
0 104
0 110
0 106
0 107
0 109
0 108
1 5
0 106
1 8
1 3
0 109
0 109
0 108
0 105
0 108
1 15
0 108
0 106
0 110
0 110
0 103
0 110
0 98
1 21
1 19
0 110
0 109
1 22
0 109
0 104
0 110
0 109
0 103
1 28
1 16
1 1
0 107
1 31
0 107
0 108
0 110
1 4
0 100
1 35
0 94
1 36
1 25
0 93
0 10...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 110
1 110
1 110
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #98:

score: 6
Accepted
time: 44ms
memory: 32996kb

input:

2
5000
0 27
0 26
0 29
1 1
0 30
0 28
1 4
1 3
0 30
0 29
0 30
1 8
1 7
0 30
0 28
1 9
1 10
0 30
0 30
0 30
1 12
1 2
1 5
0 27
0 29
1 14
0 30
1 11
1 13
1 15
0 29
1 17
0 30
1 18
0 27
0 30
1 19
0 27
0 28
0 25
1 21
1 22
0 29
1 23
1 20
0 30
1 25
1 24
0 30
1 26
0 30
1 27
0 30
0 30
0 30
1 29
1 30
1 16
0 29
0 29
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1...

result:

ok both questions correct

Test #99:

score: 6
Accepted
time: 66ms
memory: 33676kb

input:

2
5000
0 3
0 1
0 1
0 2
1 2
0 5
1 5
0 1
0 11
0 3
1 7
0 3
0 13
1 10
1 8
1 6
0 2
1 3
0 18
1 4
1 12
1 9
0 3
0 12
1 14
0 8
0 5
1 16
1 15
1 13
0 5
0 2
0 2
1 17
1 11
1 1
0 1
1 20
0 1
0 5
0 2
0 4
0 1
1 23
0 7
0 3
0 13
0 1
1 22
1 29
1 21
0 2
1 24
1 27
1 26
1 25
1 28
0 10
1 31
1 30
0 6
1 32
0 1
1 33
0 3
0 1
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 3
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #100:

score: 6
Accepted
time: 66ms
memory: 33980kb

input:

2
5000
0 10
0 3
0 10
1 1
0 1
0 1
1 4
0 2
0 6
1 2
0 3
1 6
1 8
1 3
0 6
0 9
0 3
1 10
1 9
1 5
0 1
1 12
0 3
0 1
1 14
1 11
0 5
0 3
0 1
1 16
1 17
1 15
0 9
0 4
0 1
0 12
1 21
1 20
1 18
0 1
1 19
0 2
1 22
1 23
0 6
0 3
1 24
0 1
1 26
0 3
0 2
1 28
1 27
0 2
1 29
0 1
0 1
1 30
1 7
0 1
1 32
0 2
0 3
1 33
1 34
0 1
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 10
0 -1
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 3
0...

result:

ok both questions correct

Test #101:

score: 6
Accepted
time: 60ms
memory: 34400kb

input:

2
5000
0 1
0 4
0 4
0 2
1 1
0 6
0 1
1 5
0 5
0 6
0 2
0 3
1 10
1 9
1 4
1 7
1 3
0 6
0 10
0 5
1 11
1 12
0 4
0 1
1 14
0 11
1 16
1 15
1 2
0 3
1 17
1 13
0 4
1 18
0 5
1 19
0 5
0 2
1 21
0 8
0 1
0 2
0 2
1 22
0 8
1 26
1 23
0 1
0 1
1 28
0 2
1 20
0 1
0 1
1 31
0 2
0 4
1 30
0 1
1 32
0 2
0 3
1 34
1 29
1 35
1 24
1 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #102:

score: 6
Accepted
time: 111ms
memory: 33860kb

input:

2
5000
0 1
0 15
0 22
1 2
0 6
1 4
0 8
1 5
0 14
0 38
0 5
1 8
0 44
0 19
0 14
1 7
1 11
1 10
0 3
0 57
1 12
0 8
0 13
0 8
1 14
0 16
1 16
0 1
1 18
1 1
1 13
1 9
1 3
0 4
1 19
0 20
1 20
0 37
0 14
0 3
1 21
1 23
0 8
0 10
0 24
1 26
1 25
0 6
0 11
1 28
0 9
1 27
1 29
1 24
0 2
1 30
1 15
1 22
0 37
0 11
1 17
1 32
0 5
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #103:

score: 6
Accepted
time: 83ms
memory: 33200kb

input:

2
5000
0 4
0 4
0 27
0 20
1 2
1 3
0 18
0 34
1 6
1 5
0 3
1 7
0 8
1 4
0 5
0 4
0 1
1 10
0 41
1 12
0 42
0 2
0 3
1 14
1 8
1 13
0 8
1 16
0 8
0 41
0 8
1 18
0 1
1 17
1 20
1 15
1 9
0 8
0 31
0 5
1 23
1 22
0 22
0 18
1 24
0 19
0 13
1 27
0 12
1 28
0 5
0 12
1 30
1 29
1 26
0 38
1 31
0 3
0 33
0 5
1 32
0 18
1 35
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #104:

score: 6
Accepted
time: 128ms
memory: 32884kb

input:

2
5000
0 9
0 28
0 10
0 61
0 11
0 20
0 16
0 10
1 2
1 7
1 4
0 1
1 3
0 15
0 2
0 22
0 3
0 2
0 14
0 1
0 2
0 3
0 12
0 11
1 10
0 4
1 12
0 10
1 11
1 20
1 8
0 10
1 16
1 14
1 13
1 5
1 15
1 19
0 18
1 24
1 18
1 1
1 21
1 17
1 23
0 4
0 21
1 26
0 5
0 4
0 3
0 17
1 28
1 29
1 27
1 25
1 30
0 6
1 31
0 8
0 7
0 25
0 23
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #105:

score: 6
Accepted
time: 84ms
memory: 37904kb

input:

2
5000
0 3
0 4
0 5
1 1
0 7
1 3
0 5
0 2
1 6
0 8
0 8
1 8
0 9
1 9
0 2
1 10
1 2
0 2
0 6
0 6
1 13
0 8
0 7
0 4
0 6
1 17
1 15
1 5
1 16
1 12
0 9
1 18
0 3
0 6
0 9
1 20
0 6
0 7
1 19
1 23
1 21
1 4
1 14
0 1
0 5
1 25
1 22
0 8
1 26
1 7
0 2
1 27
0 5
1 28
0 7
0 7
0 1
0 4
0 7
0 8
1 30
1 31
1 32
0 8
1 35
1 29
1 34
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #106:

score: 6
Accepted
time: 92ms
memory: 32656kb

input:

2
5000
0 19
0 9
0 9
0 10
1 2
0 2
1 4
0 5
0 43
0 3
1 7
1 6
1 8
1 3
0 9
1 9
0 19
1 10
0 4
0 14
1 12
1 11
0 6
1 1
0 19
0 2
0 5
1 16
0 1
1 17
0 36
1 18
0 9
1 19
0 8
1 20
0 31
1 21
1 15
1 5
0 4
1 22
0 2
1 23
0 51
1 24
0 16
0 8
0 29
1 25
1 27
0 9
1 28
0 3
1 29
1 26
0 11
0 6
0 2
1 30
0 22
1 33
0 3
0 24
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 19
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 19
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #107:

score: 6
Accepted
time: 109ms
memory: 36116kb

input:

2
5000
0 31
0 24
0 7
0 13
1 3
1 2
0 2
0 4
0 5
1 4
1 1
1 5
0 32
1 8
0 32
1 9
0 5
0 12
0 4
0 1
0 5
0 1
1 10
0 4
1 13
1 11
1 14
1 16
1 15
0 8
1 12
0 42
1 18
1 7
0 10
1 19
0 14
1 20
0 31
1 21
0 2
1 22
0 2
0 36
0 25
1 25
0 6
0 1
1 27
0 2
1 24
1 28
0 21
0 3
0 16
1 29
0 26
0 26
0 2
0 4
1 34
0 5
0 4
0 78
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 31
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #108:

score: 6
Accepted
time: 84ms
memory: 32536kb

input:

2
5000
0 2
0 4
0 7
0 17
1 3
0 4
0 5
0 3
1 6
0 1
0 11
1 1
1 7
1 9
1 5
1 4
0 22
1 10
0 40
1 11
0 3
0 11
1 12
0 3
0 11
1 15
0 2
1 16
1 13
1 14
0 25
0 14
0 2
1 18
0 30
1 20
0 1
0 21
0 51
1 22
0 1
1 19
1 24
0 15
0 23
1 26
0 36
1 27
0 26
0 11
0 23
1 29
1 28
0 6
1 30
1 31
1 17
0 16
1 32
0 3
1 33
0 25
1 34
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #109:

score: 6
Accepted
time: 79ms
memory: 37232kb

input:

2
5000
0 4
0 11
0 9
0 11
1 2
0 6
1 5
0 4
1 6
1 3
0 4
1 1
0 6
0 5
1 9
1 8
0 4
0 1
1 10
1 11
0 4
1 12
0 2
0 2
0 17
1 13
0 10
1 15
1 14
1 16
0 2
1 17
0 5
1 18
0 19
1 19
0 8
0 4
0 9
1 21
1 22
0 2
1 23
1 20
0 3
1 24
0 2
1 25
0 3
1 26
0 8
0 12
0 3
1 29
0 19
1 28
1 30
0 8
0 10
1 32
1 31
0 8
1 27
1 33
0 3
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #110:

score: 6
Accepted
time: 79ms
memory: 33724kb

input:

2
5000
0 7
0 2
0 8
1 2
0 8
1 4
0 9
0 4
1 5
1 1
0 2
1 7
0 2
0 2
0 1
1 9
1 3
1 8
0 9
0 6
0 10
1 13
1 11
1 12
0 2
0 26
1 14
0 4
1 16
0 15
0 13
1 17
1 18
1 15
0 1
1 19
0 8
1 20
0 12
0 5
0 9
1 21
0 18
1 22
1 24
0 7
0 1
0 10
0 2
0 4
0 3
0 5
1 25
0 7
0 1
1 27
1 31
1 28
1 29
0 1
1 33
0 2
1 23
1 32
1 30
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 7
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #111:

score: 6
Accepted
time: 97ms
memory: 34232kb

input:

2
5000
0 9
0 4
0 1
0 14
0 36
1 5
1 1
1 4
0 12
0 16
1 3
1 6
0 24
1 8
0 4
0 29
0 18
0 16
0 2
0 4
0 3
1 9
1 11
0 8
1 12
0 14
1 17
1 13
1 10
0 7
0 13
1 19
1 14
1 2
0 10
1 20
1 7
1 18
0 11
1 21
0 64
1 22
0 17
1 23
0 23
0 2
0 10
1 25
0 7
0 8
1 28
1 26
1 24
0 3
0 5
1 29
0 1
0 9
0 2
1 31
0 7
0 7
1 35
1 33
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #112:

score: 6
Accepted
time: 95ms
memory: 32748kb

input:

2
5000
0 15
0 12
0 54
0 19
0 8
0 14
0 39
1 3
1 4
0 3
0 9
1 1
1 5
1 8
1 6
0 13
0 13
1 11
1 10
0 26
0 2
1 12
0 14
1 14
0 5
0 31
1 16
0 25
0 28
0 8
1 18
1 19
0 19
0 9
0 41
1 22
1 17
0 8
1 23
1 21
0 17
0 7
1 25
1 20
1 13
0 8
1 26
1 2
1 15
0 2
0 8
0 1
1 29
0 18
1 30
0 5
1 31
0 4
1 32
1 27
1 9
1 7
0 15
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #113:

score: 6
Accepted
time: 121ms
memory: 36156kb

input:

2
5000
0 484
0 472
0 474
1 2
0 496
0 490
0 499
0 496
0 495
1 6
1 4
0 498
1 9
1 8
0 497
1 10
1 3
0 497
0 493
0 498
0 493
1 11
1 13
0 490
1 12
1 14
1 15
0 479
1 16
0 500
0 481
1 18
0 498
1 19
0 500
1 17
0 500
1 21
0 496
1 22
0 492
0 493
0 494
0 494
0 489
1 26
1 23
0 500
0 497
1 27
1 24
0 500
0 493
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 484
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #114:

score: 6
Accepted
time: 88ms
memory: 33324kb

input:

2
5000
0 427
0 497
0 479
1 2
0 491
1 3
0 490
0 482
0 496
1 5
0 498
0 491
0 491
1 8
1 7
1 9
1 6
1 4
0 500
1 11
0 490
1 12
0 494
0 487
1 13
1 1
0 484
1 15
0 492
1 16
0 498
1 17
0 486
1 10
0 500
1 19
0 489
0 481
1 21
0 487
1 20
1 22
0 490
1 23
0 496
1 24
0 496
0 481
0 486
1 26
1 14
1 18
0 493
0 493
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 427
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 491
0 -1
1 491
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 487
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #115:

score: 6
Accepted
time: 116ms
memory: 35648kb

input:

2
5000
0 500
0 497
0 495
1 1
0 495
1 3
0 499
0 495
0 497
0 493
1 7
1 5
0 500
0 497
0 500
0 499
1 10
1 12
0 498
0 497
0 500
0 499
1 13
1 16
1 14
0 500
0 499
0 499
0 496
1 20
1 9
0 499
0 497
1 22
0 500
0 493
0 495
1 24
0 487
1 23
1 21
0 494
1 17
1 25
1 11
0 500
1 28
0 496
0 496
1 30
0 497
1 31
1 6
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 500
0 -1
0 -1
0 -1
1 495
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #116:

score: 6
Accepted
time: 70ms
memory: 34496kb

input:

2
5000
0 8
0 6
0 2
1 2
0 2
0 3
1 5
1 4
0 9
0 8
1 7
1 6
0 6
1 8
0 3
0 3
1 10
1 1
0 8
0 2
1 11
0 6
0 3
0 1
1 12
1 14
0 9
0 1
0 2
0 7
1 16
1 18
1 13
0 5
0 6
0 5
0 3
1 20
0 5
1 22
1 24
0 9
0 4
1 25
0 3
1 27
0 2
0 5
1 28
1 29
1 23
0 7
0 9
0 4
0 4
0 4
0 3
1 33
0 8
1 35
1 34
0 3
0 9
1 37
0 9
0 2
1 39
1 30
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 8
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #117:

score: 6
Accepted
time: 65ms
memory: 36360kb

input:

2
5000
0 499
0 500
0 496
1 3
0 497
0 500
1 4
0 497
1 6
1 2
0 499
1 1
0 500
0 500
1 8
1 5
0 497
1 10
0 497
1 11
0 496
1 12
0 500
0 497
0 500
0 500
0 487
1 16
0 499
1 13
1 18
1 15
1 7
1 14
0 499
1 19
0 500
0 499
1 21
0 500
1 22
1 20
0 500
0 500
0 500
1 25
1 23
1 24
0 500
1 26
0 500
0 499
1 28
1 27
0 5...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
1 499
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
1 500
1 500
0 -1
1 500
...

result:

ok both questions correct

Test #118:

score: 6
Accepted
time: 50ms
memory: 33244kb

input:

2
5000
0 499
0 498
0 498
1 1
0 496
0 497
0 499
1 2
1 4
1 5
0 500
1 7
0 496
0 498
0 500
1 9
0 499
1 11
0 500
1 12
0 500
0 500
1 14
0 497
1 15
1 10
0 496
0 499
0 499
0 500
0 500
0 498
0 500
1 16
1 17
0 489
0 499
1 22
1 19
0 500
1 25
0 497
0 494
1 27
1 18
0 495
1 28
0 498
1 29
1 24
1 21
0 495
1 30
1 23...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 499
0 -1
1 498
1 498
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #119:

score: 6
Accepted
time: 41ms
memory: 33328kb

input:

2
5000
0 498
0 500
0 498
0 497
0 500
0 500
1 2
0 499
1 5
1 6
1 4
0 499
0 500
1 9
1 8
1 7
0 498
1 3
0 500
0 500
1 11
0 499
1 13
1 12
0 500
1 14
0 499
1 15
0 499
1 16
0 499
0 493
1 17
0 498
0 500
1 1
1 10
0 498
0 500
1 22
1 21
1 20
0 500
1 23
0 500
1 24
0 499
0 500
1 25
1 26
0 500
0 499
0 500
1 29
1 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 498
0 -1
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 498
0 -1
0 -1
0 -1
1 498
1 498
1 498
1 498
1 498
0 -1
1 498
0 -1
1 498
1 498
1 498
1 498
1 498
1 498
1 498
1 498
1 498
0 -1
1 498
1 498
1 498
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #120:

score: 6
Accepted
time: 44ms
memory: 33768kb

input:

2
5000
0 5
0 1
0 2
0 7
1 1
0 4
0 1
1 3
1 5
1 4
0 2
0 1
0 1
1 7
1 2
0 2
0 1
0 6
0 1
0 2
1 14
0 1
0 1
1 16
1 12
0 1
1 15
0 1
0 1
0 1
1 10
0 1
1 21
1 11
1 13
1 17
1 9
0 1
1 22
1 18
0 2
1 20
1 23
0 3
0 2
0 1
1 24
1 25
0 2
0 1
1 28
1 27
1 19
1 8
0 1
1 29
0 1
0 5
0 2
1 31
0 1
1 33
1 30
1 32
0 2
1 34
0 1
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -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 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 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
...

result:

ok both questions correct

Test #121:

score: 6
Accepted
time: 39ms
memory: 33004kb

input:

2
5000
0 1
0 3
0 2
0 1
1 3
1 1
0 1
0 2
1 4
0 1
1 2
0 1
0 2
0 3
1 10
0 5
0 1
1 11
1 8
0 1
0 6
1 14
0 2
1 9
1 6
0 2
0 1
1 17
1 16
0 2
1 18
0 2
0 1
0 2
0 1
0 1
1 20
0 1
0 1
1 24
1 25
1 23
1 15
1 21
0 2
1 26
1 12
1 19
0 1
1 27
0 1
0 7
0 1
1 28
0 1
0 2
0 3
0 1
1 32
1 31
0 1
0 3
1 35
0 3
1 33
1 34
1 37
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -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 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 1
1 1
1 1
1 1
1 ...

result:

ok both questions correct

Test #122:

score: 6
Accepted
time: 63ms
memory: 57276kb

input:

2
5000
0 4999
0 4999
0 4999
0 4999
0 1459
0 780
0 4999
0 4999
0 4999
0 4999
0 4999
0 1646
0 4999
0 4999
0 1909
0 1645
0 4999
0 4999
0 1271
0 49
0 4999
0 1765
0 2471
0 997
0 4999
0 515
0 797
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 4999
0 1948
0 4999
0 1938
0 4999
0 499...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
1 4999
...

result:

ok both questions correct

Test #123:

score: 6
Accepted
time: 6ms
memory: 39528kb

input:

2
5000
0 648
1 1
0 2926
1 2
0 1100
1 3
0 3813
1 4
0 3649
1 5
0 935
1 6
0 205
1 7
0 2370
1 8
0 2844
1 9
0 1517
1 10
0 1826
1 11
0 807
1 12
0 722
1 13
0 4953
1 14
0 1821
1 15
0 3989
1 16
0 2453
1 17
0 1279
1 18
0 2650
1 19
0 4708
1 20
0 4677
1 21
0 409
1 22
0 4516
1 23
0 2550
1 24
0 2990
1 25
0 3107
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 0
1 648
0 -1
1 2926
0 -1
1 1100
0 -1
1 3813
0 -1
1 3649
0 -1
1 935
0 -1
1 205
0 -1
1 2370
0 -1
1 2844
0 -1
1 1517
0 -1
1 1826
0 -1
1 807
0 -1
1 722
0 -1
1 4953
0 -1
1 1821
0 -1
1 3989
0 -1
1 2453
0 -1
1 1279
0 -1
1 2650
0 -1
1 4708
0...

result:

ok both questions correct

Test #124:

score: 6
Accepted
time: 72ms
memory: 46208kb

input:

2
5000
0 2309
0 2174
0 1880
0 2089
0 415
0 1149
0 464
0 2335
0 4999
0 1682
0 2436
0 4999
1 4
1 1
0 4999
0 4999
0 4999
1 10
0 4999
1 2
0 1071
0 2147
1 14
0 4999
0 2384
1 19
0 4999
0 4999
0 395
0 4999
0 150
0 4999
0 4999
0 4999
0 2180
1 24
0 4999
0 8
0 4999
1 31
0 1018
0 4999
0 1628
0 4999
1 33
0 2398...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2309
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4999
0 ...

result:

ok both questions correct

Test #125:

score: 6
Accepted
time: 38ms
memory: 33284kb

input:

2
5000
0 2
0 4
0 2
0 4
1 2
0 1
1 5
0 1
1 1
0 1
1 6
0 3
0 3
0 2
0 3
1 8
1 9
0 4
1 3
0 3
0 4
1 14
0 1
1 15
0 3
1 16
1 7
1 11
0 1
0 3
0 4
0 3
1 17
0 3
1 21
0 1
0 4
0 2
1 23
1 19
0 1
1 25
0 4
0 3
1 27
0 3
0 1
1 29
1 26
0 4
1 30
0 3
1 31
1 22
1 20
0 2
1 32
1 24
0 2
1 28
0 4
1 34
0 3
0 3
0 1
1 35
1 36
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #126:

score: 6
Accepted
time: 43ms
memory: 33612kb

input:

2
5000
0 2
0 1
0 2
0 4
1 1
1 2
0 3
0 3
1 6
1 3
0 2
0 4
1 8
0 1
0 4
0 3
0 2
1 4
0 1
1 7
0 4
1 5
0 1
0 1
1 16
0 1
1 15
1 9
1 12
1 13
1 17
0 4
1 18
0 4
0 1
1 19
1 20
1 14
0 4
1 21
0 1
0 3
0 3
1 22
1 11
0 4
0 4
0 4
1 27
1 26
1 25
1 10
0 4
1 28
0 2
1 29
0 3
1 30
0 2
1 31
0 4
1 32
0 4
0 1
0 2
0 4
1 36
0 2...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
0 -1
1 4
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
1 4
1 4
1 4
0...

result:

ok both questions correct

Test #127:

score: 6
Accepted
time: 72ms
memory: 37996kb

input:

2
5000
0 3
0 7
0 8
1 1
0 1
1 4
0 8
1 5
0 7
1 6
0 8
0 2
1 7
1 8
0 4
1 3
0 7
0 8
1 11
1 10
0 5
0 5
0 2
0 9
1 12
1 9
1 2
1 14
0 1
0 2
0 9
0 6
0 4
1 16
1 20
0 1
0 5
0 7
0 9
0 9
0 7
1 23
0 4
0 7
0 1
1 26
0 1
0 3
0 5
1 21
0 6
1 25
1 29
1 24
0 4
1 34
0 8
0 4
1 36
1 31
1 27
1 22
0 7
1 37
0 8
1 38
1 17
1 30
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 7
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #128:

score: 6
Accepted
time: 56ms
memory: 33304kb

input:

2
5000
0 6
0 8
0 2
0 8
0 6
1 3
1 2
0 3
0 7
1 7
1 6
0 6
1 8
1 1
0 1
0 3
0 4
0 3
1 9
1 12
0 2
0 2
1 14
1 13
1 10
0 3
1 15
1 5
0 5
0 1
1 16
0 6
0 7
0 5
1 19
0 8
0 4
0 1
0 6
1 22
1 21
0 3
1 23
1 25
1 20
0 3
1 26
1 11
1 24
0 5
0 6
1 27
0 8
1 29
0 8
0 8
1 30
0 6
1 31
1 4
0 3
1 33
0 1
1 34
0 5
0 2
0 5
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #129:

score: 6
Accepted
time: 39ms
memory: 33196kb

input:

2
5000
0 2
0 6
0 6
1 2
0 5
0 7
0 8
1 1
1 4
0 6
0 3
0 5
1 9
0 5
1 5
0 6
1 7
1 8
0 6
1 12
1 6
0 1
1 13
0 6
0 5
0 8
0 2
1 14
1 15
0 1
0 4
0 5
1 17
0 3
1 19
0 8
0 1
1 22
0 6
1 24
1 18
1 16
0 4
0 1
0 8
1 25
0 7
1 27
1 26
1 28
0 5
0 4
0 6
1 30
0 1
0 4
0 6
1 32
1 34
1 33
0 3
0 7
1 36
0 1
0 6
1 37
0 8
1 39
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
1 6
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #130:

score: 6
Accepted
time: 68ms
memory: 33580kb

input:

2
5000
0 30
0 1
0 21
1 2
0 19
1 3
0 29
1 5
0 12
1 6
0 25
0 22
0 19
0 15
1 10
0 27
1 8
0 16
1 12
1 7
0 24
1 1
0 27
0 9
1 14
0 23
1 4
1 16
1 11
0 16
1 9
0 28
1 18
1 15
0 18
0 18
0 32
1 19
0 2
0 18
0 14
0 25
0 20
1 22
0 32
1 23
1 27
0 22
0 22
0 6
1 29
0 3
0 6
1 32
0 5
1 31
1 33
0 25
1 21
0 24
0 9
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #131:

score: 6
Accepted
time: 107ms
memory: 35692kb

input:

2
5000
0 10
0 7
0 9
1 3
0 18
0 31
1 1
0 4
0 31
1 5
1 2
0 3
1 6
1 7
0 16
0 31
1 9
0 27
0 8
0 16
1 10
0 7
1 13
0 30
0 2
1 16
0 9
0 7
0 9
1 17
0 18
1 20
1 19
0 13
1 21
0 16
0 2
0 16
0 20
1 24
0 17
1 25
0 28
1 27
1 23
0 25
0 3
1 22
1 28
1 29
1 8
1 12
1 26
0 7
0 26
1 30
1 31
1 18
1 4
0 1
0 20
0 26
0 31
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #132:

score: 6
Accepted
time: 44ms
memory: 34644kb

input:

2
5000
0 3
0 2
0 3
1 2
0 3
0 4
1 4
0 4
0 1
0 2
0 3
1 6
1 8
0 1
0 3
0 1
1 7
0 4
0 3
0 2
1 12
0 2
1 11
0 2
0 1
1 17
1 10
0 3
1 19
1 13
1 15
0 1
1 20
1 5
1 1
1 14
1 9
1 3
0 1
0 3
0 2
1 22
0 2
1 23
0 3
1 25
0 3
0 4
1 27
0 3
1 24
1 26
1 21
1 28
0 1
1 29
0 3
0 3
0 1
1 31
1 18
1 30
0 2
0 4
0 3
1 35
0 2
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #133:

score: 6
Accepted
time: 41ms
memory: 35764kb

input:

2
5000
0 3
0 4
0 3
1 2
0 3
1 4
0 3
0 2
1 6
0 4
0 1
1 5
1 3
1 1
0 3
1 9
0 4
1 10
0 2
0 1
0 3
0 4
1 11
0 4
1 14
1 12
0 4
0 4
0 4
0 3
0 3
1 16
0 3
1 13
1 19
0 1
1 22
0 1
1 23
1 21
0 4
0 4
1 17
1 18
0 3
1 15
1 25
0 1
0 4
0 1
1 29
1 28
1 27
1 7
1 20
0 2
1 30
0 4
0 3
1 32
1 31
1 24
0 2
0 4
0 2
0 2
1 35
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #134:

score: 6
Accepted
time: 55ms
memory: 35224kb

input:

2
5000
0 5
0 6
0 4
0 4
1 4
0 4
0 4
1 6
0 6
0 6
1 5
1 3
1 2
1 7
0 7
0 3
0 6
0 2
1 12
1 9
0 1
0 7
0 7
1 14
1 15
0 4
1 11
1 10
1 13
0 8
1 17
1 8
0 1
0 4
1 18
0 8
0 2
0 5
0 3
1 21
1 22
1 20
0 8
0 5
1 24
0 2
0 6
1 27
1 26
1 25
1 19
1 23
0 5
0 5
1 28
0 4
1 29
1 30
0 7
0 2
1 31
1 32
0 3
1 33
0 5
1 34
0 6
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #135:

score: 6
Accepted
time: 64ms
memory: 33592kb

input:

2
5000
0 1
0 3
0 8
0 4
0 8
0 7
1 2
1 3
0 8
1 6
0 3
0 8
0 6
1 9
1 10
1 1
0 1
1 7
0 7
1 12
0 5
0 1
0 3
1 13
1 4
1 15
1 8
0 5
1 16
1 5
0 4
0 6
0 1
0 1
0 3
0 4
1 17
1 19
1 20
0 1
1 23
1 18
0 2
0 4
0 5
1 24
1 25
1 26
0 8
0 8
0 4
1 27
1 22
1 28
1 29
1 21
0 6
0 2
0 5
0 6
1 32
1 33
1 31
1 30
0 2
0 2
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #136:

score: 6
Accepted
time: 72ms
memory: 32780kb

input:

2
5000
0 28
0 15
0 15
0 1
0 21
0 8
0 24
0 31
1 5
0 12
0 3
1 9
1 1
1 6
0 22
0 10
1 12
0 8
0 15
1 14
1 7
0 12
0 31
1 16
0 17
0 12
1 18
0 23
1 15
0 17
0 19
0 25
0 2
0 2
1 22
1 20
0 18
1 25
0 1
1 26
0 24
1 27
1 11
1 21
1 24
1 8
1 19
1 10
0 24
0 21
0 13
1 30
1 29
1 28
1 3
1 13
1 2
0 19
0 2
1 31
1 32
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 28
0 -1
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #137:

score: 6
Accepted
time: 86ms
memory: 32264kb

input:

2
5000
0 9
0 21
0 3
1 1
0 10
1 3
0 8
1 5
0 9
0 20
0 18
1 7
1 8
1 2
0 22
0 32
0 4
1 9
0 26
0 1
1 13
1 11
1 12
1 10
0 1
1 14
0 12
1 15
0 15
0 15
1 17
0 12
1 18
1 16
0 14
0 21
0 25
0 5
1 22
1 19
1 20
1 21
0 6
1 23
0 20
0 17
0 18
1 26
0 32
0 2
0 8
1 28
1 25
0 20
1 24
1 30
1 27
0 4
1 29
0 20
1 32
0 14
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #138:

score: 6
Accepted
time: 81ms
memory: 34396kb

input:

2
5000
0 8
0 10
0 6
1 1
0 11
1 2
0 3
1 5
0 15
0 8
0 6
0 4
1 6
1 7
0 9
1 8
1 10
0 1
1 11
0 2
1 12
1 4
0 9
1 13
0 15
0 5
0 2
1 15
0 13
1 14
1 16
0 13
0 3
1 18
1 19
1 9
0 13
1 20
0 1
0 10
0 4
0 10
0 11
1 25
0 6
1 26
1 22
0 13
1 27
1 24
0 10
1 28
0 2
1 29
0 11
0 14
1 30
0 3
1 32
0 12
1 31
1 33
1 21
0 6
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #139:

score: 6
Accepted
time: 42ms
memory: 34524kb

input:

2
5000
0 1
0 2
0 2
1 1
0 4
1 4
0 4
0 1
1 5
0 4
0 4
1 8
0 4
1 9
0 4
0 3
0 4
1 11
1 12
1 10
1 6
0 2
0 3
0 3
1 14
0 3
0 1
1 16
0 1
1 15
1 13
1 7
0 2
0 1
1 19
0 3
1 20
0 3
1 22
0 4
1 23
1 21
0 3
1 24
0 4
1 25
0 3
0 4
1 26
0 3
1 28
1 27
0 4
1 29
0 1
1 30
0 4
1 31
0 1
1 32
1 2
0 2
0 3
1 34
1 33
0 4
0 2
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 1
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #140:

score: 6
Accepted
time: 41ms
memory: 36220kb

input:

2
5000
0 2
0 4
0 2
1 2
0 4
1 3
0 1
0 4
0 3
0 2
0 1
1 5
1 6
0 4
0 2
0 2
0 4
0 2
1 14
0 3
1 12
0 1
1 15
0 2
1 7
0 1
1 9
1 11
0 3
0 4
1 19
0 4
0 1
1 21
0 1
1 4
1 18
0 3
1 24
1 23
1 1
1 13
0 3
0 1
0 2
0 1
0 4
1 28
0 1
1 30
0 3
0 1
0 1
1 33
0 3
1 31
1 32
0 2
1 35
0 4
0 4
1 34
1 25
0 1
0 3
1 38
1 36
0 2
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #141:

score: 6
Accepted
time: 83ms
memory: 34512kb

input:

2
5000
0 3
0 2
0 3
0 6
1 4
0 8
1 2
0 15
1 6
0 3
1 7
1 5
0 10
0 12
1 9
0 6
1 10
1 3
0 13
0 5
0 11
1 12
0 13
0 13
1 14
1 15
1 1
1 8
0 11
0 2
0 9
1 18
1 17
1 16
0 14
1 19
0 12
0 10
1 20
0 5
1 21
1 22
0 4
1 23
0 13
0 7
1 24
0 7
1 26
0 13
0 1
0 8
1 28
0 5
1 30
1 25
0 13
0 3
1 32
0 12
1 33
0 5
0 11
0 11
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 11
0 -1
0 -1
0 -1
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #142:

score: 6
Accepted
time: 82ms
memory: 33756kb

input:

2
5000
0 13
0 1
0 2
0 11
0 9
0 10
1 3
1 2
0 2
0 9
0 3
0 8
0 13
0 7
0 9
1 11
1 13
1 7
1 12
1 4
0 3
0 10
0 8
0 5
0 4
1 17
0 13
0 1
0 8
0 8
0 12
1 19
0 15
0 1
0 3
1 24
0 15
1 26
0 9
1 27
0 14
0 15
1 21
1 22
1 16
0 8
1 31
0 13
1 32
1 28
1 15
1 23
1 25
0 3
1 33
0 15
0 7
0 2
0 1
1 37
1 36
1 35
0 11
1 38
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Subtask #3:

score: 18
Accepted

Test #143:

score: 18
Accepted
time: 400ms
memory: 300132kb

input:

3
50000
0 2
0 1
0 1
1 1
0 4
1 2
0 1
1 4
0 3
1 6
0 4
1 7
0 1
0 4
1 3
1 8
0 3
0 1
0 2
0 3
1 10
1 13
0 3
0 2
0 1
0 2
1 14
1 17
0 4
0 1
1 18
1 15
1 16
0 4
0 1
1 20
1 21
1 19
1 11
1 5
0 1
0 4
1 23
1 9
0 1
1 24
0 3
0 1
1 25
1 26
0 3
0 3
1 27
1 28
0 1
1 29
0 4
0 4
0 1
1 31
1 30
0 1
1 33
1 32
0 4
0 4
1 34
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 ...

result:

ok both questions correct

Test #144:

score: 18
Accepted
time: 250ms
memory: 270116kb

input:

3
50000
0 2
0 1
0 2
1 1
0 2
1 3
0 1
1 5
0 1
1 6
0 1
1 7
0 1
1 8
0 1
0 2
0 1
0 1
1 9
1 12
0 2
1 13
1 2
0 1
0 1
0 2
1 15
1 4
1 14
1 16
0 2
0 1
1 17
1 18
0 2
1 19
0 1
1 20
0 1
1 21
0 1
0 1
0 1
1 22
0 1
0 2
0 2
0 1
1 28
0 1
1 26
1 24
1 25
1 27
0 2
1 30
1 23
1 29
0 1
1 31
0 1
1 10
0 2
0 2
1 33
0 2
1 34
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 2
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -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
...

result:

ok both questions correct

Test #145:

score: 18
Accepted
time: 337ms
memory: 286156kb

input:

3
50000
0 4
0 2
0 2
0 2
0 1
0 1
0 1
0 1
0 1
0 2
1 10
1 1
1 3
0 1
0 3
1 2
1 4
1 6
0 1
1 11
1 13
0 1
1 8
0 1
0 1
0 3
0 4
0 1
1 15
1 17
0 3
1 20
0 1
1 21
1 14
1 12
0 2
0 3
1 22
1 23
1 5
0 1
1 19
1 7
1 9
0 1
1 25
0 1
1 26
1 24
0 1
0 3
0 1
0 1
1 29
0 1
0 2
1 31
1 32
1 30
0 1
0 2
1 34
0 1
0 1
0 3
1 33
0 1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 4
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 1
0 -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 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 1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
1 1
...

result:

ok both questions correct

Test #146:

score: 18
Accepted
time: 312ms
memory: 285768kb

input:

3
50000
0 3
0 2
0 4
0 3
1 3
0 1
1 1
1 4
0 3
0 2
1 7
0 1
0 3
0 2
1 10
0 1
1 9
0 1
1 12
1 6
0 3
0 4
1 2
0 1
0 2
1 16
0 1
0 1
1 17
0 3
1 13
1 14
1 19
0 1
1 20
1 18
0 1
0 2
0 2
1 21
1 22
0 2
1 24
0 2
0 2
1 25
0 1
1 26
0 4
0 1
1 27
1 29
0 1
1 23
1 30
1 28
1 8
1 5
0 2
1 11
0 1
1 32
0 1
0 1
0 1
1 34
1 35
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
0 -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 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
...

result:

ok both questions correct

Test #147:

score: 18
Accepted
time: 649ms
memory: 299800kb

input:

3
50000
0 2
0 1
0 3
1 3
0 1
1 2
0 1
1 5
0 3
1 6
0 6
1 1
0 2
0 3
1 9
1 7
0 2
1 4
0 1
1 11
0 7
1 12
0 2
1 13
0 1
1 14
0 8
1 15
0 8
0 2
1 17
1 16
0 1
1 18
0 7
1 19
0 5
1 20
0 1
1 21
0 4
0 7
0 1
1 24
1 23
1 22
0 4
1 25
0 1
1 26
0 7
1 27
0 3
0 4
0 9
1 30
1 28
0 1
0 4
1 31
1 29
0 3
0 3
1 34
1 32
0 1
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -...

result:

ok both questions correct

Test #148:

score: 18
Accepted
time: 607ms
memory: 299592kb

input:

3
50000
0 5
0 3
0 3
0 5
1 1
0 5
0 3
0 3
0 1
1 7
1 4
1 8
1 2
0 4
0 2
0 7
1 9
0 1
0 2
1 12
1 11
1 13
1 6
1 5
0 2
1 14
0 2
0 1
1 16
0 3
0 8
1 18
0 5
1 19
1 3
1 17
0 2
0 6
1 20
1 21
0 5
1 22
0 1
0 3
1 24
0 1
0 1
1 25
0 7
1 27
0 1
0 9
1 26
0 5
1 30
0 4
1 31
0 4
1 32
1 29
1 23
0 1
0 1
0 1
0 5
0 5
0 2
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 5
0 -1
1 3
0 -1
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
0 -1
0 -1
1 1
...

result:

ok both questions correct

Test #149:

score: 18
Accepted
time: 795ms
memory: 293624kb

input:

3
50000
0 11
0 7
0 4
0 6
1 3
0 5
0 2
0 5
1 5
1 7
0 3
1 8
0 11
1 9
1 1
1 6
0 3
0 13
0 13
0 11
1 12
0 5
1 11
1 13
0 6
0 3
1 15
1 10
1 16
1 14
0 4
0 2
0 1
0 1
0 6
0 6
1 17
0 8
1 19
1 21
0 1
1 24
1 20
0 3
1 25
0 8
1 22
0 8
0 9
1 27
0 6
1 29
0 1
1 30
1 28
1 23
0 8
1 18
1 4
0 7
0 4
0 9
0 9
1 34
0 9
0 1
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 11
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #150:

score: 18
Accepted
time: 821ms
memory: 290752kb

input:

3
50000
0 2
0 9
0 2
0 12
1 1
1 2
0 4
1 5
0 3
1 6
0 8
1 7
0 1
1 4
0 10
0 10
1 10
1 9
0 9
0 2
0 12
0 9
1 13
1 12
1 14
0 3
1 15
0 3
0 1
1 17
0 11
0 4
1 16
1 18
0 10
1 20
0 12
1 21
1 19
0 5
0 8
0 2
1 23
0 8
0 4
1 25
1 26
1 22
1 11
1 8
0 3
1 27
0 2
0 3
0 4
1 29
1 30
0 10
0 7
0 9
1 32
0 3
0 2
0 13
1 31
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #151:

score: 18
Accepted
time: 1089ms
memory: 284184kb

input:

3
50000
0 9
0 25
0 5
0 25
0 14
0 25
0 3
0 3
0 17
0 11
0 9
1 7
1 4
0 12
0 24
0 20
1 14
0 23
1 6
1 3
1 2
1 1
1 12
1 9
0 3
0 7
0 5
1 18
1 17
1 5
0 19
0 2
1 20
1 19
1 15
1 10
0 14
0 5
0 2
0 17
1 23
1 21
0 15
1 25
0 4
0 18
0 6
0 10
0 2
1 30
1 27
1 29
1 28
0 1
1 24
0 2
1 31
0 10
0 22
1 34
1 32
0 22
1 35
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #152:

score: 18
Accepted
time: 1053ms
memory: 285428kb

input:

3
50000
0 21
0 13
0 6
0 12
0 5
1 1
0 16
1 3
0 8
0 4
1 7
1 2
1 4
0 1
1 8
0 2
1 5
1 9
0 17
0 8
0 6
0 2
1 12
1 13
0 2
1 15
0 11
1 16
1 14
0 4
0 8
1 18
1 17
0 5
0 20
1 20
0 29
0 10
1 21
1 11
1 22
0 4
1 6
0 29
0 8
1 25
1 24
0 8
1 26
1 19
0 17
1 27
0 21
1 28
0 14
1 29
0 12
0 3
0 2
1 32
0 6
0 3
1 30
1 34
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 21
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #153:

score: 18
Accepted
time: 329ms
memory: 278624kb

input:

3
50000
0 3
0 4
0 4
0 2
1 1
1 2
0 4
1 5
0 4
0 4
0 4
0 2
0 4
0 3
0 4
0 3
1 8
0 4
1 9
1 11
1 3
0 3
0 4
0 4
1 15
0 4
0 2
1 19
1 16
1 18
1 17
0 3
1 20
1 13
0 2
0 3
1 22
1 10
0 4
1 23
0 4
1 6
1 14
0 2
1 25
1 4
0 3
1 26
0 4
0 3
1 28
1 27
1 21
0 4
0 3
0 4
0 4
1 32
0 2
0 2
0 3
0 2
1 29
0 4
0 3
0 4
1 39
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
1 4
0 -1
1 4
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 ...

result:

ok both questions correct

Test #154:

score: 18
Accepted
time: 455ms
memory: 299844kb

input:

3
50000
0 3
0 2
0 1
1 3
0 3
1 4
0 2
1 5
0 3
1 6
0 3
1 7
0 2
1 8
0 1
0 2
0 2
1 10
1 11
1 9
0 2
1 12
0 2
0 4
0 2
0 2
0 2
0 4
0 2
1 18
1 17
1 13
0 1
0 2
0 3
1 22
0 2
0 3
1 16
1 15
1 19
1 23
1 14
0 1
1 21
1 2
1 20
1 25
0 4
1 26
0 2
0 2
0 4
1 27
1 29
1 28
0 1
1 30
0 1
1 31
0 4
0 1
1 32
1 33
0 2
1 34
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
0 -1
0 -1
1 3
0 -1
1 2
0 -1
1 3
0 -1
1 3
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
...

result:

ok both questions correct

Test #155:

score: 18
Accepted
time: 298ms
memory: 276960kb

input:

3
50000
0 4
0 4
0 4
1 3
0 4
1 1
0 3
0 4
0 3
1 5
0 4
0 4
0 1
0 2
0 4
1 9
0 4
0 4
0 4
1 14
1 11
1 4
0 4
1 16
1 13
1 2
1 7
1 15
1 10
0 3
1 17
1 8
0 3
0 4
1 19
1 18
0 3
1 20
0 3
0 3
1 22
0 4
1 21
0 4
1 24
0 4
0 4
1 25
1 26
0 3
1 27
1 23
0 3
0 3
0 4
1 29
0 4
0 4
1 28
1 32
1 30
0 4
0 4
0 4
0 2
1 35
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
1...

result:

ok both questions correct

Test #156:

score: 18
Accepted
time: 595ms
memory: 297240kb

input:

3
50000
0 7
0 6
0 8
1 3
0 9
1 4
0 6
0 6
0 8
1 1
1 5
0 8
0 8
1 9
0 6
1 10
1 6
0 8
0 8
0 8
0 8
0 9
1 15
1 11
0 9
1 12
1 14
0 8
0 9
1 18
0 8
0 9
1 19
1 16
0 9
1 17
0 8
0 6
0 8
0 8
1 24
1 23
1 13
0 9
1 26
0 9
0 8
1 27
1 28
1 20
0 4
1 29
0 6
1 30
0 2
0 9
1 32
0 4
0 6
1 31
0 9
1 34
0 4
0 4
1 36
0 9
1 37
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
1 8
0 -1
1 6
0 -1
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
0 -1
1 8
0 -1
1 8
1 8
1 8
1 8
1 8
0 -1
1 8
0 -1
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8
1 8...

result:

ok both questions correct

Test #157:

score: 18
Accepted
time: 635ms
memory: 299504kb

input:

3
50000
0 7
0 8
0 8
0 9
0 9
1 2
1 5
0 9
1 1
0 6
1 7
0 9
1 8
0 7
0 3
1 10
1 6
1 4
0 8
1 11
0 5
1 12
0 9
1 13
0 8
1 3
0 5
0 4
0 8
1 15
0 8
1 18
0 8
0 5
1 19
1 16
0 9
0 9
0 8
0 7
0 7
1 24
0 5
0 9
1 27
0 7
0 9
1 28
1 23
1 22
0 8
1 30
0 9
1 29
0 7
0 7
1 33
0 8
0 7
0 7
0 9
0 8
1 34
1 32
0 8
0 8
1 39
1 40
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 7
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
0 -1
1 9
1 9
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #158:

score: 18
Accepted
time: 753ms
memory: 296296kb

input:

3
50000
0 12
0 13
0 11
0 4
0 15
0 12
0 14
0 9
1 4
1 5
1 7
0 10
0 13
1 8
0 11
0 13
1 11
1 12
1 9
1 1
0 6
0 12
0 14
0 11
1 16
0 13
1 14
0 14
0 14
0 7
0 15
1 19
0 13
1 18
0 13
0 8
0 11
1 23
1 24
1 20
1 15
1 13
1 22
0 8
0 14
1 27
0 12
0 13
0 8
1 28
0 14
1 30
0 11
0 10
1 33
1 26
1 29
1 32
0 10
1 34
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 12
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #159:

score: 18
Accepted
time: 749ms
memory: 296228kb

input:

3
50000
0 14
0 12
0 13
1 3
0 7
0 5
1 2
0 7
0 15
1 7
0 15
1 5
1 1
0 15
1 9
0 15
1 4
1 6
0 4
1 11
0 15
0 14
0 15
0 5
0 14
1 13
0 8
0 15
1 16
1 17
1 15
0 13
0 10
0 12
0 15
0 13
0 11
0 11
0 14
1 19
1 25
0 10
1 27
0 10
1 28
1 20
1 22
0 9
1 29
1 26
0 12
0 13
0 15
1 31
0 14
1 30
1 32
0 14
1 34
0 12
0 15
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
1 15
0 -1
0 -1
0 -1
1 15
0 -1
1 15
0 -1
1 15
1 15
1 1...

result:

ok both questions correct

Test #160:

score: 18
Accepted
time: 1097ms
memory: 287808kb

input:

3
50000
0 23
0 25
0 29
0 11
0 22
1 5
0 24
1 1
0 23
1 7
0 26
1 4
0 23
1 2
0 14
1 3
1 6
0 9
1 11
0 24
0 30
1 13
0 30
1 12
0 24
0 29
0 23
0 18
0 21
1 19
0 21
1 20
1 17
0 28
0 25
1 21
0 29
0 28
0 25
1 25
1 16
0 21
0 27
1 26
1 27
1 15
0 13
1 14
1 18
1 22
0 19
1 29
1 23
1 9
0 14
1 30
1 24
1 8
0 26
0 15
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 23
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #161:

score: 18
Accepted
time: 1015ms
memory: 285700kb

input:

3
50000
0 30
0 30
0 25
1 3
0 23
0 5
1 2
1 1
0 30
0 26
0 21
1 7
1 8
0 29
0 16
0 11
0 21
1 11
0 27
0 28
0 17
0 29
0 25
1 16
0 17
0 18
0 20
1 17
0 29
0 26
0 29
1 14
0 30
0 30
1 13
0 20
0 27
1 26
1 27
1 25
0 18
0 23
0 25
0 15
1 28
1 31
0 12
1 32
0 21
0 27
1 30
1 12
0 25
0 17
1 36
0 26
0 26
0 28
0 30
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 30
1 30
1 30
1 30
1 30
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #162:

score: 18
Accepted
time: 1114ms
memory: 279364kb

input:

3
50000
0 41
0 40
0 33
0 40
0 30
1 3
0 39
0 42
1 5
1 4
0 39
0 44
1 9
1 2
1 8
0 38
1 6
1 1
0 46
0 39
0 22
1 13
1 11
1 12
0 33
1 14
0 37
1 15
0 27
1 16
0 21
0 47
1 17
0 27
1 19
0 28
1 20
1 18
0 49
1 21
0 50
1 22
0 20
0 46
1 23
0 20
0 47
1 25
0 44
1 27
0 46
1 28
1 26
1 24
0 42
0 41
0 40
0 44
1 32
0 48
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 41
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #163:

score: 18
Accepted
time: 1106ms
memory: 281904kb

input:

3
50000
0 44
0 47
0 49
1 3
0 41
0 15
1 4
0 38
1 5
1 1
0 29
0 32
1 6
0 41
1 7
1 2
0 43
0 48
0 45
1 10
1 12
0 47
1 11
1 13
0 44
0 32
0 27
0 35
1 14
1 16
1 15
0 30
0 45
0 37
1 18
1 17
1 19
1 20
0 50
0 50
0 43
0 47
0 47
1 23
0 43
0 33
1 27
0 37
1 28
0 36
0 32
0 49
0 27
0 41
1 33
0 50
0 48
1 34
1 30
0 36...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 44
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #164:

score: 18
Accepted
time: 521ms
memory: 292648kb

input:

3
50000
0 8
0 6
0 10
1 3
0 10
1 1
0 9
0 7
0 5
0 10
1 8
0 10
1 9
0 9
0 9
0 5
1 12
1 5
0 10
1 13
1 6
1 11
1 7
1 10
0 7
0 10
1 15
0 9
0 9
1 17
1 14
0 10
1 18
0 10
0 8
1 20
1 19
0 9
1 21
0 6
1 22
1 16
0 9
1 23
0 9
1 24
0 7
0 10
1 25
0 7
1 27
1 26
0 9
0 8
0 8
1 28
1 29
1 30
0 10
1 31
0 10
0 9
1 32
0 10
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #165:

score: 18
Accepted
time: 493ms
memory: 300528kb

input:

3
50000
0 3
0 4
0 1
0 3
1 4
0 3
1 1
1 2
0 4
1 6
0 2
0 4
0 4
0 1
1 8
1 7
1 5
0 4
0 3
1 12
1 3
0 1
0 4
1 13
1 14
1 10
0 2
0 4
0 1
0 2
0 2
1 17
1 15
1 19
1 16
0 2
0 2
1 20
1 21
1 18
0 1
0 4
0 3
1 22
1 24
0 1
1 25
1 11
0 1
1 26
0 1
0 1
1 27
0 1
0 1
0 3
0 1
1 31
1 29
0 2
0 1
1 33
1 30
0 4
0 3
1 36
1 35
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 2
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -...

result:

ok both questions correct

Test #166:

score: 18
Accepted
time: 780ms
memory: 294760kb

input:

3
50000
0 16
0 16
0 18
1 3
0 18
0 16
0 14
0 17
1 2
0 17
1 1
0 17
1 4
1 5
1 7
0 17
0 14
0 17
1 11
0 15
0 16
1 10
0 15
1 15
1 12
0 13
0 18
1 16
1 17
1 6
0 13
0 17
0 12
1 19
1 20
0 15
0 16
0 16
1 22
0 17
1 24
0 18
0 9
1 23
0 12
1 25
1 26
1 21
1 27
0 18
0 18
0 14
0 16
1 28
1 30
0 15
0 17
0 12
1 32
0 17
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 16
1 16
1 16
1 16
1 16
1 16
1 16
0 -1
0 -1
0 -1
0 -1
0 -1
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
1 17
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #167:

score: 18
Accepted
time: 490ms
memory: 292208kb

input:

3
50000
0 36
0 40
0 35
1 1
0 40
1 3
0 40
1 5
0 31
0 35
0 40
1 6
1 7
1 8
0 39
1 9
0 40
0 37
0 38
0 40
0 40
1 11
1 14
0 40
1 12
0 39
1 13
1 10
0 39
0 40
0 39
0 40
0 39
0 38
0 40
0 40
0 39
0 39
1 25
0 38
0 39
1 24
0 39
1 29
1 17
1 27
1 26
1 28
0 37
0 36
1 30
1 31
1 23
0 39
1 32
1 18
0 36
0 36
1 34
1 22...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 36
0 -1
0 -1
0 -1
1 40
1 40
1 40
1 40
1 40
0 -1
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
1 40
0 -1
1 40
1 40
1 40
0 -1
1 40
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1...

result:

ok both questions correct

Test #168:

score: 18
Accepted
time: 768ms
memory: 290084kb

input:

3
50000
0 110
0 94
0 103
1 3
0 107
0 102
1 2
1 1
0 96
0 110
1 7
1 5
0 105
1 8
0 109
1 9
0 110
0 106
0 106
1 11
1 12
0 109
0 108
1 4
0 110
1 6
1 10
0 109
1 15
1 16
0 109
1 17
0 103
0 106
0 106
1 19
0 101
0 109
0 107
1 22
0 106
0 107
1 23
0 107
1 26
1 18
0 103
1 21
0 105
0 107
0 106
1 29
0 109
1 28
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 110
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 109
0 -1
1 109
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #169:

score: 18
Accepted
time: 391ms
memory: 284424kb

input:

3
50000
0 26
0 30
0 26
0 29
1 4
0 28
0 28
0 29
0 27
1 5
0 29
0 29
1 1
1 7
0 30
1 11
0 29
1 2
1 6
1 9
1 3
1 12
0 30
0 30
0 28
1 15
1 13
0 30
1 14
1 10
0 29
1 17
0 28
0 30
0 27
0 30
1 19
1 20
0 30
0 30
0 29
0 30
0 30
1 23
0 30
1 27
0 30
1 22
1 18
0 28
1 29
1 28
0 30
1 30
1 26
1 24
0 28
0 25
0 30
1 31
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 26
0 -1
1 26
0 -1
1 26
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 29
0 -1
1 29
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
1...

result:

ok both questions correct

Test #170:

score: 18
Accepted
time: 959ms
memory: 293872kb

input:

3
50000
0 2
0 6
0 1
0 5
1 4
1 3
0 1
0 1
1 6
1 5
0 11
0 1
0 4
0 17
1 8
1 10
1 9
0 12
0 11
1 11
1 12
0 6
0 2
0 3
0 4
0 3
1 17
0 1
0 4
0 1
0 2
0 4
1 22
1 20
0 1
0 8
1 21
1 16
0 8
1 13
0 4
0 2
0 3
0 3
0 1
0 8
0 2
1 32
0 3
1 30
1 33
0 2
1 14
0 7
1 34
0 13
0 4
1 36
0 2
1 38
1 27
1 31
1 23
1 15
1 35
1 26
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #171:

score: 18
Accepted
time: 641ms
memory: 299488kb

input:

3
50000
0 2
0 12
0 6
0 1
1 4
0 1
1 1
1 2
0 5
0 1
1 7
1 6
0 2
0 3
1 5
0 1
0 2
0 5
1 11
1 12
0 2
1 13
0 1
0 7
1 15
0 3
1 3
0 1
0 10
0 3
0 5
1 17
0 1
0 2
0 1
1 21
0 1
1 18
0 4
0 5
1 24
0 1
1 20
0 2
0 3
1 29
1 22
0 4
0 12
1 30
1 25
0 6
1 32
0 3
0 2
1 33
0 3
0 6
0 6
0 3
0 2
1 36
0 1
0 4
0 1
1 41
0 2
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #172:

score: 18
Accepted
time: 644ms
memory: 299336kb

input:

3
50000
0 6
0 3
0 7
1 2
0 1
1 4
0 1
1 5
0 3
0 1
0 3
0 3
1 7
1 6
1 9
0 2
1 10
1 8
0 3
0 4
1 12
1 11
0 4
0 4
1 14
0 3
0 3
0 4
0 3
1 17
0 1
0 3
1 20
0 2
1 18
1 16
0 4
1 22
0 6
0 1
0 1
1 24
1 15
0 3
0 4
0 3
0 2
1 26
0 2
1 19
0 8
1 27
1 23
0 1
0 4
0 2
1 32
1 33
1 34
1 25
0 10
1 35
0 5
0 1
0 2
1 38
1 36
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #173:

score: 18
Accepted
time: 1019ms
memory: 277580kb

input:

3
50000
0 10
0 19
0 6
0 13
1 4
1 2
0 34
1 1
0 21
1 3
0 3
1 7
0 3
1 8
0 13
0 22
1 10
0 1
0 13
0 52
1 13
1 12
1 11
1 9
0 23
0 19
0 18
0 4
0 1
1 17
1 15
1 14
1 18
1 16
0 33
0 25
0 11
1 20
0 4
1 21
1 22
0 47
1 23
0 5
0 8
1 24
0 21
0 25
1 27
1 26
0 2
0 32
0 10
1 30
1 28
0 45
0 13
0 11
0 15
1 32
1 33
0 3
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 10
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #174:

score: 18
Accepted
time: 1041ms
memory: 280992kb

input:

3
50000
0 7
0 6
0 10
1 3
0 1
0 15
0 32
0 2
0 65
0 73
0 20
0 3
0 19
1 6
1 11
0 18
1 4
0 1
0 13
1 15
0 6
1 16
0 12
1 1
0 3
1 14
0 5
0 28
0 23
0 1
0 17
0 14
1 22
0 23
0 27
1 24
1 8
1 17
0 15
0 89
1 27
1 28
1 19
0 6
1 10
1 13
0 26
1 30
0 1
1 26
1 18
1 7
0 38
0 2
0 11
0 29
1 34
1 35
1 32
1 21
0 18
1 36
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #175:

score: 18
Accepted
time: 1147ms
memory: 282080kb

input:

3
50000
0 1
0 14
0 1
0 8
0 4
0 5
1 3
0 15
0 17
0 16
1 7
1 5
1 6
0 23
0 3
1 10
1 11
0 6
1 4
0 19
0 27
1 13
1 9
1 12
1 14
0 5
0 25
0 11
0 17
1 16
0 4
0 11
1 18
0 20
1 19
1 21
1 15
0 13
0 18
0 7
0 33
0 45
1 25
1 23
0 1
1 27
0 5
0 2
0 18
0 5
1 28
1 22
0 14
0 1
1 32
1 20
1 17
1 26
0 6
1 34
1 31
1 33
0 41...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #176:

score: 18
Accepted
time: 746ms
memory: 293932kb

input:

3
50000
0 6
0 9
0 8
1 3
0 1
1 4
0 8
0 3
0 3
0 6
0 6
1 9
1 7
0 6
1 10
1 6
1 2
1 1
0 5
0 7
0 6
1 13
1 11
0 5
0 8
0 8
0 6
1 15
0 5
0 7
1 18
0 5
1 16
0 7
0 8
1 22
0 1
1 23
1 21
0 2
0 1
1 25
0 1
1 26
1 12
0 5
0 2
1 28
0 8
1 27
1 29
0 6
0 1
0 2
0 5
1 31
0 6
1 33
1 30
0 1
1 35
0 9
0 6
0 4
1 38
1 37
0 1
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #177:

score: 18
Accepted
time: 1160ms
memory: 281040kb

input:

3
50000
0 6
0 4
0 68
0 34
1 3
1 4
0 12
0 30
1 5
0 16
0 23
0 4
1 2
0 21
0 22
0 3
0 19
0 5
1 10
1 13
1 14
0 43
1 15
1 11
1 8
1 6
0 14
0 5
0 14
0 10
0 13
0 43
1 16
1 17
0 6
0 4
1 21
1 23
0 5
1 24
1 20
0 34
1 25
1 22
0 1
0 12
0 25
0 13
1 29
1 26
1 18
0 19
1 30
0 20
1 31
0 1
1 32
1 19
1 12
1 1
0 18
0 8
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #178:

score: 18
Accepted
time: 1023ms
memory: 281252kb

input:

3
50000
0 9
0 12
0 37
0 1
1 4
0 34
1 2
0 25
0 9
0 13
1 6
1 8
1 3
1 5
0 45
1 9
0 6
1 10
0 8
0 5
0 5
1 11
1 12
1 7
0 8
1 14
0 27
0 7
0 16
1 17
0 4
1 15
1 16
0 19
0 19
0 3
0 8
1 19
1 22
1 20
1 1
0 5
1 23
1 18
0 2
0 13
1 25
1 24
0 15
1 26
0 15
0 2
1 27
1 28
0 27
1 29
0 8
1 30
0 6
1 31
0 53
1 32
0 5
0 33...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 9
1 9
1 9
1 9
1 9
1 9
1 9
0 -1
0 -1
0 -1
1 9
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #179:

score: 18
Accepted
time: 1098ms
memory: 282024kb

input:

3
50000
0 14
0 48
0 30
0 3
0 16
1 5
1 3
0 22
0 21
1 7
0 7
1 8
1 4
0 2
1 9
1 1
0 26
0 5
1 11
1 2
0 2
1 6
0 9
1 13
0 2
0 1
0 8
0 4
1 16
1 15
0 35
1 18
0 4
1 19
1 17
1 14
0 1
1 20
0 23
1 21
0 18
0 45
1 22
1 23
0 33
1 24
0 3
1 25
0 4
1 26
0 4
0 14
0 18
0 5
1 28
0 5
0 18
0 19
0 8
1 31
0 17
0 12
0 7
1 35
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #180:

score: 18
Accepted
time: 936ms
memory: 291840kb

input:

3
50000
0 1
0 6
0 3
0 2
1 1
1 2
0 2
1 3
0 1
1 6
0 2
1 7
0 9
0 3
0 4
1 9
1 8
0 7
0 6
0 3
0 5
1 13
1 14
1 11
0 10
1 15
1 10
0 2
0 6
1 17
0 9
0 1
1 18
0 9
0 1
0 22
1 20
0 5
0 14
1 21
1 23
0 11
0 2
1 22
0 2
0 7
0 1
1 28
0 14
1 27
1 24
0 2
0 6
0 4
0 29
1 33
1 31
1 32
0 32
1 35
0 4
1 36
0 10
1 37
1 26
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #181:

score: 18
Accepted
time: 970ms
memory: 289320kb

input:

3
50000
0 2
0 18
0 2
1 1
0 6
1 2
0 33
0 1
0 8
1 7
1 3
0 5
0 10
0 1
1 9
0 7
1 11
0 4
0 2
0 8
1 12
0 5
1 14
1 13
1 15
1 8
1 4
1 10
0 2
0 11
1 17
0 3
1 18
1 16
0 4
1 19
0 1
1 20
0 4
0 7
1 21
0 15
1 23
0 8
1 22
1 5
0 2
0 20
1 26
1 25
0 6
1 27
0 2
1 28
0 20
1 29
0 9
0 1
0 2
1 30
1 31
1 32
0 3
1 33
0 4
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #182:

score: 18
Accepted
time: 1055ms
memory: 279652kb

input:

3
50000
0 1
0 48
0 11
0 1
1 4
1 3
0 10
1 2
0 3
0 5
1 6
1 1
0 1
1 8
0 5
0 39
1 9
1 10
0 24
1 11
0 1
1 12
0 24
1 5
0 19
1 14
0 8
0 2
1 16
1 15
0 23
0 50
0 18
0 5
0 1
1 21
1 18
0 16
0 19
1 19
0 22
0 6
0 27
1 26
0 22
1 25
1 17
0 5
0 7
1 24
1 22
0 18
0 9
1 30
1 31
0 2
1 32
1 23
1 27
0 31
1 33
1 28
0 5
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #183:

score: 18
Accepted
time: 1053ms
memory: 281780kb

input:

3
50000
0 4
0 6
0 10
0 3
1 1
0 7
0 4
1 3
0 35
1 7
0 17
1 8
1 2
0 28
1 6
0 15
1 10
0 25
0 2
1 11
1 9
0 27
0 31
1 14
0 3
0 5
1 15
1 16
1 13
1 4
0 56
1 17
0 2
0 3
0 28
0 3
0 9
0 13
0 17
1 18
0 18
0 14
1 26
1 22
0 30
1 25
0 2
0 13
0 11
1 29
0 10
1 31
1 30
1 24
1 28
1 19
0 37
1 32
1 20
0 44
1 33
1 23
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #184:

score: 18
Accepted
time: 1060ms
memory: 283828kb

input:

3
50000
0 496
0 488
0 494
1 1
0 497
1 2
0 499
1 5
0 481
0 484
1 6
0 453
0 494
1 8
0 490
0 470
1 10
1 11
0 495
0 478
0 487
0 490
1 15
0 495
1 16
0 496
0 496
0 489
0 499
0 493
1 19
0 486
0 495
0 499
0 494
0 494
1 25
1 23
0 486
0 493
0 442
1 29
1 17
0 500
1 21
0 500
0 489
0 481
1 28
0 489
1 26
0 497
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 496
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #185:

score: 18
Accepted
time: 931ms
memory: 282836kb

input:

3
50000
0 493
0 500
0 495
1 2
0 494
0 493
1 5
0 494
1 6
1 1
0 500
0 473
0 491
0 492
1 8
0 482
1 9
0 453
0 491
0 500
0 479
0 499
1 14
1 15
0 492
1 17
1 12
1 7
1 16
0 494
1 18
1 10
1 3
0 481
0 496
0 484
0 498
0 475
0 450
0 485
0 491
1 22
0 489
0 500
0 488
0 497
0 500
1 29
0 488
0 483
0 490
0 500
0 488...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 493
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #186:

score: 18
Accepted
time: 629ms
memory: 294096kb

input:

3
50000
0 497
0 499
0 499
1 3
0 497
0 500
0 496
0 500
1 4
1 1
1 2
0 494
0 497
0 495
0 500
1 9
1 11
1 10
0 500
1 12
1 8
1 7
0 497
0 500
0 499
0 496
0 495
0 500
1 18
1 14
0 500
0 500
1 20
1 16
1 15
1 5
0 498
1 21
0 500
1 22
1 19
0 496
1 23
0 489
1 24
0 493
1 25
1 6
0 500
0 494
0 489
1 27
1 26
1 28
0 4...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 497
0 -1
1 499
0 -1
1 497
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #187:

score: 18
Accepted
time: 686ms
memory: 296988kb

input:

3
50000
0 3
0 2
0 9
1 1
0 8
1 2
0 1
0 5
0 4
0 2
1 6
0 1
1 7
1 9
1 5
1 8
0 8
0 9
0 8
1 11
1 10
0 5
1 13
1 12
0 7
0 4
1 15
0 9
0 6
0 2
1 16
1 18
0 4
0 6
0 8
0 4
1 19
0 1
0 4
1 23
0 2
1 24
1 21
0 2
1 26
1 20
1 17
1 22
1 25
0 2
1 27
1 4
0 5
1 28
0 6
1 29
0 9
1 30
0 9
0 1
0 7
0 8
1 32
0 3
0 3
1 35
0 8
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
1 8
1 8
1 8
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #188:

score: 18
Accepted
time: 687ms
memory: 293372kb

input:

3
50000
0 500
0 500
0 499
1 2
0 498
0 499
0 499
1 6
0 500
0 496
0 499
0 494
1 10
1 3
0 497
0 497
0 495
1 12
1 5
0 496
1 9
1 13
1 1
1 4
0 500
0 498
0 493
0 495
1 18
0 496
1 16
1 19
1 14
1 8
0 499
1 20
1 7
0 492
0 497
1 22
0 499
1 21
1 23
0 500
0 500
0 500
1 24
0 496
0 498
0 499
0 500
0 486
0 499
0 49...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 500
1 500
1 500
0 -1
0 -1
0 -1
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
1...

result:

ok both questions correct

Test #189:

score: 18
Accepted
time: 497ms
memory: 287616kb

input:

3
50000
0 500
0 499
0 500
1 2
0 498
1 3
0 500
0 500
1 4
0 500
0 500
0 498
0 498
1 7
1 9
0 491
1 11
1 10
1 1
0 500
0 490
0 495
0 499
1 15
1 14
1 12
0 500
1 16
1 5
0 496
0 500
0 495
0 496
1 18
1 19
1 20
1 17
1 13
0 499
0 499
1 21
0 498
0 499
0 497
1 25
0 499
1 24
1 22
1 23
1 8
0 500
0 500
1 27
0 499
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 500
0 -1
1 500
1 500
1 500
0 -1
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
1 500
0 -1
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
1 500
1 500
0 -1
...

result:

ok both questions correct

Test #190:

score: 18
Accepted
time: 504ms
memory: 291388kb

input:

3
50000
0 500
0 497
0 500
0 500
1 1
0 499
1 2
0 500
1 6
1 4
0 498
0 499
0 492
1 7
1 9
1 8
0 497
0 497
1 10
0 499
1 12
1 11
0 500
0 500
0 497
1 13
0 500
1 16
0 500
1 17
1 15
1 14
0 500
1 18
0 500
1 19
0 499
0 500
1 20
1 21
0 500
0 500
0 498
0 499
0 497
0 499
0 498
0 497
0 497
1 29
0 500
1 30
0 497
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 500
0 -1
1 500
1 500
1 500
0 -1
1 500
1 500
1 500
0 -1
0 -1
0 -1
0 -1
0 -1
1 499
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 500
1 500
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 500
0 -1
1 499
0 -1
1 500
0 -1
1 500
1 500
1...

result:

ok both questions correct

Test #191:

score: 18
Accepted
time: 359ms
memory: 283308kb

input:

3
50000
0 2
0 1
0 1
0 1
1 3
1 1
0 4
0 1
0 1
1 5
0 2
1 2
1 7
1 4
0 2
0 2
1 9
1 10
0 2
1 11
0 1
1 12
0 1
1 13
0 4
0 2
1 14
1 8
0 4
0 6
1 16
0 4
1 17
1 18
0 1
1 19
0 1
1 20
0 1
1 21
0 1
0 1
1 23
1 22
0 1
0 2
0 4
1 24
1 25
1 26
0 1
0 1
0 1
1 29
0 1
0 4
0 3
1 31
1 32
1 28
0 1
0 2
1 33
0 1
0 2
1 36
0 1
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 2
1 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1...

result:

ok both questions correct

Test #192:

score: 18
Accepted
time: 407ms
memory: 287128kb

input:

3
50000
0 2
0 2
0 1
0 2
1 1
1 2
0 2
0 1
0 1
1 6
1 7
1 4
0 1
1 5
0 1
0 1
1 10
0 6
1 11
1 8
0 1
0 1
1 13
0 1
1 12
0 2
0 5
0 1
1 17
0 1
1 18
1 15
0 4
0 3
1 19
0 5
0 2
1 20
0 7
0 2
1 21
1 24
1 23
1 22
1 9
1 14
0 1
1 25
0 1
1 26
0 2
0 2
1 27
0 4
0 2
1 30
0 1
1 31
0 1
1 29
0 2
0 1
1 33
0 2
1 35
0 1
1 36
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
1 2
1 2
1 2
1 2
0 -1
1 2
0 -1
1 1
0 -1
1 2
0 -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 1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #193:

score: 18
Accepted
time: 801ms
memory: 521568kb

input:

3
50000
0 49999
0 49999
0 799
0 2127
0 14760
0 6976
0 17347
0 6179
0 1624
0 49999
0 3073
0 49999
0 19709
0 576
0 49999
0 15593
0 21710
0 14767
0 23349
0 9833
0 1984
0 49999
0 8258
0 6246
0 49999
0 49999
0 18681
0 49999
0 9742
0 49999
0 49999
0 12955
0 49999
0 6443
0 49999
0 49999
0 5410
0 21429
0 49...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 49999
1 49999
1 49999
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #194:

score: 18
Accepted
time: 78ms
memory: 285400kb

input:

3
50000
0 23879
1 1
0 15105
1 2
0 35221
1 3
0 48114
1 4
0 26978
1 5
0 48216
1 6
0 22637
1 7
0 19339
1 8
0 36016
1 9
0 43771
1 10
0 3568
1 11
0 42361
1 12
0 16390
1 13
0 45304
1 14
0 33407
1 15
0 40884
1 16
0 34015
1 17
0 40625
1 18
0 6827
1 19
0 36151
1 20
0 38231
1 21
0 48190
1 22
0 1854
1 23
0 329...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 0
1 23879
0 -1
1 15105
0 -1
1 35221
0 -1
1 48114
0 -1
1 26978
0 -1
1 48216
0 -1
1 22637
0 -1
1 19339
0 -1
1 36016
0 -1
1 43771
0 -1
1 3568
0 -1
1 42361
0 -1
1 16390
0 -1
1 45304
0 -1
1 33407
0 -1
1 40884
0 -1
1 34015
0 -1
1 40625
0 -...

result:

ok both questions correct

Test #195:

score: 18
Accepted
time: 862ms
memory: 394316kb

input:

3
50000
0 49999
0 49999
0 17184
0 2975
0 49999
0 3851
0 49999
0 49999
0 18774
0 21659
0 23661
0 8205
1 1
0 16557
1 12
0 9314
0 1337
0 49999
0 6457
0 49999
0 49999
0 49999
0 49999
0 8690
0 49999
1 16
0 6169
0 49999
1 21
1 23
0 49999
0 49999
0 49999
0 49999
0 5637
1 28
0 2085
0 49999
1 22
0 49999
0 75...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 49999
1 49999
1 49999
0 -1
1 49999
0 -1
1 49999
1 49999
1 49999
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #196:

score: 18
Accepted
time: 379ms
memory: 293292kb

input:

3
50000
0 3
0 4
0 4
1 3
0 1
1 4
0 4
0 4
1 5
1 6
0 3
0 4
0 3
0 4
1 8
1 7
0 4
0 2
1 11
1 10
1 12
0 1
1 13
1 2
0 4
1 14
0 1
0 1
0 1
1 17
0 4
1 18
1 1
1 9
0 4
1 19
0 4
1 20
0 4
1 21
0 4
0 4
0 4
0 2
0 1
0 1
1 22
0 4
1 28
1 27
0 3
1 29
0 4
0 4
0 2
0 4
0 3
1 32
0 2
1 30
1 34
0 1
1 35
1 36
1 31
0 4
0 1
0 1
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
1 4
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 4
0 -1
0 -1
0 -1
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 1
0 -1
0 -1
0 -1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
0 -1
1 4
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #197:

score: 18
Accepted
time: 366ms
memory: 291412kb

input:

3
50000
0 3
0 2
0 4
1 2
0 4
0 4
1 4
0 2
0 3
0 2
0 4
0 1
1 7
0 4
0 3
1 11
0 4
1 13
1 12
0 1
1 8
1 14
0 4
0 1
0 4
0 4
0 3
1 19
0 4
1 16
1 18
1 17
0 4
1 21
0 3
1 22
0 4
1 23
1 1
0 4
0 3
1 24
0 1
0 1
0 1
1 27
0 2
1 29
1 25
1 15
1 28
0 2
1 30
1 26
1 20
0 4
0 4
1 32
0 1
0 3
1 31
0 2
0 4
0 1
1 36
1 37
0 2
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
0 -1
0 -1
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 4
0 ...

result:

ok both questions correct

Test #198:

score: 18
Accepted
time: 682ms
memory: 296188kb

input:

3
50000
0 7
0 6
0 1
0 8
1 1
0 9
0 7
0 9
0 6
0 7
0 3
1 5
0 8
1 2
0 2
0 6
1 13
0 1
0 9
1 10
1 12
1 15
1 9
0 9
1 16
1 4
0 2
1 17
0 5
1 6
0 2
0 1
0 4
0 3
1 20
0 9
0 7
0 4
0 7
0 7
0 7
0 3
0 9
1 24
1 19
1 23
0 4
1 28
0 7
0 1
1 29
0 5
0 4
0 3
0 2
0 8
1 37
0 1
1 35
1 39
0 3
1 40
0 2
0 8
1 25
0 6
1 42
1 36
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 ...

result:

ok both questions correct

Test #199:

score: 18
Accepted
time: 510ms
memory: 291748kb

input:

3
50000
0 7
0 8
0 8
0 6
0 3
1 1
1 3
1 2
0 4
1 6
0 7
0 7
1 8
1 7
0 3
1 9
0 8
1 10
0 3
0 8
1 11
0 3
1 5
1 13
0 7
0 3
0 3
0 5
1 16
1 15
1 17
0 2
1 18
1 14
0 1
1 19
0 5
0 6
1 21
1 20
0 4
0 1
1 22
0 3
1 24
1 23
0 4
0 6
0 3
0 3
1 25
1 28
1 27
0 1
1 29
0 6
1 30
0 8
1 31
0 5
1 32
1 26
0 3
0 2
0 7
0 7
0 5
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 7
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
...

result:

ok both questions correct

Test #200:

score: 18
Accepted
time: 475ms
memory: 288740kb

input:

3
50000
0 3
0 6
0 4
0 6
0 4
0 8
1 4
0 2
1 2
1 7
0 5
0 4
0 1
1 8
0 8
0 2
1 5
1 12
0 7
1 13
0 4
0 8
0 2
1 14
1 16
1 9
1 11
1 10
1 3
1 15
0 4
0 3
0 5
0 3
0 3
1 21
0 8
0 4
0 3
0 6
0 2
1 26
0 2
1 27
1 24
1 23
1 25
1 22
0 8
0 7
0 3
1 28
1 30
1 29
1 19
1 20
1 18
1 17
0 7
0 3
1 31
1 32
0 3
0 7
0 6
1 35
1 34...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 8
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #201:

score: 18
Accepted
time: 644ms
memory: 277452kb

input:

3
50000
0 15
0 32
0 13
1 1
0 13
1 4
0 11
1 2
0 10
1 6
0 20
0 3
0 5
0 1
0 11
1 10
0 12
0 23
1 12
1 9
0 13
0 31
0 18
0 20
1 16
1 14
0 3
1 3
0 8
1 18
1 7
0 1
1 20
1 5
0 2
1 21
0 3
1 15
0 25
0 26
0 23
0 28
1 24
1 22
0 9
1 27
0 5
0 24
0 15
1 11
1 23
1 17
1 30
0 9
1 31
0 7
1 32
1 19
0 2
1 33
1 25
0 30
0 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 15
0 -1
0 -1
0 -1
1 13
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #202:

score: 18
Accepted
time: 653ms
memory: 279204kb

input:

3
50000
0 27
0 5
0 1
1 2
0 13
0 10
0 22
1 4
1 3
1 5
0 3
1 7
0 19
0 18
1 8
1 9
0 19
0 9
0 25
1 12
0 9
0 8
1 14
0 2
0 31
0 11
0 28
0 6
0 6
1 19
1 15
1 11
0 31
1 18
1 16
0 6
1 17
1 21
0 16
0 14
0 18
0 28
0 12
1 25
1 27
1 23
1 24
0 6
1 28
0 7
0 14
0 11
0 15
1 30
1 31
1 1
0 30
1 33
1 10
1 13
1 6
0 32
1 3...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 27
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #203:

score: 18
Accepted
time: 412ms
memory: 297504kb

input:

3
50000
0 4
0 3
0 1
0 2
0 1
1 1
1 2
0 3
1 6
1 5
0 1
1 7
0 2
1 3
0 3
1 4
0 1
0 2
0 3
0 1
0 2
1 11
1 14
1 12
1 13
0 2
1 15
1 10
0 3
0 3
0 1
1 18
0 1
1 16
0 2
1 20
0 3
0 3
0 1
0 4
0 2
1 23
1 25
1 21
1 24
1 22
0 2
0 3
0 3
1 26
1 28
1 27
0 4
1 19
1 9
1 29
0 3
0 4
1 31
1 30
0 1
0 4
0 3
0 1
1 32
1 34
1 33
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 3
1 3
1 3
0 -1
0 -1
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
1 3
1 3
...

result:

ok both questions correct

Test #204:

score: 18
Accepted
time: 400ms
memory: 296072kb

input:

3
50000
0 4
0 4
0 1
1 2
0 4
0 4
1 1
0 1
1 6
1 4
0 1
0 3
1 8
1 7
0 1
1 3
0 1
1 10
0 4
0 3
1 11
0 4
1 5
1 13
0 4
1 14
0 4
0 4
1 15
1 16
0 3
1 17
0 1
0 1
1 18
1 19
0 4
1 20
0 1
0 2
1 21
0 4
0 1
1 23
0 1
0 1
0 3
0 2
1 27
1 26
0 3
0 3
1 28
1 25
0 4
1 31
1 22
0 2
0 3
0 4
0 1
1 35
0 4
0 3
0 2
1 36
0 2
0 4
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 4
1 4
1 4
0 -1
1 4
1 4
1 4
0 -1
1 4
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 3
0 -1
1 1
1 1
1 1
0 -1
0 -1
0 -1
1 1
0 -1
0 -1
0 -1
0 -1
0 -1
1 1
1 1
1 1
0 -1
1 1
0 -1
0 ...

result:

ok both questions correct

Test #205:

score: 18
Accepted
time: 541ms
memory: 292496kb

input:

3
50000
0 6
0 6
0 2
1 3
0 6
1 1
0 3
0 1
0 5
1 4
0 5
0 8
0 1
1 10
0 7
1 8
0 7
0 8
0 8
1 13
1 14
1 9
0 2
1 11
1 12
1 15
0 7
1 16
0 7
0 6
0 8
0 3
0 2
0 6
1 18
0 5
1 21
1 20
0 6
0 2
1 17
1 19
1 24
0 4
1 26
0 8
0 5
1 28
1 27
0 7
0 8
0 8
0 1
0 6
1 30
1 32
1 31
1 33
0 1
1 34
0 4
1 35
1 7
1 29
0 4
0 1
0 3
1...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 6
1 6
1 6
1 6
1 6
1 6
1 6
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #206:

score: 18
Accepted
time: 552ms
memory: 292392kb

input:

3
50000
0 2
0 3
0 6
0 2
0 5
0 3
0 1
0 4
1 6
1 2
1 7
1 5
1 8
1 1
0 8
1 9
0 7
0 7
1 10
1 4
0 5
1 12
0 4
0 3
0 1
1 14
1 13
1 11
0 6
1 15
0 7
1 17
0 4
0 8
1 18
1 19
0 4
1 20
0 7
1 21
0 2
0 6
0 6
0 1
0 5
1 25
1 24
1 23
1 26
0 6
1 27
0 2
1 28
0 1
1 29
1 22
0 6
1 30
0 5
0 6
0 3
0 5
0 3
0 1
1 36
1 33
0 7
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
1 6
0 -1
1 6
1 6
1 6...

result:

ok both questions correct

Test #207:

score: 18
Accepted
time: 727ms
memory: 277092kb

input:

3
50000
0 14
0 13
0 7
1 2
0 5
0 23
0 27
1 1
0 5
1 7
1 4
1 5
0 4
1 8
0 7
0 20
1 10
0 24
1 3
1 9
0 32
0 23
0 2
1 12
0 25
0 14
0 31
0 8
1 16
0 22
0 21
0 11
1 21
1 13
0 14
1 22
1 17
1 18
0 7
0 3
1 23
0 27
1 15
1 19
1 20
1 14
0 23
1 24
0 23
0 22
1 28
1 27
0 11
1 29
1 25
0 2
1 30
0 29
0 29
0 13
1 31
1 32
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 7
0 -1
1 7
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -...

result:

ok both questions correct

Test #208:

score: 18
Accepted
time: 828ms
memory: 279884kb

input:

3
50000
0 26
0 19
0 27
1 2
0 5
1 4
0 21
0 6
1 3
0 30
0 14
0 17
0 6
0 17
1 9
1 8
1 11
1 10
0 11
1 12
1 5
0 18
0 21
1 13
0 29
1 15
0 3
0 28
1 16
1 14
0 18
1 18
1 6
0 2
1 19
0 28
0 5
1 20
0 7
0 15
0 3
1 22
0 22
0 19
0 26
1 27
1 24
0 13
0 32
0 4
1 30
0 24
1 26
0 10
1 32
1 21
1 23
1 28
1 7
0 29
1 33
0 12...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 26
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #209:

score: 18
Accepted
time: 931ms
memory: 288988kb

input:

3
50000
0 4
0 14
0 9
0 11
0 14
1 4
1 1
0 14
1 2
1 5
0 10
1 7
0 4
0 1
0 4
1 9
0 4
1 8
1 11
0 4
0 10
1 13
1 12
1 10
0 3
0 10
0 6
1 15
1 14
1 16
0 6
1 17
0 14
0 7
0 11
1 19
0 15
0 11
0 8
1 23
1 20
1 22
1 21
0 5
1 24
1 6
0 10
1 25
0 2
1 26
0 5
1 27
0 6
1 28
0 6
0 15
0 10
1 29
0 11
1 32
0 14
0 14
1 33
0 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
1 14
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 14
0 -1
1 14
0 -1
0 -...

result:

ok both questions correct

Test #210:

score: 18
Accepted
time: 391ms
memory: 299476kb

input:

3
50000
0 2
0 3
0 4
0 4
1 3
0 4
0 1
0 1
1 7
1 5
0 2
1 6
0 4
1 8
0 3
0 3
0 2
1 12
1 11
0 2
1 13
1 10
1 2
0 2
0 2
1 15
1 4
0 3
1 16
0 2
1 17
1 1
0 1
1 18
0 3
1 19
0 4
1 20
0 1
1 21
0 3
0 4
0 3
1 24
1 23
0 2
0 1
1 25
1 26
0 3
1 27
1 22
0 3
1 28
0 1
0 4
1 29
0 2
0 4
0 3
0 4
0 1
1 32
1 31
0 3
0 3
1 35
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
1 2
0 -1
1 2
0 -1
1 2
1 2
1 2
0 -1
0 -1
0 -1
0 -1
0 -1
1 4
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #211:

score: 18
Accepted
time: 413ms
memory: 297648kb

input:

3
50000
0 3
0 4
0 4
0 4
1 4
1 2
0 3
0 3
0 2
0 4
1 7
0 3
0 1
0 2
1 11
0 3
0 2
0 3
0 4
1 12
1 10
1 5
1 8
1 14
1 13
1 9
0 2
0 1
0 1
0 2
0 4
0 4
0 2
0 2
0 4
1 18
1 24
0 4
0 1
1 16
0 2
0 3
0 4
0 4
1 22
1 21
0 2
0 3
1 31
0 4
1 17
1 20
0 2
0 2
0 2
1 36
0 1
0 3
0 4
1 35
0 3
0 3
0 2
1 41
1 42
0 4
1 43
1 40
0...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 4
1 3
0 -1
1 4
1 4
1 4
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
0 -1
1 3
1 3
1 3
1 3
1 3
0 -1
1 3
0 -1
1 3
0 -1
1 3
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Test #212:

score: 18
Accepted
time: 959ms
memory: 288348kb

input:

3
50000
0 15
0 13
0 7
0 1
1 2
1 1
0 11
0 6
0 2
1 7
0 3
0 12
1 8
1 5
1 6
0 15
0 10
1 10
0 3
1 12
0 8
1 13
1 11
0 14
1 14
0 6
1 15
1 3
0 3
0 9
1 16
0 11
1 18
0 7
1 19
0 9
0 7
0 8
0 3
1 22
1 23
0 7
0 4
0 1
0 13
0 13
1 26
0 12
1 29
0 14
1 24
1 21
0 13
0 6
0 13
1 32
1 30
1 20
0 8
1 34
0 3
0 12
0 6
0 3
1 ...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 15
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0...

result:

ok both questions correct

Test #213:

score: 18
Accepted
time: 892ms
memory: 289740kb

input:

3
50000
0 9
0 5
0 5
0 5
1 1
0 5
0 6
0 12
1 5
0 9
1 2
0 15
1 3
1 7
0 8
0 5
1 10
0 13
1 4
1 8
1 12
1 11
0 10
0 11
1 14
0 2
0 2
1 15
1 13
1 16
0 7
1 6
0 6
0 14
1 18
1 19
0 12
1 20
0 6
1 21
0 6
1 22
0 11
0 12
1 23
1 24
0 13
0 12
1 25
1 26
0 14
1 9
0 12
0 11
0 2
1 28
1 30
1 29
0 15
1 31
0 5
0 7
0 1
1 34
...

output:

QOJ-SECURITYLIB-V23368-nhCapeXC2shGseuHTgYE-bt0m87qTfR8OPcSSLBkv
0 5
1 9
0 -1
1 5
1 5
1 5
1 5
1 5
1 5
1 5
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1
0 -1...

result:

ok both questions correct

Subtask #4:

score: 0
Runtime Error

Test #214:

score: 0
Runtime Error

input:

4
100000
0 3
0 3
0 3
0 4
0 2
1 4
0 2
0 2
0 3
0 2
0 1
0 2
0 3
0 1
1 7
1 5
1 12
0 2
0 2
1 1
1 10
0 2
1 14
0 3
1 17
0 2
1 8
0 1
0 1
0 4
1 20
1 11
1 6
0 1
1 9
1 21
1 19
1 18
1 22
1 3
1 15
1 16
0 1
0 2
0 2
1 23
0 2
0 2
1 26
0 4
0 4
1 29
1 25
0 4
0 1
0 3
0 2
1 31
1 32
1 24
0 4
1 34
1 27
0 4
0 2
0 1
1 35
0...

output:


result: