Submission #1065622

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10656222024-08-19 10:03:54Hectorungo_18Unscrambling a Messy Bug (IOI16_messy)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "messy.h"
using namespace std;
mt19937 gnd(time(nullptr));
vector<int> restore_permutation(int n, int w, int r){
int mxb = 6;
string s (n, '0');
char u = '1', c = '0';
for(int bi = mxb; bi > 0 ; bi--){
if(bi == mxb){
for(int i = n/2; i < n; i++){
ch(s, i, u);
add_element(s);
ch(s, i, c);
}
}
else{
for(int i = 0; i < (1<<(bi+1)); i++){
ch(s, i, u);
}
for(int i = n/2+(1<<bi); i < n; i+=(1<<(bi+1))){
for(int j = i; j < i+(1<<(bi)); j++){
ch(s, j, u);
add_element(s);
ch(s, j, c);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:16:17: error: 'ch' was not declared in this scope; did you mean 'c'?
   16 |                 ch(s, i, u);
      |                 ^~
      |                 c
messy.cpp:23:17: error: 'ch' was not declared in this scope; did you mean 'c'?
   23 |                 ch(s, i, u);
      |                 ^~
      |                 c
messy.cpp:27:21: error: 'ch' was not declared in this scope; did you mean 'c'?
   27 |                     ch(s, j, u);
      |                     ^~
      |                     c
messy.cpp:33:17: error: 'ch' was not declared in this scope; did you mean 'c'?
   33 |                 ch(s, i, c);
      |                 ^~
      |                 c
messy.cpp:37:17: error: 'ch' was not declared in this scope; did you mean 'c'?
   37 |                 ch(s, i, u);
      |                 ^~
      |                 c
messy.cpp:41:21: error: 'ch' was not declared in this scope; did you mean 'c'?
   41 |                     ch(s, j, u);
      |                     ^~
      |                     c
messy.cpp:47:17: error: 'ch' was not declared in this scope; did you mean 'c'?
   47 |                 ch(s, i, c);
      |                 ^~
      |                 c
messy.cpp:60:17: error: 'ch' was not declared in this scope; did you mean 'sh'?
   60 |                 ch(s, i, u);
      |                 ^~
      |                 sh
messy.cpp:77:17: error: 'ch' was not declared in this scope; did you mean 'sh'?
   77 |                 ch(s, x, u);
      |                 ^~
      |                 sh
messy.cpp:80:17: error: 'ch' was not declared in this scope; did you mean 'sh'?
   80 |                 ch(s, x, u);
      |                 ^~
      |                 sh
messy.cpp:92:17: error: 'ch' was not declared in this scope; did you mean 'sh'?
   92 |                 ch(s, x, u);
      |                 ^~
      |                 sh
messy.cpp:97:17: error: 'ch' was not declared in this scope; did you mean 'sh'?
   97 |                 ch(s, x, u);
      |                 ^~
      |                 sh
messy.cpp:100:17: error: 'ch' was not declared in this scope; did you mean 'sh'?
  100 |                 ch(s, x, u);
      |                 ^~
      |                 sh
messy.cpp:110:17: error: 'ch' was not declared in this scope; did you mean 'sh'?
  110 |                 ch(s, x, c);
      |                 ^~
      |                 sh