제출 #930554

#제출 시각아이디문제언어결과실행 시간메모리
930554Sir_Ahmed_ImranJoker (BOI20_joker)C++17
0 / 100
0 ms348 KiB
///~~~LOTA~~~/// #include <bits/stdc++.h> using namespace std; #define ll long long #define append push_back #define add insert #define nl "\n" #define ff first #define ss second #define pii pair<int,int> #define all(x) (x).begin(),(x).end() #define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL) #define N 90001 void solve(){ bool c; ll n,m,p,q; cin>>n; cout<<"? 1"<<endl; p=1; m=n-1; cin>>c; while(m){ if((n-m)%2){ cout<<"? "<<p+m<<endl; cin>>c; p+=m; } else{ cout<<"? "<<p-m<<endl; cin>>c; p-=m; } if(!c) break; m--; } cout<<"= "<<m+1<<endl; } int main(){ //L0TA; solve(); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

Joker.cpp: In function 'void solve()':
Joker.cpp:16:14: warning: unused variable 'q' [-Wunused-variable]
   16 |     ll n,m,p,q;
      |              ^
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...