# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
590338 | dnialh | Rope (JOI17_rope) | Pypy 3 | 1422 ms | 262144 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
from collections import Counter
import sys as sus
input = sus.stdin.readline
n, m = map(int, input().split())
c = list(range(1, m + 1))
c = list(map(int, input().split()))
ct = Counter(c)
ctl = [0] * (m + 1)
for i in range(1, m + 1):
ctl[i] = ct[i]
o = ct.most_common()
del ct
odd = Counter()
eve = Counter()
for i in range(n - 1):
s = min(c[i], c[i + 1])
b = max(c[i], c[i + 1])
if i % 2:
odd[(s << 20) | b] += 1
else:
eve[(s << 20) | b] += 1
for v in odd:
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |