結果

問題 No.1149 色塗りゲーム
ユーザー tanimani364tanimani364
提出日時 2021-03-23 18:05:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 265 ms / 2,000 ms
コード長 524 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 96,488 KB
平均クエリ数 19.88
最終ジャッジ日時 2023-09-24 10:16:11
合計ジャッジ時間 13,701 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 190 ms
95,720 KB
testcase_01 AC 188 ms
96,064 KB
testcase_02 AC 186 ms
96,244 KB
testcase_03 AC 188 ms
96,096 KB
testcase_04 AC 187 ms
96,148 KB
testcase_05 AC 187 ms
96,068 KB
testcase_06 AC 188 ms
95,816 KB
testcase_07 AC 189 ms
95,836 KB
testcase_08 AC 188 ms
96,296 KB
testcase_09 AC 189 ms
96,064 KB
testcase_10 AC 190 ms
95,716 KB
testcase_11 AC 193 ms
96,232 KB
testcase_12 AC 192 ms
96,344 KB
testcase_13 AC 189 ms
96,488 KB
testcase_14 AC 191 ms
95,980 KB
testcase_15 AC 191 ms
96,048 KB
testcase_16 AC 189 ms
95,784 KB
testcase_17 AC 190 ms
95,972 KB
testcase_18 AC 188 ms
95,984 KB
testcase_19 AC 190 ms
95,468 KB
testcase_20 AC 188 ms
96,016 KB
testcase_21 AC 192 ms
95,740 KB
testcase_22 AC 192 ms
95,900 KB
testcase_23 AC 193 ms
95,960 KB
testcase_24 AC 194 ms
95,492 KB
testcase_25 AC 195 ms
95,840 KB
testcase_26 AC 192 ms
96,160 KB
testcase_27 AC 193 ms
96,252 KB
testcase_28 AC 196 ms
95,920 KB
testcase_29 AC 196 ms
95,892 KB
testcase_30 AC 233 ms
96,116 KB
testcase_31 AC 232 ms
96,456 KB
testcase_32 AC 235 ms
95,992 KB
testcase_33 AC 229 ms
96,060 KB
testcase_34 AC 239 ms
95,836 KB
testcase_35 AC 231 ms
96,076 KB
testcase_36 AC 235 ms
95,656 KB
testcase_37 AC 235 ms
96,084 KB
testcase_38 AC 237 ms
95,980 KB
testcase_39 AC 237 ms
95,760 KB
testcase_40 AC 243 ms
95,944 KB
testcase_41 AC 243 ms
95,968 KB
testcase_42 AC 251 ms
96,088 KB
testcase_43 AC 249 ms
95,900 KB
testcase_44 AC 256 ms
96,420 KB
testcase_45 AC 252 ms
95,824 KB
testcase_46 AC 249 ms
96,248 KB
testcase_47 AC 249 ms
96,264 KB
testcase_48 AC 250 ms
96,428 KB
testcase_49 AC 265 ms
95,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
#coding:utf-8

import math
import string
from sys import stdin
# import numpy as np
# from matplotlib import pyplot as plt

	
def main():
	read=stdin.readline

	#edit here!
	n=int(read())

	if n%2==1:
		print(1,(n+1)//2,flush=True)
	else:
		print(2,n//2,flush=True)
	
	while True:
		t=int(read())
		if t==0:
			break
		else:
			k,x=map(int,read().split())
			if x>(n+1)//2:
				y=n//2+1
				print(k,x-y,flush=True)
			else :
				y=n//2+1
				print(k,x+y,flush=True)
if __name__ == '__main__':
	main()
0