-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.py
69 lines (51 loc) · 1.4 KB
/
template.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import os
import sys
import math
import operator
from random import randint, randrange
from collections import defaultdict, Counter, deque
from itertools import permutations, combinations
from itertools import groupby, accumulate
from bisect import bisect_left, bisect_right
from functools import lru_cache, reduce
# sys.setrecursionlimit(200000000)
# MOD = 1000000000 + 7
PROFILE = False
ONE_CASE = False
input = lambda: sys.stdin.readline().rstrip("\r\n")
# print = lambda *args: sys.stdout.write(f"{args}\n")
_s = lambda: input().split()
_n = lambda: int(input())
_t = lambda: range(_n())
_in = lambda: list(map(int, input().split()))
_gen_rand = lambda a=10 ** 9, n=2 * 10 ** 5: [
randrange(1, a) for _ in range(1, randrange(2, n))
]
###################################################################
def tc():
pass
def main():
if not ONE_CASE:
for _ in _t():
tc()
else:
tc()
###################################################################
def init(profile=False):
if profile:
from pyinstrument import Profiler
profiler = Profiler()
profiler.start()
main()
profiler.stop()
profiler.print(color=True, timeline=True)
else:
main()
try:
sys.stdin = open("in.txt", "r")
sys.stdout = open("out.txt", "w")
sys.stderr = sys.stdout
except:
pass
if __name__ == "__main__":
init(PROFILE)