Submission #1131992

#TimeUsernameProblemLanguageResultExecution timeMemory
1131992marchell_hiiAliens (IOI07_aliens)C++20
100 / 100
0 ms436 KiB
// ███╗ ███╗ █████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗ ███╗ ███╗ █████╗ ██████╗ ██████╗██╗ ██╗███████╗██╗ ██╗ ██╗ ██╗██╗██╗ // ████╗ ████║██╔══██╗██╔══██╗██╔════╝ ██╔══██╗╚██╗ ██╔╝██╗ ████╗ ████║██╔══██╗██╔══██╗██╔════╝██║ ██║██╔════╝██║ ██║ ██║ ██║██║██║ // ██╔████╔██║███████║██║ ██║█████╗ ██████╔╝ ╚████╔╝ ╚═╝ ██╔████╔██║███████║██████╔╝██║ ███████║█████╗ ██║ ██║ ███████║██║██║ // ██║╚██╔╝██║██╔══██║██║ ██║██╔══╝ ██╔══██╗ ╚██╔╝ ██╗ ██║╚██╔╝██║██╔══██║██╔══██╗██║ ██╔══██║██╔══╝ ██║ ██║ ██╔══██║██║██║ // ██║ ╚═╝ ██║██║ ██║██████╔╝███████╗ ██████╔╝ ██║ ╚═╝ ██║ ╚═╝ ██║██║ ██║██║ ██║╚██████╗██║ ██║███████╗███████╗███████╗█████╗██║ ██║██║██║ // ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚════╝╚═╝ ╚═╝╚═╝╚═╝ // ඞ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣤⣤⣤⣤⣤⣤⣤⣄⡀ // ⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⡿⠛⠉⠉⠉⠉⠉⠉⠻⢿⣿⣷⡄ // ⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⠋⠀⠀⠀⠀⠀⠀⠀ ⢻⣿⣿⡄ // ⠀⠀⠀⠀⠀⠀⠀⣸⣿⡏⠀⠀⠀ ⣠⣾⣿⣿⣿⠿⠿⠿⢿⣿⣿⣄ // ⠀⠀⠀⠀⠀⠀⠀⣿⣿⠁⠀⠀ ⣿⣿⣯⠁⠀⠀⠀⠀⠀ ⠙⢿⣷⡄ // ⠀⠀⣀⣤⣴⣶⣶⣿⡟⠀⠀⠀ ⣿⣿⣿ ⣿⣷ // ⠀⢰⣿⡟⠋⠉⣹⣿⡇⠀⠀⠀ ⣿⣿⣿⣷⣦⣀⣀⣀⣀⣀⣀⣀⣿⣿ // ⢸⣿⡇ ⣿⣿⡇⠀⠀ ⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ // ⣸⣿⡇ ⣿⣿⡇⠀⠀⠀⠀ ⠉⠉⠉⠉⠉⠉⠉⠉⠉⡿⢻⡇ // ⠀⣿⣿ ⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⢸⣿⡇ // ⠀⣿⣿⠀ ⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⢸⣿⡇ // ⠀⣿⣿⠀⠀ ⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⢸⣿⡇ // ⠀⢿⣿ ⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⣿⡇ // ⠀⠸⣿⣦⡀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⣿⣿ // ⠀⠀⠛⢿⣿⣿⣿⣿⡇ ⠀⣠⣿⣿⣿⣿⣄ ⣿⣿ // ⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⣽⣿⡆ ⢸⣿⡇ // ⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⢹⣿⡆⠀⠀ ⣸⣿⠇ // ⠀⠀⠀⠀⠀⠀⠀⢿⣿⣦⣄⣀⣠⣴⣿⣿ ⠀⠈⠻⣿⣿⣿⣿⡿⠏ // ⠀⠀⠀⠀⠀⠀⠀⠈⠛⠻⠿⠿⠿⠿⠋⠁ #include<bits/stdc++.h> #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> #define plll pair<pll, pll> #define pdd pair<double, double> #define pu push_back #define po pop_back #define fi first #define se second #define fifi fi.fi #define fise fi.se #define sefi se.fi #define sese se.se #define cekcek cout<<'c'<<'e'<<'k'<<endl using namespace std; ll N, M, x, y, temp, L, R, mid, pos, l, r; string s; bool ask(ll a, ll b){ cout << "examine " << a << " " << b << endl; cout.flush(); cin >> s; if(s == "true") return true; else return false; } void sz(){ temp = 1; for(ll i = 1; i <= 60; i++){ if(x + temp <= N){ if(!ask(x + temp, y)) break; temp *= 2; } else break; } if(temp == 1) r = x; else{ L = x + temp / 2; R = min(x + temp - 1, N); while(L <= R){ mid = (L + R) / 2; if(ask(mid, y)){ L = mid + 1; r = mid; } else R = mid - 1; } } temp = 1; for(ll i = 1; i <= 60; i++){ if(x - temp >= 1){ if(!ask(x - temp, y)) break; temp *= 2; } else break; } if(temp == 1) l = x; else{ L = max((ll)1, x - temp + 1); R = x - temp / 2; while(L <= R){ mid = (L + R) / 2; if(ask(mid, y)){ R = mid - 1; l = mid; } else L = mid + 1; } } x = l; M = r - l + 1; return; } void ps(){ //kiri bawah while(true){ if(x - M >= 1 && y - M >= 1 && ask(x - M, y - M)){ x -= M; y -= M; } else break; } while(true){ if(x - 2 * M >= 1 && ask(x - 2 * M, y)) x -= 2 * M; else break; } while(true){ if(y - 2 * M >= 1 && ask(x, y - 2 * M)) y -= 2 * M; else break; } L = 1; R = y; while(L <= R){ mid = (L + R) / 2; if(ask(x, mid)){ y = mid; R = mid - 1; } else L = mid + 1; } return; } int main(){ ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); cin >> N >> x >> y; sz(); ps(); x += 2 * M + M / 2; y += 2 * M + M / 2; cout << "solution " << x << " " << y << endl; cout.flush(); }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...