Submission #412444

#TimeUsernameProblemLanguageResultExecution timeMemory
412444abdzagMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include<unordered_map> #include"grader.h" #define rep(i,a,b) for(int i=int(a);i<int(b);i++) #define rrep(i,a,b) for(int i=int(a);i>int(b);i--) #define all(v) v.begin(),v.end() #define trav(a,v) for(auto&a:v) #define sz(a) a.size() typedef long double ld; using namespace std; static const long long inf = 1e15; typedef long long ll; typedef unsigned long long ull; void play(){ vector<string> v(50); rep(i, 0, 50)v[i] = faceup(i+1); vector<bool> done(50); rep(i, 0, 50) { if (done[i])continue; rep(j, 0, 50) { if (j == i)continue; if (v[i] == v[j]) { faceup(i + 1) << " "; faceup(j + 1) << endl; done[j] = 1; break; } } } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:23:19: error: invalid operands of types 'char' and 'const char [2]' to binary 'operator<<'
   23 |     faceup(i + 1) << " ";
      |     ~~~~~~~~~~~~~ ^~ ~~~
      |           |          |
      |           char       const char [2]
memory.cpp:24:19: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<'
   24 |     faceup(j + 1) << endl;
      |     ~~~~~~~~~~~~~~^~~~~~~