結果
| 問題 |
No.1149 色塗りゲーム
|
| コンテスト | |
| ユーザー |
milanis48663220
|
| 提出日時 | 2020-08-07 21:46:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,403 bytes |
| コンパイル時間 | 803 ms |
| コンパイル使用メモリ | 82,880 KB |
| 実行使用メモリ | 25,476 KB |
| 平均クエリ数 | 15.68 |
| 最終ジャッジ日時 | 2024-07-17 04:30:56 |
| 合計ジャッジ時間 | 6,827 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 WA * 24 |
ソースコード
#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 << 2 << ' ' << 1 << endl;
cin >> t;
return 0;
}
if(N%2 == 1){
int m = N/2+1;
cout << 1 << ' ' << m << endl;
while(true){
cin >> t;
if(t <= 1) return 0;
if(t == 2) {
cin >> k >> x;
return 0;
}
cin >> k >> x;
if(x < m){
cout << k << ' ' << x+m << endl;
}else{
cout << k << ' ' << x-m << endl;
}
}
}
if(N%2 == 0){
int m = N/2;
cout << 2 << ' ' << m << endl;
while(true){
cin >> t;
if(t <= 1) return 0;
if(t == 2) {
cin >> k >> x;
return 0;
}
cin >> k >> x;
if(x < m){
cout << k << ' ' << x+m << endl;
}else{
cout << k << ' ' << x-m << endl;
}
}
}
}
milanis48663220