# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
986813 | shikgom2 | Poklon (COCI17_poklon) | Pypy 3 | 5033 ms | 133216 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.
import sys
input = sys.stdin.readline
from math import sqrt
mem = 100007
class Query:
def __init__(self, l, r, k):
self.l = l
self.r = r
self.k = k
def __lt__(self, other):
if self.l // sq == other.l // sq:
return self.r > other.r
return self.l // sq > other.l // sq
def add(g):
global res, b
if b[g] == 1: # 이 수가 1번 등장했었다면
res += 1
elif b[g] == 2: # 이 수가 2번 등장했었다면
res -= 1
b[g] += 1
def sub(g):
global res, b
if b[g] == 2: # 이 수가 2번 등장했었다면
res += 1
elif b[g] == 3: # 이 수가 3번 등장했었다면
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |