Submission #1192645

#TimeUsernameProblemLanguageResultExecution timeMemory
1192645JooDdaeMemory 2 (JOI16_memory2)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; void Solve(int T, int N) { int M = N+N; vector<vector<int>> q(M, vector<int>(M, -1)); array<int, 2> v = {0, 1}; q[0][1] = q[1][0] = Flip(0, 1); for(int i=2;i<M;i++) { auto [x, y] = v; q[x][i] = q[i][x] = Flip(x, i); q[y][i] = q[y][i] = Flip(y, i); if(q[x][i] == q[x][y]) v = {y, i}; else if(q[y][i] == q[x][y]) v = {x, i}; } Answer(v[0], v[1], N-1); vector<int> c(N, -1); for(int i=0;i<M;i++) if(i != v[0] && i != v[1]) { int u = Flip(i, v[0]); if(c[u] != -1) Answer(c[u], i, u); else c[u] = i; } }

Compilation message (stderr)

memory2.cpp: In function 'void Solve(int, int)':
memory2.cpp:9:29: error: 'Flip' was not declared in this scope
    9 |         q[0][1] = q[1][0] = Flip(0, 1);
      |                             ^~~~
memory2.cpp:18:9: error: 'Answer' was not declared in this scope
   18 |         Answer(v[0], v[1], N-1);
      |         ^~~~~~