結果

問題 No.1149 色塗りゲーム
ユーザー takakintakakin
提出日時 2020-08-08 20:20:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 24,420 KB
平均クエリ数 19.88
最終ジャッジ日時 2023-09-24 05:25:45
合計ジャッジ時間 6,071 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
24,172 KB
testcase_01 AC 49 ms
23,612 KB
testcase_02 AC 44 ms
24,336 KB
testcase_03 AC 44 ms
23,688 KB
testcase_04 AC 44 ms
23,852 KB
testcase_05 AC 45 ms
23,888 KB
testcase_06 AC 47 ms
24,248 KB
testcase_07 AC 45 ms
23,968 KB
testcase_08 AC 45 ms
23,808 KB
testcase_09 AC 45 ms
24,420 KB
testcase_10 AC 47 ms
24,080 KB
testcase_11 AC 45 ms
24,228 KB
testcase_12 AC 46 ms
23,772 KB
testcase_13 AC 47 ms
23,800 KB
testcase_14 AC 47 ms
23,776 KB
testcase_15 AC 46 ms
23,812 KB
testcase_16 AC 45 ms
24,060 KB
testcase_17 AC 50 ms
23,700 KB
testcase_18 AC 47 ms
24,156 KB
testcase_19 AC 47 ms
23,728 KB
testcase_20 AC 47 ms
23,856 KB
testcase_21 AC 47 ms
23,840 KB
testcase_22 AC 49 ms
23,948 KB
testcase_23 AC 48 ms
23,956 KB
testcase_24 AC 53 ms
24,160 KB
testcase_25 AC 51 ms
23,880 KB
testcase_26 AC 48 ms
23,952 KB
testcase_27 AC 50 ms
24,032 KB
testcase_28 AC 48 ms
23,788 KB
testcase_29 AC 51 ms
23,712 KB
testcase_30 AC 84 ms
24,084 KB
testcase_31 AC 78 ms
23,800 KB
testcase_32 AC 84 ms
23,852 KB
testcase_33 AC 83 ms
24,028 KB
testcase_34 AC 88 ms
23,672 KB
testcase_35 AC 86 ms
23,884 KB
testcase_36 AC 91 ms
23,864 KB
testcase_37 AC 92 ms
24,284 KB
testcase_38 AC 90 ms
23,736 KB
testcase_39 AC 90 ms
23,812 KB
testcase_40 AC 94 ms
23,992 KB
testcase_41 AC 90 ms
23,932 KB
testcase_42 AC 97 ms
23,744 KB
testcase_43 AC 92 ms
23,820 KB
testcase_44 AC 104 ms
23,924 KB
testcase_45 AC 103 ms
23,708 KB
testcase_46 AC 102 ms
23,720 KB
testcase_47 AC 102 ms
23,576 KB
testcase_48 AC 103 ms
23,740 KB
testcase_49 AC 113 ms
23,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
if n%2:
	print(1,(n+1)//2,flush=True)
	a=(n+1)//2
else:
	print(2,n//2,flush=True)
	a=n//2+1

while True:
	t=int(input())
	if t==0:
		sys.exit()
	else:
		k,x=map(int,input().split())
		if x>a:
			print(k,x-a,flush=True)
		else:
			print(k,x+a,flush=True)
0