Submission #543802

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5438022022-03-31 12:11:36timreizinAliens (IOI07_aliens)C++17
Compilation error
0 ms0 KiB
#include <iostream>
#include <vector>
#include <array>
#include <numeric>
using namespace std;
using ll = long long;
int N;
int table[100][100];
bool ask(int x, int y)
{
if (x < 1 || y < 1 || y > N || x > N) return false;
cout << "examine " << x << ' ' << y << '\n';
cout.flush();
string res;
cin >> res;
return res == "true";
}
tuple<int, int, int> find(int xl, int xr, int y0)
{
for (int i = 0; i < 3; ++i)
{
for (int j = i; j < 3; ++j)
{
if ((xr - xl + 1) % ((j - i) * 2 + 1) != 0) continue;
int m = (xr - xl + 1) / ((j - i) * 2 + 1);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

aliens.cpp:23:49: error: return type 'class std::tuple<int, int, int>' is incomplete
   23 | tuple<int, int, int> find(int xl, int xr, int y0)
      |                                                 ^
aliens.cpp: In function 'void find(int, int, int)':
aliens.cpp:61:5: error: 'assert' was not declared in this scope
   61 |     assert(false);
      |     ^~~~~~
aliens.cpp:5:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
    4 | #include <numeric>
  +++ |+#include <cassert>
    5 | 
aliens.cpp: In function 'int main()':
aliens.cpp:112:10: error: 'void <structured bindings>' has incomplete type
  112 |     auto [x, m, t] = find(xl, xr, y0);
      |          ^~~~~~~~~