Submission #1012023

#TimeUsernameProblemLanguageResultExecution timeMemory
1012023deeraMemory (IOI10_memory)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #include <memory.h> char faceup(int n); vector<int> cards[51]; int play() { for (int i = 1; i <= 50; i++) { cards[faceup(i) - 'A'].push_back(i); } for (auto i: cards) { if (i.size() == 2) { faceup(i[0]); faceup(i[1]); } } }

Compilation message (stderr)

memory.cpp:9:5: error: ambiguating new declaration of 'int play()'
    9 | int play() {
      |     ^~~~
In file included from memory.cpp:4:
memory.h:1:6: note: old declaration 'void play()'
    1 | void play();
      |      ^~~~
memory.cpp: In function 'int play()':
memory.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^