QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#96079#5093. 会议LeafSeek2 346ms36376kbC++142.4kb2023-04-13 09:56:382023-04-13 09:56:40

詳細信息

Subtask #1:

score: 2
Accepted

Test #1:

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

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 15
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: 6472kb

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 15
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: 2ms
memory: 7968kb

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 15
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: 4ms
memory: 6256kb

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 15
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: 8048kb

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 15
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: 8276kb

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 15
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: 6272kb

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 15
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 ...

result:

ok both questions correct

Test #8:

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

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 15
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
...

result:

ok both questions correct

Test #9:

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

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 15
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
...

result:

ok both questions correct

Test #10:

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

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 15
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 -...

result:

ok both questions correct

Test #11:

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

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 15
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: 7980kb

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 15
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: 8024kb

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 15
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
...

result:

ok both questions correct

Test #14:

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

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 15
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: 4ms
memory: 8280kb

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 15
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: 3ms
memory: 7960kb

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 15
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: 6452kb

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 15
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
...

result:

ok both questions correct

Test #18:

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

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 15
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: 7972kb

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 15
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
...

result:

ok both questions correct

Test #20:

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

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 15
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
...

result:

ok both questions correct

Test #21:

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

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 15
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
...

result:

ok both questions correct

Test #22:

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

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 15
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 ...

result:

ok both questions correct

Test #23:

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

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 15
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: 7960kb

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 15
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
...

result:

ok both questions correct

Test #25:

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

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 15
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
...

result:

ok both questions correct

Test #26:

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

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 15
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
...

result:

ok both questions correct

Test #27:

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

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 15
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
...

result:

ok both questions correct

Test #28:

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

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 15
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: 4ms
memory: 6348kb

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 15
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
...

result:

ok both questions correct

Test #30:

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

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 15
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: 4ms
memory: 7992kb

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 15
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
...

result:

ok both questions correct

Test #32:

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

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 15
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
...

result:

ok both questions correct

Test #33:

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

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 15
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
...

result:

ok both questions correct

Test #34:

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

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 15
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
...

result:

ok both questions correct

Test #35:

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

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 15
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: 6ms
memory: 6300kb

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 15
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: 5ms
memory: 7944kb

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 15
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: 2ms
memory: 7980kb

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 15
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
...

result:

ok both questions correct

Test #39:

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

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 15
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: 5ms
memory: 8288kb

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 15
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: 2ms
memory: 7968kb

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 15
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: 0ms
memory: 8028kb

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 15
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 -...

result:

ok both questions correct

Test #43:

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

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 15
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: 5ms
memory: 7976kb

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 15
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
...

result:

ok both questions correct

Test #45:

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

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 15
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: 4ms
memory: 7984kb

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 15
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: 6268kb

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 15
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
...

result:

ok both questions correct

Test #48:

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

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 15
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 -...

result:

ok both questions correct

Test #49:

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

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 15
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
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: 4ms
memory: 8060kb

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 15
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
...

result:

ok both questions correct

Test #51:

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

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 15
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
...

result:

ok both questions correct

Test #52:

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

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: 2ms
memory: 7960kb

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 15
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
...

result:

ok both questions correct

Test #54:

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

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 15
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: 6280kb

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 15
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
...

result:

ok both questions correct

Test #56:

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

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 15
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: 0ms
memory: 8000kb

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 15
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
...

result:

ok both questions correct

Test #58:

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

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 15
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: 4ms
memory: 6376kb

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 15
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
...

result:

ok both questions correct

Test #60:

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

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 15
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
...

result:

ok both questions correct

Test #61:

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

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 15
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: 8128kb

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 15
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: 7960kb

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 15
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: 4ms
memory: 7932kb

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 15
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 -...

result:

ok both questions correct

Test #65:

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

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 15
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
...

result:

ok both questions correct

Test #66:

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

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 15
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
...

result:

ok both questions correct

Test #67:

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

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 15
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 -...

result:

ok both questions correct

Test #68:

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

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 15
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 -...

result:

ok both questions correct

Test #69:

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

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 15
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
...

result:

ok both questions correct

Test #70:

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

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 15
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: 0ms
memory: 6380kb

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 15
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
...

result:

ok both questions correct

Subtask #2:

score: 0
Wrong Answer

Test #72:

score: 6
Accepted
time: 343ms
memory: 31612kb

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 15
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: 153ms
memory: 32820kb

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 15
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
...

result:

ok both questions correct

Test #74:

score: 6
Accepted
time: 205ms
memory: 32828kb

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 15
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
...

result:

ok both questions correct

Test #75:

score: 6
Accepted
time: 263ms
memory: 35856kb

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 15
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: 210ms
memory: 34488kb

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 15
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: 340ms
memory: 36376kb

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 15
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: 346ms
memory: 32028kb

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 15
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: 206ms
memory: 31816kb

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 15
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: 319ms
memory: 32524kb

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 15
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
...

result:

ok both questions correct

Test #81:

score: 6
Accepted
time: 318ms
memory: 32180kb

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 15
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: 146ms
memory: 32436kb

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 15
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 -...

result:

ok both questions correct

Test #83:

score: 0
Wrong Answer
time: 242ms
memory: 31920kb

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 15
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:

wrong answer both questions wrong

Subtask #3:

score: 0
Time Limit Exceeded

Test #143:

score: 0
Time Limit Exceeded

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:


result:


Subtask #4:

score: 0
Time Limit Exceeded

Test #214:

score: 0
Time Limit Exceeded

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: