結果
| 問題 |
No.2828 Remainder Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-02 21:35:34 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 785 bytes |
| コンパイル時間 | 1,986 ms |
| コンパイル使用メモリ | 194,548 KB |
| 最終ジャッジ日時 | 2025-02-23 19:53:53 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int N; cin >> N;
int answer = 0;
vector<int> C(N+1,-1);
for(int i=1; i<=5; i++){
int low = 0,high = N;
while(high-low > 1){
int mid = (low+high)/2;
int &c = C.at(mid);
if(c == -1){
cout << N+1 << " " << mid << endl;
for(int k=1; k<=mid; k++){
if(k > 1) cout << " ";
cout << k;
}
cout << endl;
cin >> c;
}
if(c < i) low = mid;
else high = mid;
}
answer += high;
}
cout << "0 1" << endl;
cout << answer << endl;
}