Submission #1207184

#TimeUsernameProblemLanguageResultExecution timeMemory
1207184chambiMemory (IOI10_memory)C++20
Compilation error
0 ms0 KiB
#include <iostream> #include <unordered_map> #include <vector> using namespace std; char faceup(int carta); void jugar(){ unordered_map<char, int> c_vista; vector<bool>c_emparejadas(91, false); int caramelos=0; vecttor<bool>c_usada(51, false); while(caramelos<25){ for(int i=0; i<=50; i++){ if(c_usada[i]){ continue; } for(int j=i+1; j<=50; j++){ if(c_usada[j]){ continue; } char l_i=faceup(i); char l_j=faceup(j); if(l_i==l_j){ c_usada[i]=true; c_usada[j]=true; c_emparejadas[l_i]=true; caramelos++; } else{ if(c_emparejadas[l_i]==false){ c_vista[l_i]=i; } if(c_emparejadas[l_j]==false){ c_vista[l_j]=j; } } if(caramelos==25){ break; } } if(caramelos==25){ break; } } } }

Compilation message (stderr)

memory.cpp: In function 'void jugar()':
memory.cpp:10:5: error: 'vecttor' was not declared in this scope
   10 |     vecttor<bool>c_usada(51, false);
      |     ^~~~~~~
memory.cpp:10:13: error: expected primary-expression before 'bool'
   10 |     vecttor<bool>c_usada(51, false);
      |             ^~~~
memory.cpp:13:16: error: 'c_usada' was not declared in this scope
   13 |             if(c_usada[i]){
      |                ^~~~~~~
memory.cpp:17:20: error: 'c_usada' was not declared in this scope
   17 |                 if(c_usada[j]){
      |                    ^~~~~~~
memory.cpp:23:17: error: 'c_usada' was not declared in this scope
   23 |                 c_usada[i]=true;
      |                 ^~~~~~~