結果
| 問題 | 
                            No.1149 色塗りゲーム
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tamato
                         | 
                    
| 提出日時 | 2020-08-07 21:30:04 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 184 ms / 2,000 ms | 
| コード長 | 592 bytes | 
| コンパイル時間 | 147 ms | 
| コンパイル使用メモリ | 82,484 KB | 
| 実行使用メモリ | 69,680 KB | 
| 平均クエリ数 | 19.88 | 
| 最終ジャッジ日時 | 2024-07-17 04:14:59 | 
| 合計ジャッジ時間 | 9,044 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 50 | 
ソースコード
mod = 1000000007
eps = 10**-9
def main():
    import sys
    input = sys.stdin.readline
    N = int(input())
    if N&1:
        n = N // 2 + 1
        print(1, (N+1) // 2)
        sys.stdout.flush()
    else:
        n = (N-2) // 2 + 2
        print(2, N//2)
        sys.stdout.flush()
    while True:
        t = int(input())
        if t == 0 or t == 1 or t == 2:
            exit()
        k, x = map(int, input().split())
        if x * 2 < N:
            print(k, x + n)
        else:
            print(k, x - n)
        sys.stdout.flush()
if __name__ == '__main__':
    main()
            
            
            
        
            
tamato