結果
問題 | No.2252 Find Zero |
ユーザー |
![]() |
提出日時 | 2023-03-24 22:01:25 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 75 ms / 2,000 ms |
コード長 | 513 bytes |
コンパイル時間 | 19,588 ms |
コンパイル使用メモリ | 350,916 KB |
最終ジャッジ日時 | 2025-02-11 17:18:06 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 |
ソースコード
#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; for( int i = 0; i+1 < N; i+=2 ) { int z; cout << "? " << i << ' ' << i+1 << endl; cin >> z; if( z == i ) { cout << "! " << i+1 << endl; return 0; }else if( z == i+1 ) { cout << "! " << i << endl; } } cout << "! " << N-1 << endl; }