Submission #1339111

#TimeUsernameProblemLanguageResultExecution timeMemory
1339111po_rag526Aliens (IOI07_aliens)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
int N;
int x;
int y;
bool examine(int a, int b) 
{
    if (a < 1 || a > N || b < 1 || b > N)
    {
        return false;
    } 
    cout << "examine " << x << " " << y << endl;
    string str;
    cin >> str;
    return res == "true";
}
int main() 
{
    cin >> N;
    cin >> x;
    cin >> y;
    int left = x, right = x, top = y, bot = y;
    long long l = x;
    while(examine(l - 2, b)) l -= 2;
    left = l;
    cout << "solution " << x << " " << y << endl; 
    
    return 0;
}

Compilation message (stderr)

aliens.cpp: In function 'bool examine(int, int)':
aliens.cpp:15:12: error: 'res' was not declared in this scope
   15 |     return res == "true";
      |            ^~~
aliens.cpp: In function 'int main()':
aliens.cpp:24:26: error: 'b' was not declared in this scope
   24 |     while(examine(l - 2, b)) l -= 2;
      |                          ^