結果

問題 No.1149 色塗りゲーム
ユーザー tonnnura172tonnnura172
提出日時 2020-08-29 11:06:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 978 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 10,856 KB
実行使用メモリ 25,876 KB
平均クエリ数 19.82
最終ジャッジ日時 2023-09-24 06:34:07
合計ジャッジ時間 6,531 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
25,540 KB
testcase_01 AC 57 ms
25,256 KB
testcase_02 AC 60 ms
25,168 KB
testcase_03 AC 55 ms
25,548 KB
testcase_04 AC 56 ms
25,248 KB
testcase_05 AC 56 ms
25,240 KB
testcase_06 AC 53 ms
25,316 KB
testcase_07 AC 56 ms
25,500 KB
testcase_08 AC 55 ms
25,832 KB
testcase_09 AC 55 ms
25,736 KB
testcase_10 AC 58 ms
25,156 KB
testcase_11 AC 56 ms
25,092 KB
testcase_12 AC 56 ms
25,336 KB
testcase_13 AC 55 ms
25,724 KB
testcase_14 AC 56 ms
25,084 KB
testcase_15 AC 57 ms
25,512 KB
testcase_16 AC 58 ms
25,260 KB
testcase_17 AC 57 ms
25,876 KB
testcase_18 AC 56 ms
25,360 KB
testcase_19 AC 58 ms
25,088 KB
testcase_20 AC 59 ms
25,384 KB
testcase_21 AC 60 ms
25,548 KB
testcase_22 AC 57 ms
25,644 KB
testcase_23 AC 60 ms
25,796 KB
testcase_24 AC 60 ms
25,108 KB
testcase_25 AC 60 ms
25,584 KB
testcase_26 AC 59 ms
25,708 KB
testcase_27 AC 59 ms
25,392 KB
testcase_28 AC 60 ms
25,836 KB
testcase_29 AC 60 ms
25,576 KB
testcase_30 AC 97 ms
25,732 KB
testcase_31 AC 88 ms
25,160 KB
testcase_32 AC 89 ms
25,040 KB
testcase_33 AC 91 ms
25,308 KB
testcase_34 AC 94 ms
25,196 KB
testcase_35 AC 94 ms
25,408 KB
testcase_36 AC 97 ms
25,740 KB
testcase_37 AC 99 ms
25,764 KB
testcase_38 AC 94 ms
25,080 KB
testcase_39 AC 98 ms
25,660 KB
testcase_40 AC 107 ms
25,784 KB
testcase_41 AC 102 ms
25,620 KB
testcase_42 AC 102 ms
25,764 KB
testcase_43 AC 100 ms
25,172 KB
testcase_44 AC 110 ms
25,216 KB
testcase_45 AC 109 ms
25,524 KB
testcase_46 AC 109 ms
25,524 KB
testcase_47 AC 117 ms
25,548 KB
testcase_48 AC 116 ms
25,244 KB
testcase_49 AC 121 ms
25,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd, log2
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul, add
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.buffer.readline()[:-1]
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

if N%2 == 0:
    print(2, 0--N//2, flush=True)
else:
    print(1, 0--N//2, flush=True)

t = INT()
if t == 0:
    exit()

while t != 0:
    k, x = MAP()
    print(k, N-(x+(k==2))+1, flush=True)

    t = INT()
0