Submission #595428

#TimeUsernameProblemLanguageResultExecution timeMemory
595428SlyGaleebMemory (IOI10_memory)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define ld long double #define F first #define S second char faceup (int a); void play () { map<char,vector<int>>mp; for (int i = 1; i <= 50; ++i) mp[faceup(i)].push_back(i); for (auto c:mp) { faceup(c[0]); faceup(c[1]); } } /*int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); }*/

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:15:11: error: no match for 'operator[]' (operand types are 'std::pair<const char, std::vector<int> >' and 'int')
   15 |   faceup(c[0]);
      |           ^
memory.cpp:16:11: error: no match for 'operator[]' (operand types are 'std::pair<const char, std::vector<int> >' and 'int')
   16 |   faceup(c[1]);
      |           ^