| Task: | Sort |
| Sender: | Dozenal |
| Submission time: | 2026-04-17 14:53:07 +0300 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | 0 |
| subtask | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| #2 | WRONG ANSWER | 0 |
| #3 | WRONG ANSWER | 0 |
| #4 | TIME LIMIT EXCEEDED | 0 |
| #5 | WRONG ANSWER | 0 |
| #6 | WRONG ANSWER | 0 |
| #7 | WRONG ANSWER | 0 |
| test | verdict | time | subtask | |
|---|---|---|---|---|
| #1 | ACCEPTED | 0.04 s | 2, 6, 7 | details |
| #2 | ACCEPTED | 0.04 s | 1, 2, 3, 6, 7 | details |
| #3 | ACCEPTED | 0.04 s | 2, 6, 7 | details |
| #4 | WRONG ANSWER | 0.04 s | 1, 2, 3, 6, 7 | details |
| #5 | ACCEPTED | 0.04 s | 1, 2, 3, 6, 7 | details |
| #6 | ACCEPTED | 0.05 s | 1, 2, 3, 6, 7 | details |
| #7 | WRONG ANSWER | 0.04 s | 1, 2, 3, 6, 7 | details |
| #8 | ACCEPTED | 0.04 s | 1, 2, 3, 6, 7 | details |
| #9 | ACCEPTED | 0.05 s | 1, 2, 3, 6, 7 | details |
| #10 | ACCEPTED | 0.04 s | 1, 2, 3, 6, 7 | details |
| #11 | WRONG ANSWER | 0.04 s | 2, 6, 7 | details |
| #12 | RUNTIME ERROR | 0.06 s | 2, 6, 7 | details |
| #13 | RUNTIME ERROR | 0.07 s | 2, 6, 7 | details |
| #14 | ACCEPTED | 0.04 s | 2, 6, 7 | details |
| #15 | WRONG ANSWER | 0.05 s | 2, 6, 7 | details |
| #16 | WRONG ANSWER | 0.65 s | 3, 7 | details |
| #17 | WRONG ANSWER | 0.67 s | 3, 7 | details |
| #18 | WRONG ANSWER | 0.70 s | 3, 7 | details |
| #19 | WRONG ANSWER | 0.68 s | 3, 7 | details |
| #20 | WRONG ANSWER | 0.68 s | 3, 7 | details |
| #21 | ACCEPTED | 0.66 s | 3, 7 | details |
| #22 | ACCEPTED | 0.67 s | 3, 7 | details |
| #23 | ACCEPTED | 0.60 s | 3, 7 | details |
| #24 | TIME LIMIT EXCEEDED | -- | 4, 7 | details |
| #25 | TIME LIMIT EXCEEDED | -- | 4, 7 | details |
| #26 | TIME LIMIT EXCEEDED | -- | 4, 7 | details |
| #27 | ACCEPTED | 0.58 s | 4, 7 | details |
| #28 | TIME LIMIT EXCEEDED | -- | 4, 7 | details |
| #29 | TIME LIMIT EXCEEDED | -- | 4, 7 | details |
| #30 | WRONG ANSWER | 0.44 s | 5, 6, 7 | details |
| #31 | RUNTIME ERROR | 1.37 s | 5, 6, 7 | details |
| #32 | RUNTIME ERROR | 0.56 s | 5, 6, 7 | details |
| #33 | RUNTIME ERROR | 1.12 s | 5, 6, 7 | details |
| #34 | ACCEPTED | 0.10 s | 5, 6, 7 | details |
| #35 | RUNTIME ERROR | 1.39 s | 5, 6, 7 | details |
| #36 | RUNTIME ERROR | 0.47 s | 6, 7 | details |
| #37 | WRONG ANSWER | 1.74 s | 6, 7 | details |
| #38 | RUNTIME ERROR | 0.73 s | 6, 7 | details |
| #39 | RUNTIME ERROR | 0.80 s | 6, 7 | details |
| #40 | ACCEPTED | 0.12 s | 6, 7 | details |
| #41 | RUNTIME ERROR | 0.26 s | 6, 7 | details |
| #42 | TIME LIMIT EXCEEDED | -- | 7 | details |
| #43 | TIME LIMIT EXCEEDED | -- | 7 | details |
| #44 | TIME LIMIT EXCEEDED | -- | 7 | details |
| #45 | TIME LIMIT EXCEEDED | -- | 7 | details |
| #46 | TIME LIMIT EXCEEDED | -- | 7 | details |
| #47 | TIME LIMIT EXCEEDED | -- | 7 | details |
| #48 | TIME LIMIT EXCEEDED | -- | 7 | details |
| #49 | ACCEPTED | 0.60 s | 7 | details |
| #50 | TIME LIMIT EXCEEDED | -- | 7 | details |
| #51 | TIME LIMIT EXCEEDED | -- | 7 | details |
| #52 | ACCEPTED | 0.04 s | 1, 2, 3, 5, 6, 7 | details |
| #53 | ACCEPTED | 0.04 s | 1, 2, 3, 4, 5, 6, 7 | details |
| #54 | ACCEPTED | 0.06 s | 2, 5, 6, 7 | details |
| #55 | WRONG ANSWER | 0.04 s | 1, 2, 3, 4, 6, 7 | details |
| #56 | WRONG ANSWER | 0.04 s | 1, 2, 3, 6, 7 | details |
| #57 | WRONG ANSWER | 0.05 s | 6, 7 | details |
| #58 | WRONG ANSWER | 0.30 s | 3, 4, 7 | details |
| #59 | WRONG ANSWER | 0.29 s | 3, 7 | details |
| #60 | WRONG ANSWER | 0.04 s | 2, 6, 7 | details |
| #61 | WRONG ANSWER | 0.04 s | 2, 6, 7 | details |
| #62 | RUNTIME ERROR | 0.06 s | 2, 6, 7 | details |
| #63 | WRONG ANSWER | 0.04 s | 2, 6, 7 | details |
| #64 | RUNTIME ERROR | 0.06 s | 2, 6, 7 | details |
Code
import math
from collections import defaultdict
n, q = map(int, input().split())
X = list(map(int, input().split()))
Sort = sorted(X)
Lmax = [X[0]] * n
Rmin = [X[n - 1]] * n
Lsort = [True] * n
Lsort[0] = (X[0] == Sort[0])
Rsort = [True] * n
Rsort[n - 1] = (X[n - 1] == Sort[n - 1])
Inc = [1] * n
for i in range(1, n):
Lmax[i] = max(Lmax[i - 1], X[i])
Rmin[n - i - 1] = min(Rmin[n - i], X[n - i - 1])
Lsort[i] = Lsort[i - 1] and (X[i] == Sort[i])
Rsort[n - i - 1] = Rsort[n - i] and (X[n - i - 1] == Sort[n - i - 1])
if X[i] >= X[i - 1]:
Inc[i] = Inc[i - 1] + 1
else: Inc[i] = 1
#print(Sort)
#print(Lmax)
#print(Rmin)
#print(Inc)
#print(Lsort)
#print(Rsort)
def solve(a, b):
# Have assumed a + b > n and that ans >= 2
W = a + b - n
#print(X)
Seen = defaultdict(int)
xa = 0
xb = 0
# This can be precomputed
for i in range(a):
Seen[X[i]] += 1
if X[i] > Sort[a - 1 - Seen[X[i]]]:
xa += 1
#print(Seen)
Seen.clear()
#print(Seen)
for i in range(b):
Seen[X[n - i - 1]] += 1
if X[n - i - 1] < Sort[n - b - 1 + Seen[X[n - i - 1]]]:
xb += 1
#print(Seen)
#print(xa, xb)
ans = 2 * math.ceil(max(xa, xb) / W) - 1
if ans == 1: ans += 1
return ans
for i in range(q):
a, b = map(int, input().split())
ans = 0
# a + b <= n
if a + b <= n:
if Lmax[a] > Sort[a] or Rmin[n - b] < Sort[n - b] or Inc[n - b - 1] < n - a - b:
ans = -1
else:
if Inc[a - 1] < a: ans += 1
if Inc[n - 1] < b: ans += 1
# Ans is 0
elif Inc[n - 1] == n:
ans = 0
# Ans is 1
elif Rsort[a] or Lsort[n - b - 1]:
ans = 1
else:
ans = solve(a, b)
print(ans)Test details
Test 1
Subtask: 2, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 6 3 3 1 4 1 5 9 4 1 3 3 2 5 |
| correct output |
|---|
| 1 -1 2 |
| user output |
|---|
| 1 -1 2 |
Test 2
Subtask: 1, 2, 3, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 2 1 548813503 548813503 1 1 |
| correct output |
|---|
| 0 |
| user output |
|---|
| 0 |
Test 3
Subtask: 2, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 1 1 417021999 1 1 |
| correct output |
|---|
| 0 |
| user output |
|---|
| 0 |
Test 4
Subtask: 1, 2, 3, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 20751947 20751947 20751947 494... |
| correct output |
|---|
| -1 -1 1 1 -1 ... |
| user output |
|---|
| -1 -1 1 1 -1 ... |
Feedback: Incorrect character on line 9 col 1: expected "-1", got "1"
Test 5
Subtask: 1, 2, 3, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 10 10 12780811 19475241 19475241 683... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| 0 0 0 0 0 ... |
Test 6
Subtask: 1, 2, 3, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 10 10 14574963 14574963 14574963 864... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| 0 0 0 0 0 ... |
Test 7
Subtask: 1, 2, 3, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 237541216 237541216 35036522 6... |
| correct output |
|---|
| -1 -1 -1 2 -1 ... |
| user output |
|---|
| 2 -1 -1 -1 -1 ... |
Feedback: Incorrect character on line 1 col 1: expected "-1", got "2"
Test 8
Subtask: 1, 2, 3, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 10 10 319425549 513116712 539199939 ... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 -1 -1 -1 ... |
Test 9
Subtask: 1, 2, 3, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 10 10 54363219 54363219 110986323 11... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| 0 0 0 0 0 ... |
Test 10
Subtask: 1, 2, 3, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 10 5 55687086 550701455 326656159 5... |
| correct output |
|---|
| -1 -1 -1 -1 -1 |
| user output |
|---|
| -1 -1 -1 -1 -1 |
Test 11
Subtask: 2, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 35889584 588130796 815837475 8... |
| correct output |
|---|
| -1 -1 1 1 1 ... |
| user output |
|---|
| -1 -1 1 1 1 ... |
Feedback: Incorrect character on line 6 col 1: expected "-1", got "0"
Test 12
Subtask: 2, 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 679842175 48724877 720966351 6... |
| correct output |
|---|
| 2 3 2 1 1 ... |
| user output |
|---|
| 2 3 2 2 2 ... |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 13
Subtask: 2, 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 893310183 811950921 338863962 ... |
| correct output |
|---|
| 2 1 1 2 5 ... |
| user output |
|---|
| 2 2 |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 14
Subtask: 2, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 10 10 221045363 282395847 441913686 ... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| 0 0 0 0 0 ... |
Test 15
Subtask: 2, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 509019662 983949268 960017302 ... |
| correct output |
|---|
| 3 -1 3 3 3 ... |
| user output |
|---|
| 3 -1 3 2 3 ... |
Feedback: Incorrect character on line 4 col 1: expected "3", got "2"
Test 16
Subtask: 3, 7
Verdict: WRONG ANSWER
| input |
|---|
| 200000 200000 2277053 2277053 2277053 227705... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 -1 -1 -1 ... |
Feedback: Incorrect character on line 7407 col 1: expected "-1", got "2"
Test 17
Subtask: 3, 7
Verdict: WRONG ANSWER
| input |
|---|
| 200000 200000 6767 16596 16596 27202 37272 4... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 -1 -1 -1 ... |
Feedback: Incorrect character on line 175625 col 1: expected "-1", got "1"
Test 18
Subtask: 3, 7
Verdict: WRONG ANSWER
| input |
|---|
| 200000 200000 5393 5910 9099 15755 15755 164... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 -1 -1 -1 ... |
Feedback: Incorrect character on line 15332 col 1: expected "-1", got "2"
Test 19
Subtask: 3, 7
Verdict: WRONG ANSWER
| input |
|---|
| 200000 200000 3779 4629 8999 10468 22605 227... |
| correct output |
|---|
| -1 1 2 -1 -1 ... |
| user output |
|---|
| -1 1 2 -1 -1 ... |
Feedback: Incorrect character on line 197956 col 1: expected "-1", got "2"
Test 20
Subtask: 3, 7
Verdict: WRONG ANSWER
| input |
|---|
| 200000 200000 878 2791 10849 11861 13405 239... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 -1 -1 -1 ... |
Feedback: Incorrect character on line 172656 col 1: expected "-1", got "2"
Test 21
Subtask: 3, 7
Verdict: ACCEPTED
| input |
|---|
| 200000 200000 430 1479 1992 2829 7152 14093 ... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 -1 -1 -1 ... |
Test 22
Subtask: 3, 7
Verdict: ACCEPTED
| input |
|---|
| 199997 200000 2733 10526 13882 14035 14689 3... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 -1 -1 -1 ... |
Test 23
Subtask: 3, 7
Verdict: ACCEPTED
| input |
|---|
| 200000 200000 12345 13538 15407 18490 18984 ... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| 0 0 0 0 0 ... |
Test 24
Subtask: 4, 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
| correct output |
|---|
| -1 1 -1 -1 -1 ... |
| user output |
|---|
| (empty) |
Test 25
Subtask: 4, 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
| correct output |
|---|
| 1 -1 1 -1 1 ... |
| user output |
|---|
| (empty) |
Test 26
Subtask: 4, 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 2 2 1 1 2 1 2 1 2 2 2 1 1 1 2 ... |
| correct output |
|---|
| 4 3 2 2 6 ... |
| user output |
|---|
| (empty) |
Test 27
Subtask: 4, 7
Verdict: ACCEPTED
| input |
|---|
| 200000 200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| 0 0 0 0 0 ... |
Test 28
Subtask: 4, 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ... |
| correct output |
|---|
| 8513 1099 35939 9299 19597 ... |
| user output |
|---|
| (empty) |
Test 29
Subtask: 4, 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ... |
| correct output |
|---|
| 178345 169257 62115 96143 64796 ... |
| user output |
|---|
| (empty) |
Test 30
Subtask: 5, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 5000 5000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
| correct output |
|---|
| 1 1 -1 1 -1 ... |
| user output |
|---|
| 1 1 -1 1 -1 ... |
Feedback: Incorrect character on line 109 col 1: expected "3", got "2"
Test 31
Subtask: 5, 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 5000 5000 1 2 3 4 5 6 7 8 9 72 145 47 19... |
| correct output |
|---|
| -1 2 -1 2 -1 ... |
| user output |
|---|
| -1 2 -1 2 -1 ... |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 32
Subtask: 5, 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 4999 5000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
| correct output |
|---|
| -1 2 -1 -1 -1 ... |
| user output |
|---|
| -1 2 -1 -1 -1 ... |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 33
Subtask: 5, 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 5000 5000 4033 4368 3086 3208 4313 388 8... |
| correct output |
|---|
| 3 3 3 3 11 ... |
| user output |
|---|
| 3 2 2 2 9 ... |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 34
Subtask: 5, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 5000 5000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| 0 0 0 0 0 ... |
Test 35
Subtask: 5, 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 5000 5000 5000 4999 4998 4997 4996 4995 ... |
| correct output |
|---|
| 2039 1910 -1 687 673 ... |
| user output |
|---|
| 2039 1909 -1 687 673 ... |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 36
Subtask: 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 5000 5000 202010 457852 826471 926337 10... |
| correct output |
|---|
| -1 -1 2 -1 -1 ... |
| user output |
|---|
| -1 -1 2 -1 -1 ... |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 37
Subtask: 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 5000 5000 190583 326486 431922 462939 72... |
| correct output |
|---|
| -1 -1 -1 -1 2 ... |
| user output |
|---|
| -1 -1 -1 -1 2 ... |
Feedback: Incorrect character on line 22 col 1: expected "3", got "2"
Test 38
Subtask: 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 5000 5000 821998255 400550008 71790232 5... |
| correct output |
|---|
| 5 3 3 2 5 ... |
| user output |
|---|
| 3 2 2 2 5 ... |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 39
Subtask: 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 5000 5000 266174928 446601941 191252234 ... |
| correct output |
|---|
| 3 3 414 4 3 ... |
| user output |
|---|
| 2 2 413 3 2 ... |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 40
Subtask: 6, 7
Verdict: ACCEPTED
| input |
|---|
| 5000 5000 11621 243915 243915 949123 137... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| 0 0 0 0 0 ... |
Test 41
Subtask: 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 5000 5000 999767052 998555066 997822810 ... |
| correct output |
|---|
| 919 459 505 833 809 ... |
| user output |
|---|
| 919 459 505 833 809 ... |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 42
Subtask: 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 478025 478025 478025 478025 47... |
| correct output |
|---|
| -1 -1 2 2 2 ... |
| user output |
|---|
| (empty) |
Test 43
Subtask: 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 1810 2088 3022 3097 7459 7943 ... |
| correct output |
|---|
| 2 -1 -1 2 -1 ... |
| user output |
|---|
| (empty) |
Test 44
Subtask: 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 199531 200000 11328 26391 30353 37063 44412 ... |
| correct output |
|---|
| -1 2 -1 2 2 ... |
| user output |
|---|
| (empty) |
Test 45
Subtask: 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 106738201 369187074 412614650 ... |
| correct output |
|---|
| 2 12 3 19 3 ... |
| user output |
|---|
| (empty) |
Test 46
Subtask: 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 670611290 43427363 8475380 309... |
| correct output |
|---|
| 3 5 3 3 3 ... |
| user output |
|---|
| (empty) |
Test 47
Subtask: 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 907542569 504758282 948727805 ... |
| correct output |
|---|
| 3 33 3 3 3 ... |
| user output |
|---|
| (empty) |
Test 48
Subtask: 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 487056731 460461648 142698485 ... |
| correct output |
|---|
| 3 3 3 3 3 ... |
| user output |
|---|
| (empty) |
Test 49
Subtask: 7
Verdict: ACCEPTED
| input |
|---|
| 200000 200000 12772 23236 23236 23236 41149 ... |
| correct output |
|---|
| 0 0 0 0 0 ... |
| user output |
|---|
| 0 0 0 0 0 ... |
Test 50
Subtask: 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 999993539 999993361 999993361 ... |
| correct output |
|---|
| 125375 16687 -1 84781 46147 ... |
| user output |
|---|
| (empty) |
Test 51
Subtask: 7
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 200000 200000 999993539 999993361 999993361 ... |
| correct output |
|---|
| 94788 177608 95881 56377 179957 ... |
| user output |
|---|
| (empty) |
Test 52
Subtask: 1, 2, 3, 5, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 5 1 2 1 3 5 4 2 2 |
| correct output |
|---|
| 2 |
| user output |
|---|
| 2 |
Test 53
Subtask: 1, 2, 3, 4, 5, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 2 1 1 2 1 1 |
| correct output |
|---|
| 0 |
| user output |
|---|
| 0 |
Test 54
Subtask: 2, 5, 6, 7
Verdict: ACCEPTED
| input |
|---|
| 4 1 2 1 4 3 3 2 |
| correct output |
|---|
| 2 |
| user output |
|---|
| 2 |
Test 55
Subtask: 1, 2, 3, 4, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 1 1 1 1 2 2 1 1 2 2 7 1 2 6 4 5 ... |
| correct output |
|---|
| -1 1 -1 -1 -1 ... |
| user output |
|---|
| 1 1 -1 0 1 ... |
Feedback: Incorrect character on line 1 col 1: expected "-1", got "1"
Test 56
Subtask: 1, 2, 3, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 181777772 181777772 181777772 ... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 1 -1 -1 ... |
Feedback: Incorrect character on line 3 col 1: expected "-1", got "1"
Test 57
Subtask: 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 100 10 92800811 524548163 939127795 9... |
| correct output |
|---|
| -1 -1 3 -1 3 ... |
| user output |
|---|
| -1 -1 2 -1 2 ... |
Feedback: Incorrect character on line 3 col 1: expected "3", got "2"
Test 58
Subtask: 3, 4, 7
Verdict: WRONG ANSWER
| input |
|---|
| 100 100000 2 2 2 1 2 2 2 2 1 2 1 1 1 2 2 ... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 -1 -1 -1 ... |
Feedback: Incorrect character on line 3316 col 1: expected "-1", got "1"
Test 59
Subtask: 3, 7
Verdict: WRONG ANSWER
| input |
|---|
| 100 100000 172695325 172695325 172695325 ... |
| correct output |
|---|
| -1 -1 -1 -1 -1 ... |
| user output |
|---|
| -1 -1 -1 -1 -1 ... |
Feedback: Incorrect character on line 31 col 1: expected "-1", got "1"
Test 60
Subtask: 2, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 4 10 869194539 239439572 968540665 ... |
| correct output |
|---|
| -1 2 -1 -1 -1 ... |
| user output |
|---|
| -1 2 -1 1 1 ... |
Feedback: Incorrect character on line 4 col 1: expected "-1", got "1"
Test 61
Subtask: 2, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 55366041 112170735 112170735 5... |
| correct output |
|---|
| -1 -1 2 1 1 ... |
| user output |
|---|
| -1 -1 3 1 2 ... |
Feedback: Incorrect character on line 3 col 1: expected "2", got "3"
Test 62
Subtask: 2, 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 156018639 156018639 445832758 ... |
| correct output |
|---|
| -1 1 -1 -1 2 ... |
| user output |
|---|
| -1 |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of rangeTest 63
Subtask: 2, 6, 7
Verdict: WRONG ANSWER
| input |
|---|
| 10 10 702507512 702507512 892090406 ... |
| correct output |
|---|
| -1 2 -1 2 2 ... |
| user output |
|---|
| 2 2 -1 2 2 ... |
Feedback: Incorrect character on line 1 col 1: expected "-1", got "2"
Test 64
Subtask: 2, 6, 7
Verdict: RUNTIME ERROR
| input |
|---|
| 10 10 720324490 720324490 720324490 ... |
| correct output |
|---|
| -1 2 2 1 -1 ... |
| user output |
|---|
| -1 2 2 |
Error:
Traceback (most recent call last):
File "/box/input/code.py", line 87, in <module>
elif Rsort[a] or Lsort[n - b - 1]:
IndexError: list index out of range