結果
| 問題 |
No.1149 色塗りゲーム
|
| コンテスト | |
| ユーザー |
keijak
|
| 提出日時 | 2021-04-19 21:44:14 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 774 bytes |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 57,216 KB |
| 最終ジャッジ日時 | 2024-07-17 11:14:11 |
| 合計ジャッジ時間 | 6,675 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 49 |
ソースコード
import sys
try:
import frosch
frosch.hook()
except ImportError:
pass
def debug(*a, **kw):
print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))
n = int(sys.stdin.readline())
if n <= 2:
print(n, 1)
t = int(sys.stdin.readline())
assert t == 0
exit(0)
rem = n
if n & 1:
mid = (n + 1) // 2
print(1, mid)
rem -= 1
else:
mid = n // 2
print(2, mid)
rem -= 2
assert rem % 2 == 0
while True:
t = int(sys.stdin.readline())
if t in [0, 1]:
exit(0)
k, x = [int(x) for x in sys.stdin.readline().split()]
if x < mid:
y = n + 1 - x
if k == 2:
y -= 1
print(k, y)
else:
if k == 2:
x += 1
y = n + 1 - x
print(k, y)
keijak