Submission #350139

#TimeUsernameProblemLanguageResultExecution timeMemory
350139Kevin_Zhang_TWCrayfish scrivener (IOI12_scrivener)C++17
34 / 100
161 ms262148 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; #define pb emplace_back #define AI(i) begin(i), end(i) template<class T> bool chmin(T &a, T b) { return b < a && (a = b, true); } template<class T> bool chmax(T &a, T b) { return a < b && (a = b, true); } #ifdef KEV #define DE(args...) kout("[ " + string(#args) + " ] = ", args) void kout() { cerr << endl; } template<class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ', kout(b...); } template<class T> void debug(T L, T R) { while (L != R) cerr << *L << " \n"[next(L) == R], ++L; } #else #define DE(...) 0 #define debug(...) 0 #endif const int MAX_N = 300005; char last; vector<vector<char>> res; int curtime; void Init() { res.pb(); } void TypeLetter(char L) { res.pb(res.back()); res.back().pb(L); ++curtime; } void UndoCommands(int U) { res.pb(res[curtime - U]); ++curtime; } char GetLetter(int P) { return res.back()[P]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...