Submission #1131961

#TimeUsernameProblemLanguageResultExecution timeMemory
1131961djsksbrbfAliens (IOI07_aliens)C++20
0 / 100
0 ms432 KiB
/*
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⡤⢶⡺⠛⢓⡶⢤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡟⠀⠀⢀⡗⠀⠸⡇⠀⠈⢻⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣼⠁⠀⢀⡞⠀⣀⠀⢳⡀⠀⠈⣧⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⠴⠶⢿⣉⢡⡷⠦⠤⠬⠴⠊⣍⡳⣮⡷⠤⣴⢿⣏⣹⠷⠶⠤⣤⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠠⣶⣶⣛⡉⠁⣀⣀⣀⣀⣈⣿⠲⠦⣤⣀⡴⣊⣭⡑⢬⣻⣷⠷⠖⣿⠤⠤⣤⣤⣀⣀⣉⣉⣻⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠙⠯⣟⡻⠿⣯⣤⣠⠤⠟⠓⢲⡦⣬⣷⣝⣶⣻⣾⣥⣴⣶⡛⠛⠧⢄⣀⣠⡴⠾⠛⣋⡽⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢶⣤⣉⠙⠿⣶⣞⡁⠀⠀⢸⠋⠛⢹⡇⠀⠀⠀⢉⣽⠶⠛⠉⣁⣴⠖⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠷⣦⣈⠙⢿⣦⣀⣸⡇⠀⠈⡇⢀⣤⡾⠛⢁⣠⠖⣫⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣨⡽⠳⢦⡈⠛⢿⣇⣀⣠⡿⠟⢅⣤⠖⠋⣠⡴⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠻⣇⠀⠸⣿⣷⣄⡉⠛⢋⣠⣾⣿⠗⠀⢠⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⠀⠈⠢⡀⠈⠳⠽⠟⠒⠋⠻⠟⠁⠀⢴⠟⣡⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⣀⡈⠓⠦⡄⠀⠀⠀⠀⢀⣠⠞⢁⠔⠹⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠋⠀⣰⣷⣭⣲⡤⠀⠀⠀⠀⠀⠉⠀⠒⠁⠀⠀⢯⠳⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⡞⠳⢦⣠⣿⠃⣹⠀⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⠷⠿⠙⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢀⣠⢶⣫⣿⣿⢿⣦⣀⡿⢿⣰⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⡋⠉⢳⡀⢀⢠⣾⣿⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⢀⣠⠖⣫⣵⢿⣽⡿⢿⡽⢻⣏⣀⠴⣻⢳⠦⢤⣤⣤⣤⣤⠴⠖⣛⣧⡙⢟⢦⡀⠙⣟⣿⡺⣾⣝⡿⣯⣗⢤⣀⠀⠀⠀⠀⠀⠀
⠀⠀⣴⣟⣿⣟⣯⣾⢟⣫⣾⡿⠞⠁⢨⠏⡴⣱⠯⠶⠒⠚⣉⣩⠤⠖⠋⠁⠀⠙⣎⢳⡘⣟⠋⠲⣝⣾⣝⣿⣾⣝⠿⣮⣗⣤⣤⡀⠀⠀
⠀⣠⣿⢿⣷⣿⣮⣵⢟⡽⠋⠀⠀⢀⡞⢰⣳⠃⡴⠖⠚⠉⠉⠀⠀⠀⠀⠀⣠⠞⢈⣧⣳⡘⣆⠀⠀⠑⢯⣳⣮⡛⢿⣮⡟⣻⣿⣧⡀⠀
⢘⣿⣷⡞⠻⣿⣟⡵⠋⠀⠀⠀⠀⣼⢀⣧⡏⣸⠃⠀⠀⠀⠀⠀⠀⠀⠀⡴⠁⣠⠞⠈⢧⢧⠸⡄⠀⠀⠀⠉⠫⡻⢿⢟⣾⣿⡙⠻⢷⣄
⠋⠀⠙⠿⣦⣽⣿⣿⡀⠀⠀⠀⢀⡇⢸⣼⢀⡏⠀⠀⠀⠀⠀⠀⠀⢀⡞⠀⡴⠁⠀⠀⠘⡟⡆⢻⠀⠀⠀⠀⠀⢘⣦⣞⡞⢀⣿⣶⣿⣿
⡇⠀⢀⠔⢻⡘⡟⣟⣷⡀⠀⠀⢸⡇⣿⡇⣸⠁⠀⠀⠀⠀⠀⠀⢠⠞⢀⠞⠀⠀⠀⠀⠀⢻⣷⠘⡇⠀⠀⠀⢀⣾⢯⣾⠶⣷⠋⠁⠀⠀
⡟⠛⠁⠀⠘⡇⣧⠘⣿⣷⡄⠀⢸⡇⣿⣇⣿⠀⠀⠀⠀⠀⠀⢀⡎⢠⠏⠀⠀⠀⠀⠀⠀⠸⣿⡄⣇⠀⠀⢀⣾⢏⡞⣼⢸⠇⠉⠲⠤⣀
⡇⠀⠀⠀⠀⣷⢻⠀⠘⢿⣿⠶⠾⢧⡟⢿⡇⠀⠀⠀⠀⠀⠀⡼⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⣿⠀⢀⣾⢯⡞⠀⡟⣸⠀⠀⠀⠀⠀
⣧⠀⠀⠀⠀⢻⢸⠀⠀⠘⣿⢦⠀⠀⣷⡿⡇⠀⠀⠀⠀⢀⠼⢁⡾⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡟⠉⠉⢹⣯⠏⠀⠀⡇⣿⠀⠀⠀⠀⠀
⢸⡀⠀⠀⠀⢸⣾⡇⠀⠀⣇⠹⣿⠿⠿⠷⡙⢆⢀⡠⠞⣁⠴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣷⠤⠴⡿⣿⠀⠀⠀⡇⡿⠀⠀⠀⠀⠀
⠀⢷⡀⠀⣠⢞⡽⠁⠀⢀⡏⣠⠏⠀⠀⠀⠈⢪⡉⣤⠚⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⣏⠁⣿⠀⠀⢠⡇⣇⠀⠀⠀⠀⢰
⠀⢺⣍⠉⠹⠊⠀⠀⠀⢸⡛⠁⠀⠀⠀⠀⠀⠘⡇⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢦⣸⡄⠀⠀⠓⠈⠢⣀⣠⠔⢳
⠀⢠⡏⠀⠀⠀⠀⠀⠀⠈⣳⠀⠀⠀⠀⠀⠀⠀⡇⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⠀⠀⠀⠀⠀⠀⠀⢠⠏
⠀⠀⡇⠀⠀⠀⠀⠀⠀⢸⣟⣇⠀⠀⠀⠀⠀⠀⣷⢸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⠀⠀⠀⠀⠀⠀⠀⢸⠀

*/


// made by djsksbrbf, 2025
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
#define pb push_back
#define fi first
#define se second
const int MOD = 1e9 + 7;
const int MODD = 998244353;
const int MAX = 2e5 + 5;

int n, xo, yo;

bool ask(int a, int b){
	if(1 > a || a > n || 1 > b || b > n)return 0;
	
	cout << "ask " << a << ' ' << b << endl;
	fflush(stdout);
	
	string aaa; cin >> aaa;
	return (aaa == "true");
}

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> n >> xo >> yo;
	// idea to be find left most x for now
	int x = xo, y = yo;
	int sx = xo, sy = yo;
	
	for(int i = 31 ; i <= 0 ; i--){
		x = xo - (1 << i);
		y = yo;
		
		if(ask(x, y)){
			sx = x;
			sy = y;
		}
	}
	
	for(int i = 31 ; i >= 0 ; i--){
		x = xo;
		y = yo - (1 << i);
		
		if(ask(x, y)){
			sx = x;
			sy = y;
		}
	}
	
	for(int i = 31 ; i >= 0 ; i--){
		x = xo - (1 << i);
		y = yo - (1 << i);
		
		if(ask(x, y)){
			sx = x;
			sy = y;
		}
	}
	
	x = sx;
	y = sy;
	
	int m = 0;
	for(int i = 31 ; i >= 0 ; i--){
		if(ask(x + (1 << i), y + (1 << i))){
			m += (1 << i);
			x += (1 << i);
			y += (1 << i);
		}
	}
	
	cout << "solution " << x + (m / 2) << ' ' << y + (m / 2) << endl;
	
	return 0;
}
#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...