Submission #347050

#TimeUsernameProblemLanguageResultExecution timeMemory
347050ACmachineQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++17
Compilation error
0 ms0 KiB
int encode (int n, int x, int y) { vector<int> sets(921, 0); int id = 1; for(int i = 0; i < 12; ++i){ for(int j = i + 1; j < 12; ++j){ for(int k = j + 1; k < 12; ++k){ for(int g = k + 1; g < 12; ++g){ for(int l = g + 1; l < 12; ++l){ for(int m = l + 1; m < 12; ++m){ sets[id++] = (1 << i) | (1 << j) | (1 << k) | (1 << g) | (1 << l) | (1 << m); } } } } } } return sets[x]&~sets[y]; }
int decode (int n, int q, int h) { vector<int> sets(921, 0); int id = 1; for(int i = 0; i < 12; ++i){ for(int j = i + 1; j < 12; ++j){ for(int k = j + 1; k < 12; ++k){ for(int g = k + 1; g < 12; ++g){ for(int l = g + 1; l < 12; ++l){ for(int m = l + 1; m < 12; ++m){ sets[id++] = (1 << i) | (1 << j) | (1 << k) | (1 << g) | (1 << l) | (1 << m); } } } } } } return (sets[q] == h); }

Compilation message (stderr)

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:2:5: error: 'vector' was not declared in this scope
    2 |     vector<int> sets(921, 0);
      |     ^~~~~~
encoder.cpp:2:12: error: expected primary-expression before 'int'
    2 |     vector<int> sets(921, 0);
      |            ^~~
encoder.cpp:10:29: error: 'sets' was not declared in this scope
   10 |                             sets[id++] = (1 << i) | (1 << j) | (1 << k) | (1 << g) | (1 << l) | (1 << m);
      |                             ^~~~
encoder.cpp:17:12: error: 'sets' was not declared in this scope
   17 |     return sets[x]&~sets[y];
      |            ^~~~

decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:2:5: error: 'vector' was not declared in this scope
    2 |     vector<int> sets(921, 0);
      |     ^~~~~~
decoder.cpp:2:12: error: expected primary-expression before 'int'
    2 |     vector<int> sets(921, 0);
      |            ^~~
decoder.cpp:10:29: error: 'sets' was not declared in this scope
   10 |                             sets[id++] = (1 << i) | (1 << j) | (1 << k) | (1 << g) | (1 << l) | (1 << m);
      |                             ^~~~
decoder.cpp:17:13: error: 'sets' was not declared in this scope
   17 |     return (sets[q] == h);
      |             ^~~~