結果

問題 No.1149 色塗りゲーム
ユーザー xuanjixuanji
提出日時 2020-08-07 21:42:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 165 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 87,852 KB
平均クエリ数 19.82
最終ジャッジ日時 2023-09-24 04:15:13
合計ジャッジ時間 8,623 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
87,248 KB
testcase_01 AC 94 ms
87,272 KB
testcase_02 AC 95 ms
87,324 KB
testcase_03 AC 97 ms
87,488 KB
testcase_04 AC 97 ms
87,148 KB
testcase_05 AC 98 ms
87,176 KB
testcase_06 AC 97 ms
87,564 KB
testcase_07 AC 96 ms
87,196 KB
testcase_08 AC 97 ms
86,960 KB
testcase_09 AC 97 ms
87,516 KB
testcase_10 AC 99 ms
87,388 KB
testcase_11 AC 97 ms
87,188 KB
testcase_12 AC 104 ms
87,720 KB
testcase_13 AC 99 ms
87,072 KB
testcase_14 AC 99 ms
87,216 KB
testcase_15 AC 99 ms
87,112 KB
testcase_16 AC 97 ms
87,500 KB
testcase_17 AC 105 ms
87,820 KB
testcase_18 AC 105 ms
87,788 KB
testcase_19 AC 105 ms
87,284 KB
testcase_20 AC 98 ms
87,412 KB
testcase_21 AC 99 ms
87,108 KB
testcase_22 AC 99 ms
87,124 KB
testcase_23 AC 101 ms
87,852 KB
testcase_24 AC 99 ms
87,004 KB
testcase_25 AC 100 ms
87,160 KB
testcase_26 AC 101 ms
87,148 KB
testcase_27 AC 109 ms
87,088 KB
testcase_28 AC 106 ms
87,232 KB
testcase_29 AC 101 ms
87,236 KB
testcase_30 AC 136 ms
87,268 KB
testcase_31 AC 136 ms
87,504 KB
testcase_32 AC 134 ms
86,644 KB
testcase_33 AC 141 ms
87,452 KB
testcase_34 AC 141 ms
86,896 KB
testcase_35 AC 134 ms
87,320 KB
testcase_36 AC 142 ms
86,892 KB
testcase_37 AC 144 ms
86,932 KB
testcase_38 AC 138 ms
87,012 KB
testcase_39 AC 146 ms
87,068 KB
testcase_40 AC 149 ms
87,128 KB
testcase_41 AC 147 ms
86,832 KB
testcase_42 AC 147 ms
87,568 KB
testcase_43 AC 143 ms
87,224 KB
testcase_44 AC 158 ms
87,396 KB
testcase_45 AC 152 ms
87,636 KB
testcase_46 AC 154 ms
87,452 KB
testcase_47 AC 164 ms
87,412 KB
testcase_48 AC 163 ms
87,316 KB
testcase_49 AC 165 ms
87,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env pypy3

import math

def fprint(*args):
	print(*args, flush=True)

N = int(input())

if N % 2 == 0:
	fprint(2, math.ceil(N/2))
else:
	fprint(1, math.ceil(N/2))

while True:
	status = int(input())
	if status == 0:
		break
	elif status == 3:
		a, b = input().split()
		a = int(a)
		b = int(b)
		assert(a in [1, 2])
		if a == 2:
			b += 1
		fprint(a, N+1-b)
	else:
		assert(False)
0