QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#179670#5741. Triterminantucup-team607WA 15ms10008kbC++20826b2023-09-15 00:20:312023-09-15 00:20:32

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 5804kb

input:

3
4
1 1 1 1
2
1 -1
5
-1 1 1 1 -1

output:

2
0
2

result:

ok 3 number(s): "2 0 2"

Test #2:

score: 0
Accepted
time: 5ms
memory: 6368kb

input:

3
27354
-1 -1 1 -1 1 1 1 1 -1 -1 1 1 -1 1 1 -1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 -1 1 1 1 -1 -1 1 1 1 1 -1 -1 1 -1 1 -1 1 -1 1 1 -1 1 1 1 -1 1 1 1 1 -1 -1 -1 -1 1 -1 -1 1 1 1 1 -1 -1 1 1 1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 -1 -1 -1 1 1 1 -1 1 -1 -1 -1 ...

output:

13567
27879
7121

result:

ok 3 number(s): "13567 27879 7121"

Test #3:

score: 0
Accepted
time: 5ms
memory: 6476kb

input:

3
27970
1 -1 1 -1 -1 -1 1 1 1 -1 -1 1 -1 -1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 1 -1 -1...

output:

2767
80
6378

result:

ok 3 number(s): "2767 80 6378"

Test #4:

score: 0
Accepted
time: 5ms
memory: 8072kb

input:

3
36019
-1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 1 1 1 1 -1 -1 1 -1 1 1 1 -1 1 -1 1 1 -1 1 1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 1 -1 1 -1 1 -1 1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 -1 -1 1 -1 -1 1 1 1 ...

output:

7231
6152
5290

result:

ok 3 number(s): "7231 6152 5290"

Test #5:

score: 0
Accepted
time: 5ms
memory: 6288kb

input:

9
20499
-1 -1 1 1 -1 1 1 1 1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 -1 1 1 1 1 -1 1 -1 1 -1 -1 1 1 -1 -1 1 -1 -1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 -1 1 1 1 1 1 -1 1 -1 -1 -1 1 1 -1 -1 -1 -1 1 1 -1 1 1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 1 -1 1 1 1 1 -1 -1 1 -1 -1 -1 1 1 1 1 -1 1 1 -1 -1 -1 1 1 1 1 1 -1 -...

output:

6093
6901
2328
11469
915
87
6
1331
86

result:

ok 9 numbers

Test #6:

score: 0
Accepted
time: 5ms
memory: 6540kb

input:

2
94689
1 1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 1 1 -1 -1 1 -1 1 -1 1 1 1 -1 1 -1 1 -1 -1 -1 -1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 -1 -1 1 1 -1 -1 -1 1 -1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 -1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 -1 ...

output:

37779
587

result:

ok 2 number(s): "37779 587"

Test #7:

score: 0
Accepted
time: 3ms
memory: 8628kb

input:

4
90533
-1 -1 1 -1 1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 1 1 1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 1 1 -1 1 1 -1 -1 -1 1 1 1 -1 1 -1 1 -1 -1 -1 1 -1 1 -1 1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 1 1 -1 1 -1 1 -1 1...

output:

36192
516
2233
928

result:

ok 4 number(s): "36192 516 2233 928"

Test #8:

score: 0
Accepted
time: 6ms
memory: 6500kb

input:

2
74465
1 -1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 1 1 -1 1 -1 1 -1 1 1 1 1 1 -1 -1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 1 1 1 1 -1 1 1 1 1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 -1 -1 -1 1 1 1 1 1 1 1 1 -1 1 1 1 1 -1 1 -1 -1 1...

output:

22551
7372

result:

ok 2 number(s): "22551 7372"

Test #9:

score: 0
Accepted
time: 5ms
memory: 6320kb

input:

5
41709
-1 1 1 -1 1 1 -1 -1 1 -1 -1 1 -1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 1 -1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 1 1 -1 1 1 -1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 1 1 1 1 1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 -1 -1 1...

output:

8311
8174
2118
148
552

result:

ok 5 number(s): "8311 8174 2118 148 552"

Test #10:

score: 0
Accepted
time: 6ms
memory: 10008kb

input:

5
47359
-1 1 1 -1 1 -1 -1 -1 1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 -1 -1 1 -1 -1 1 1 1 1 -1 1 -1 1 1 1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 -1 -1 1 1 -1 1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 1 1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 1 1 -1 1 -1 -1 1 -1 1 1 1 1 -1 -1 1 1 -1 1 -1 -1 ...

output:

4819
2783
44
287
1764

result:

ok 5 number(s): "4819 2783 44 287 1764"

Test #11:

score: 0
Accepted
time: 3ms
memory: 6620kb

input:

1
100000
-1 -1 -1 1 -1 -1 1 1 1 -1 1 1 -1 1 -1 -1 -1 1 -1 1 -1 -1 1 1 1 1 1 1 1 -1 -1 1 1 1 -1 1 1 1 -1 1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 -1 1 1 -1 -1 -1 1 1 1 1 -1 -1 1 1 -1 1 1 1 1 1 -1 -1 -1 1 1 -1 1 1 -1 1 1 -1 -1 -1 -1 -1 1 -1 1 1 -1 -1 1 1 1 1 -1 -1 -1 -1 1 -1 1 -1 1 1 1 -1 -1 -1 1 -1 1 -1 1 1 -1...

output:

49773

result:

ok 1 number(s): "49773"

Test #12:

score: 0
Accepted
time: 6ms
memory: 6780kb

input:

1
100000
1 1 -1 -1 1 -1 -1 -1 1 1 1 -1 1 -1 1 1 -1 1 -1 1 1 1 -1 -1 -1 1 -1 1 1 1 -1 -1 -1 -1 1 1 1 -1 -1 1 1 1 1 -1 -1 -1 1 1 -1 1 -1 1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 1 -1 1 1 -1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 -1 1 1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 -1 1 1 1 -1...

output:

30144

result:

ok 1 number(s): "30144"

Test #13:

score: 0
Accepted
time: 5ms
memory: 6696kb

input:

1
100000
-1 1 1 -1 -1 1 1 1 1 1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 -1 1 1 1 -1 1 1 -1 -1 -1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 1 1 1 -1 1 1 -1 1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 -1 -1 -1 1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 -1 1 -1 1 -1 -1 1 -1 -1 1 ...

output:

40103

result:

ok 1 number(s): "40103"

Test #14:

score: 0
Accepted
time: 6ms
memory: 8572kb

input:

1
100000
-1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 -1 1 -1 1 1 -1 1 -1 -1 1 -1 1 -1 1 1 -1 1 -1 -1 1 1 -1 1 -1 1 -1 -1 1 -1 1 1...

output:

0

result:

ok 1 number(s): "0"

Test #15:

score: 0
Accepted
time: 15ms
memory: 5996kb

input:

100000
1
1
1
-1
1
-1
1
1
1
1
1
1
1
1
1
-1
1
1
1
-1
1
-1
1
1
1
1
1
1
1
1
1
-1
1
-1
1
-1
1
-1
1
1
1
-1
1
1
1
1
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
1
0
1
1
0
1
0
0
0
1
0
1
1
1
1
1
0
1
0
0
1
1
0
1
1
1
1
1
0
0
1
0
1
0
0
1
1
0
0
1
0
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
1
1
...

result:

wrong answer 9th numbers differ - expected: '0', found: '1'