| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1356689 | sally | Dark Ride (EGOI25_darkride) | C++20 | 8 ms | 436 KiB |
#include<vector>
#include<iostream>
using namespace std;
int N;
int guess(int l, int r, int x) {
cout<<"? ";
for(int i=0; i<N; i++) {
if(l<=i && i<=r) cout<<x;
else cout<<(x+1)%2;
}
cout<<endl;
int res;
cin>>res;
return res;
}
int main() {
cin>>N;
vector<int> ans;
int L = 1, R = N-1;
while(L<R) {
int mid = (L+R)/2;
int res1 = guess(L, mid, 1);
if(res1%2) {
R = mid;
}
else {
L = mid+1;
}
}
cout<<"! "<<0<<' '<<R<<endl;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
