Submission #502230

#TimeUsernameProblemLanguageResultExecution timeMemory
502230srivatsav_kannanColors (BOI20_colors)C++14
0 / 100
1 ms200 KiB
#include <iostream> #include <fstream> #include <vector> #include <set> #include <queue> #include <cmath> #include <map> #include <algorithm> #include <unordered_map> using namespace std; #define int long long int signed main() { int n; cin >> n; int l = 1, r = n; int prev = 1; cout << "? 1" << endl; int cur; cin >> cur; cout << "= " << prev << endl; // while (l <= r){ // int mid = (l+r)/2; // if (l == r-1) mid = r; // cout << "? " << prev+mid << endl; // cin >> cur; // prev += mid; // if (cur){ // if (l == r){ // cout << "= " << l << endl; // break; // } // l = mid; // } else { // r = mid-1; // } // } return 0; }

Compilation message (stderr)

Colors.cpp: In function 'int main()':
Colors.cpp:14:9: warning: unused variable 'l' [-Wunused-variable]
   14 |     int l = 1, r = n;
      |         ^
Colors.cpp:14:16: warning: unused variable 'r' [-Wunused-variable]
   14 |     int l = 1, r = n;
      |                ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...