結果
| 問題 | No.1149 色塗りゲーム |
| コンテスト | |
| ユーザー |
leaf_1415
|
| 提出日時 | 2020-08-07 21:27:34 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 138 ms / 2,000 ms |
| コード長 | 1,100 bytes |
| 記録 | |
| コンパイル時間 | 2,155 ms |
| コンパイル使用メモリ | 79,208 KB |
| 実行使用メモリ | 25,476 KB |
| 平均クエリ数 | 19.88 |
| 最終ジャッジ日時 | 2024-07-17 04:13:11 |
| 合計ジャッジ時間 | 8,234 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <iostream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <cassert>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#include <utility>
#define llint long long
#define inf 1e18
#define rep(x, s, t) for(llint (x) = (s); (x) < (t); (x)++)
#define Rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))
using namespace std;
typedef pair<llint, llint> P;
llint n;
int main(void)
{
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
llint res;
if(n <= 2){
cout << n << " " << 1 << endl;
cin >> res;
return 0;
}
llint off = (n+1)/2;
if(n % 2) cout << 1 << " ";
else cout << 2 << " ";
cout << off << endl;
if(n % 2 == 0) off++;
llint len, pos;
while(1){
cin >> res;
if(res <= 1) return 0;
cin >> len >> pos;
if(pos < off) cout << len << " " << pos + off << endl;
else cout << len << " " << pos - off << endl;
}
return 0;
}
leaf_1415