| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1000003 | Newtonabc | Aliens (IOI07_aliens) | C++14 | 2 ms | 344 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a,b,k=0,prev;
cin>>n >>a >>b;
int tmpa=a,tmpb=b,da=a,db=b;
while(true){
string s;
if(tmpa+(1<<k)>n){
if(k==0) break;
k=0,tmpa=prev;
continue;
}
cout<<"examine " <<tmpa+(1<<k) <<" " <<b <<" " <<k <<endl;
cin>>s;
if(s=="true") k++,prev=tmpa+(1<<k);
else{
if(k==0) break;
k=0,tmpa=prev;
}
}
while(true){
string s;
if(tmpb+(1<<k)>n){
if(k==0) break;
k=0,tmpb=prev;
continue;
}
cout<<"examine " <<a <<" " <<tmpb+(1<<k) <<endl;
cin>>s;
if(s=="true") k++,prev=tmpb+(1<<k);
else{
if(k==0) break;
k=0,tmpa=prev;
}
}
while(true){
string s;
if(da-(1<<k)<0){
if(k==0) break;
k=0,da=prev;
continue;
}
cout<<"examine " <<da-(1<<k) <<" " <<b <<endl;
cin>>s;
if(s=="true") k++,prev=da-(1<<k);
else{
if(k==0) break;
k=0,da=prev;
}
}
while(true){
string s;
if(db-(1<<k)<0){
if(k==0) break;
k=0,db=prev;
continue;
}
cout<<"examine " <<a <<" " <<db-(1<<k) <<endl;
cin>>s;
if(s=="true") k++,prev=db-(1<<k);
else{
if(k==0) break;
k=0,db=prev;
}
}
cout<<"solution " <<(da+tmpa)/2 <<" " <<(db+tmpb)/2;
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
