Submission #482275

#TimeUsernameProblemLanguageResultExecution timeMemory
482275wnsduds1Crayfish scrivener (IOI12_scrivener)C++17
Compilation error
0 ms0 KiB
#include<iostream> #include<vector> #include<algorithm> #include<set> #include<queue> #include<bitset> #include<string> #define SIZE 101 #define INF 987654321 #define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); using namespace std; int n; int main() { fastio; string s; string v; vector<string>str(n); vector<char>ret; int idx = 0; cin >> n; while (n--) { cin >> s; if (s == "T") { cin >> v; if (idx == 0) str.push_back(v); else str.push_back(str[idx - 1] + v); idx += 1; } else if (s == "U") { int value; cin >> value; str.push_back(str[idx - (value+1)]); idx += 1; } else { int value; cin >> value; ret.push_back(str[idx - 1][value]); } } for (auto&ele : ret) { cout << ele << "\n"; } }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc3LsVHk.o: in function `main':
scrivener.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccPC3hBk.o:grader.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccPC3hBk.o: in function `main':
grader.cpp:(.text.startup+0x63): undefined reference to `Init()'
/usr/bin/ld: grader.cpp:(.text.startup+0xff): undefined reference to `TypeLetter(char)'
/usr/bin/ld: grader.cpp:(.text.startup+0x15f): undefined reference to `UndoCommands(int)'
/usr/bin/ld: grader.cpp:(.text.startup+0x18b): undefined reference to `GetLetter(int)'
collect2: error: ld returned 1 exit status