QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#420255#8713. 不要玩弄字符串ucup-team1005AC ✓1919ms153328kbC++202.5kb2024-05-24 15:52:392024-05-24 15:52:44

詳細信息

Test #1:

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

input:

3
11 1
0 2
000 3
2
0
1

output:

-1
3

result:

ok 2 number(s): "-1 3"

Test #2:

score: 0
Accepted
time: 1058ms
memory: 153048kb

input:

18
111101 -31301
1101101 53902
101001 77190
1000110 -26277
01010 84183
0111001 -89769
100100 31681
00101 -33612
00101000 -25238
00111 -93542
0001101 45298
01100010 63521
11001001 84789
001011 89827
11010101 -12647
01011100 18677
010100 174
10011111 -73155
524286
0
1
00
10
01
11
000
100
010
110
001
1...

output:

0
0
0
0
0
0
0
0
0
0
0
77190
0
0
0
0
0
0
0
-77190
0
0
0
0
84183
77190
0
0
0
0
0
0
0
0
0
77190
0
0
0
31681
0
-77190
0
0
0
0
0
26277
0
53108
89827
84183
77190
77190
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
77190
77190
0
0
0
0
0
0
31681
-53108
0
0
-77190
-77190
0
0
0
0
0
0
0
0
0
0
26277
26277
0
0
53108
53108...

result:

ok 524286 numbers

Test #3:

score: 0
Accepted
time: 1393ms
memory: 153328kb

input:

18
01 3
000 13
100 9
011 1
0101 6
0011 16
0100 12
0111 10
00100 15
1110 2
011111 18
100100 6
1010001 8
10101100 3
1001000 9
00100001 12
001100 8
10111111 2
524286
0
1
00
10
01
11
000
100
010
110
001
101
011
111
0000
1000
0100
1100
0010
1010
0110
1110
0001
1001
0101
1101
0011
1011
0111
1111
00000
100...

output:

10
0
10
10
-7
0
3
13
13
10
9
-7
8
0
3
0
13
13
20
13
8
12
0
9
-7
-7
8
8
2
0
3
0
0
0
16
13
13
13
33
8
8
13
9
8
0
12
0
9
9
9
-7
-7
-8
-9
17
8
8
8
2
2
16
0
3
0
0
0
-3
0
0
0
3
25
13
13
8
13
13
13
33
24
6
8
8
8
14
15
17
8
8
8
0
0
0
12
0
9
9
9
9
9
8
7
-16
0
-7
-7
-8
-8
0
-9
17
8
8
8
8
8
8
10
-7
2
2
2
16
16...

result:

ok 524286 numbers

Test #4:

score: 0
Accepted
time: 1485ms
memory: 153072kb

input:

18
01 12
100 19
110 17
011 8
0010 10
1101 20
1110 4
1011 19
00101 16
1000 10
001110 1
110010 7
0011111 11
01101011 8
0011111 9
10011110 11
011101 4
01011000 1
524286
0
1
00
10
01
11
000
100
010
110
001
101
011
111
0000
1000
0100
1100
0010
1010
0110
1110
0001
1001
0101
1101
0011
1011
0111
1111
00000
...

output:

12
-6
11
11
0
6
11
8
9
11
1
26
8
10
11
2
10
8
9
9
9
11
1
16
26
27
8
1
12
10
11
2
0
2
10
10
10
8
9
-6
9
9
9
20
9
11
1
10
16
27
26
26
19
27
8
8
1
0
13
-1
12
10
11
2
0
2
0
0
0
2
10
10
10
10
10
4
10
8
9
0
-6
-10
9
9
9
9
9
9
20
9
9
24
9
11
1
10
10
10
6
16
20
27
26
22
26
27
19
0
19
27
8
16
8
8
1
1
0
0
13
...

result:

ok 524286 numbers

Test #5:

score: 0
Accepted
time: 322ms
memory: 153128kb

input:

18
0010 -4
100 -4
1 4
010 -1
111 -3
0110 7
011 -5
1010 -1
1000 3
0 3
0000 -3
0111 3
11 7
101 10
00 -4
01 -1
1001 5
1111 10
524286
0
1
00
10
01
11
000
100
010
110
001
101
011
111
0000
1000
0100
1100
0010
1010
0110
1110
0001
1001
0101
1101
0011
1011
0111
1111
00000
10000
01000
11000
00100
10100
01100
...

output:

-2
15
2
11
5
-8
-2
6
11
11
5
-2
-3
10
0
-3
6
6
11
0
10
11
5
5
-1
-2
-3
7
10
0
0
0
-3
1
6
9
6
6
11
11
0
0
10
0
12
11
5
5
5
-2
-1
0
0
-2
-3
-3
7
7
10
10
0
0
0
0
0
1
-3
4
-3
1
6
6
9
9
6
5
6
12
11
11
11
11
0
0
0
0
10
10
0
0
12
2
12
11
5
5
5
-2
5
-4
10
-2
-1
-1
0
0
0
0
-2
-2
-3
-3
-3
-3
7
7
0
7
10
10
10
...

result:

ok 524286 numbers

Test #6:

score: 0
Accepted
time: 975ms
memory: 153052kb

input:

18
00001110 18
10101000 11
01111011 20
00110100 -4
01011010 -4
11001100 3
11001011 7
00010010 4
11110001 0
00110010 19
01101111 14
00001011 -7
00000001 -8
11110111 15
00010001 -10
10111101 13
11101000 5
01010000 15
524286
0
1
00
10
01
11
000
100
010
110
001
101
011
111
0000
1000
0100
1100
0010
1010
...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
15
0
0
0
0
0
0
0
0
0
0
0
0
5...

result:

ok 524286 numbers

Test #7:

score: 0
Accepted
time: 53ms
memory: 6244kb

input:

10
11 15
011 3
000 3
011 13
0110 8
1101 12
0101 3
1101 12
10101 4
1010 15
524286
0
1
00
10
01
11
000
100
010
110
001
101
011
111
0000
1000
0100
1100
0010
1010
0110
1110
0001
1001
0101
1101
0011
1011
0111
1111
00000
10000
01000
11000
00100
10100
01100
11100
00010
10010
01010
11010
00110
10110
01110
1...

output:

-3
15
3
-3
31
0
0
3
-3
8
31
31
0
0
0
0
3
3
-3
-3
16
8
31
31
31
16
0
0
0
0
0
0
0
0
3
3
3
3
0
-3
-3
-1
16
16
16
8
31
31
31
16
31
31
8
16
0
0
0
11
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3
3
3
3
3
3
0
0
-3
-3
-3
-3
7
-1
16
16
13
-3
16
16
16
8
31
31
31
16
31
31
3
16
31
31
31
8
8
8
8
16
0
0
0
0
0
0
3
11
0
0
0
3
0
0
...

result:

ok 524286 numbers

Test #8:

score: 0
Accepted
time: 1919ms
memory: 153048kb

input:

18
10 1
100 10
0011 8
0001 8
0101 20
1001 13
01101 15
1101110 11
01101000 14
110011 10
00110110 11
1010011 7
10000011 19
1101010 6
01011111 3
00010010 7
00100001 15
00010110 15
524286
0
1
00
10
01
11
000
100
010
110
001
101
011
111
0000
1000
0100
1100
0010
1010
0110
1110
0001
1001
0101
1101
0011
101...

output:

0
0
0
5
0
0
0
5
23
10
8
0
0
0
0
0
5
0
23
23
14
10
8
8
-3
1
0
0
0
0
0
0
0
0
5
0
0
0
23
20
10
23
19
14
10
10
8
11
8
18
-3
-3
1
1
0
0
3
-1
0
0
0
0
0
0
0
0
-3
0
0
0
5
0
0
0
3
0
0
0
23
20
20
20
10
10
23
23
19
18
15
14
7
10
10
10
8
11
11
11
8
15
18
18
-3
0
-3
-3
-4
1
1
1
0
-3
0
0
3
3
-1
-1
0
0
-3
1
0
0
0
...

result:

ok 524286 numbers

Test #9:

score: 0
Accepted
time: 1767ms
memory: 153140kb

input:

18
11 17
011 20
0110 20
0001 12
0111 13
0110 13
00010 4
0001110 19
01010101 3
001111 17
11011001 14
1111001 12
01111110 14
0011011 3
11000011 3
10010111 11
01001100 11
10110101 7
524286
0
1
00
10
01
11
000
100
010
110
001
101
011
111
0000
1000
0100
1100
0010
1010
0110
1110
0001
1001
0101
1101
0011
1...

output:

5
17
-5
5
11
0
5
-5
5
0
11
17
26
0
5
5
-5
1
5
5
7
0
7
11
17
0
26
20
-3
0
5
5
5
11
-5
-5
-4
1
0
5
5
1
7
13
3
0
7
7
18
-1
17
17
-7
0
30
26
20
20
14
-3
3
0
5
5
5
11
5
5
9
11
0
-5
-5
-1
-4
-4
3
13
0
0
5
1
5
5
7
1
3
7
13
13
3
3
3
0
7
7
7
1
18
18
4
-1
14
10
17
0
-7
-13
-3
0
30
30
19
26
20
20
13
20
16
14
-...

result:

ok 524286 numbers

Extra Test:

score: 0
Extra Test Passed