| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 382332 | ParsaAlizadeh | Crayfish scrivener (IOI12_scrivener) | C++17 | 1088 ms | 18540 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define all(x) x.begin(), x.end()
#define kill(x) return cout << x << endl, 0
#define X first
#define Y second
//#define endl '\n'
constexpr ll pw(ll a, ll b, ll mod) {
return (!b ? 1 :
b & 1 ? a * pw(a * a % mod, b / 2, mod) % mod :
pw(a * a % mod, b / 2, mod));
}
constexpr int N = 1e6 + 10;
constexpr int MOD = 1e9 + 7;
constexpr ll INF = 1e18;
int cur, par[N], prv[N], sz[N];
char C[N];
string ans;
void Init() {
}
void TypeLetter(char L) {
cur++;
C[cur] = L;
par[cur] = cur - 1;
prv[cur] = cur;
sz[cur] = sz[par[cur]] + 1;
}
void UndoCommands(int U) {
cur++;
C[cur] = 'U';
par[cur] = cur - U - 1;
prv[cur] = prv[par[cur]];
sz[cur] = sz[par[cur]];
}
char GetLetter(int P) {
if (ans.size() != sz[cur]) {
for (int tmp = prv[cur]; tmp > 0; tmp = prv[par[tmp]]) {
ans.push_back(C[tmp]);
}
reverse(all(ans));
}
return ans[P];
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
