# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
255982 | 2020-08-02T07:27:43 Z | 최은수(#5029) | Colors (BOI20_colors) | C++17 | 0 ms | 384 KB |
#include<iostream> #include<vector> #include<set> #include<algorithm> #define ep emplace #define eb emplace_back #define fi first #define se second #define all(x) (x).begin(),(x).end() using namespace std; typedef long long ll; typedef pair<int,int>pi; typedef pair<ll,ll>pl; const int inf=1e9+7; const ll INF=1e18+7; inline int query(ll x) { cout<<"? "<<x; int r; cin>>r; return r; } inline void answer(ll x) { cout<<"= "<<x; return; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); ll n; cin>>n; if(n<=64) { query(1); int cp=1; int cs=1; for(int i=n;i-->1;) { cp+=cs*i; int r=query(cp); if(r==0) { answer(i+1); return 0; } } answer(1); return 0; } ll s=1,e=n; ll pm=-INF; set<ll>st; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 0 ms | 384 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 0 ms | 384 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 0 ms | 384 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 0 ms | 384 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 0 ms | 384 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |