Submission #241845

#TimeUsernameProblemLanguageResultExecution timeMemory
241845tleontest1Unscrambling a Messy Bug (IOI16_messy)C++14
Compilation error
0 ms0 KiB
#include "messy.h" #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #pragma GCC optimize ("unroll-loops") #pragma GCC target ("avx2") #include <bits/stdc++.h> using namespace std; typedef long long lo; typedef pair< lo,lo > PII; #define fi first #define se second #define mp make_pair #define endl "\n" #define pb push_back #define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define FOR for(int i=1;i<=n;i++) #define mid ((start+end)/2) #define ort ((bas+son)/2) const lo inf = 1000000000000000000; const lo KOK = 100000; const lo LOG = 30; const lo li = 500005; const lo mod = 1000000007; int n,m,b[li],a[li],k,flag,t; int cev; string s; vector<int> v; std::vector<int> restore_permutation(int n, int w, int r) { FOR{ s+='0'; ss+='0'; } FOR{ s[i-1]='1'; cout<<s<<endl; add_element(s); } compile_set(); FOR v.pb(0); FOR{ for(int j=0;j<n;j++){ if(ss[j]=='1')continue; string st=ss; st[j]='1'; //~ cout<<st<<endl; if(check_element(st)==0)continue; ss[j]='1'; //~ cout<<i<<endl; v[j]=i-1; break; } } return v; }

Compilation message (stderr)

messy.cpp: In function 'std::vector<int> restore_permutation(int, int, int)':
messy.cpp:39:3: error: 'ss' was not declared in this scope
   ss+='0';
   ^~
messy.cpp:39:3: note: suggested alternative: 's'
   ss+='0';
   ^~
   s
messy.cpp:50:7: error: 'ss' was not declared in this scope
    if(ss[j]=='1')continue;
       ^~
messy.cpp:50:7: note: suggested alternative: 's'
    if(ss[j]=='1')continue;
       ^~
       s
messy.cpp:51:14: error: 'ss' was not declared in this scope
    string st=ss;
              ^~
messy.cpp:51:14: note: suggested alternative: 'st'
    string st=ss;
              ^~
              st