제출 #767349

#제출 시각아이디문제언어결과실행 시간메모리
767349Gabi88Memory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; vector<set<int>> v; set<int> s; char a; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); while(v.size() < 25) v.push_back(s); for(int i=1; i < 51; i++){ cout << "faceup(" << i << ")" << endl; cin >> a; v[a-'A'].insert(i); } for(int i=1; i < 26; i++){ for(auto it : v[i]){ cout << "faceup(" << i << ")" << endl; cin >> a; } } return 0; }

컴파일 시 표준 에러 (stderr) 메시지

memory.cpp: In function 'int main()':
memory.cpp:13:12: warning: unused variable 'it' [-Wunused-variable]
   13 |   for(auto it : v[i]){ cout << "faceup(" << i << ")" << endl; cin >> a; }
      |            ^~
/usr/bin/ld: /tmp/ccMzRwUC.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccJtQvTC.o:memory.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccMzRwUC.o: in function `main':
grader.cpp:(.text.startup+0x2f): undefined reference to `play()'
collect2: error: ld returned 1 exit status