# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
890364 | Sir_Ahmed_Imran | Aliens (IOI07_aliens) | C++17 | 2 ms | 444 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
///~~~LOTA~~~///
#include <bits/stdc++.h>
using namespace std;
bool query(int x,int y){
string s;
cout<<"examine "<<x<<' '<<y<<endl;
cin>>s;
return (s=="true");
}
void solve(){
int n,m,o,p,q,x1,x2,y1,y2;
cin>>n>>p>>q;
for(x2=p+1;x2<=n;x2++)
if(!query(x2,q))
break;
for(x1=p-1;x1>0;x1--)
if(!query(x1,q))
break;
p=(x1+x2)/2;
m=2*(x2-x1-1);
for(y2=q+1;y2<=n;y2++)
if(!query(p,y2))
break;
for(y1=q-1;y1>0;y1--)
if(!query(p,y1))
break;
q=(y2+y1)/2;
for(x1=p-m;x1>0;x1-=m)
if(!query(x1,q))
break;
for(x2=p+m;x2<=n;x2+=m)
if(!query(x2,q))
break;
for(y1=q-m;y1>0;y1-=m)
if(!query(p,y1))
break;
for(y2=q+m;y2<=n;y2+=m)
if(!query(p,y2))
break;
cout<<"solution "<<(x1+x2)/2<<' '<<(y1+y2)/2<<endl;
}
int main(){
solve();
return 0;
}
컴파일 시 표준 에러 (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... |