結果
| 問題 |
No.1149 色塗りゲーム
|
| コンテスト | |
| ユーザー |
milanis48663220
|
| 提出日時 | 2020-08-07 21:39:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,405 bytes |
| コンパイル時間 | 774 ms |
| コンパイル使用メモリ | 82,740 KB |
| 実行使用メモリ | 25,556 KB |
| 平均クエリ数 | 1.04 |
| 最終ジャッジ日時 | 2024-07-17 04:22:03 |
| 合計ジャッジ時間 | 6,151 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 49 |
ソースコード
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(10) << fixed;
int N;
int t, k, x;
cin >> N;
if(N == 1){
cout << 1 << ' ' << 1 << endl;
cin >> t;
return 0;
}
if(N == 2){
cout << 1 << ' ' << 2 << endl;
cin >> t;
return 0;
}
if(N%2 == 1){
int m = N/2+1;
cout << m << ' ' << 1 << endl;
while(true){
cin >> t;
if(t <= 1) return 0;
if(t == 2) {
cin >> k >> x;
return 0;
}
cin >> k >> x;
if(k < m){
cout << k+m << ' ' << x << endl;
}else{
cout << k-m << ' ' << x << endl;
}
}
}
if(N%2 == 0){
int m = N/2-1;
cout << m << ' ' << 2 << endl;
while(true){
cin >> t;
if(t <= 1) return 0;
if(t == 2) {
cin >> k >> x;
return 0;
}
cin >> k >> x;
if(k < m){
cout << k+m << ' ' << x << endl;
}else{
cout << k-m << ' ' << x << endl;
}
}
}
}
milanis48663220