Submission #68427

# Submission time Handle Problem Language Result Execution time Memory
68427 2018-08-17T06:25:23 Z nvmdava Crayfish scrivener (IOI12_scrivener) C++17
34 / 100
1000 ms 6984 KB
#include <bits/stdc++.h>
using namespace std;
char s[1000001];
int now = 0, i = 0, dir[1000001], sz[1000001];
void Init() {}
 
void TypeLetter(char L) {
	s[i] = L;
	dir[i] = now;
	sz[i] = sz[now] + 1;
	now = i;
	i++;
}
 
void UndoCommands(int U) {
	now = i - U - 1;
	s[i] = s[now];
	dir[i] = dir[now];
	sz[i] = sz[now];
	i++;
}
 
char GetLetter(int P) {
	int j = i - 1;
	int t = sz[j] - P - 1;
	while(t--){
		j = dir[j];
	}
	return s[j];
}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 248 KB Output is correct
2 Correct 2 ms 356 KB Output is correct
3 Correct 2 ms 392 KB Output is correct
4 Correct 4 ms 596 KB Output is correct
5 Correct 2 ms 596 KB Output is correct
6 Correct 3 ms 664 KB Output is correct
7 Correct 2 ms 708 KB Output is correct
8 Correct 3 ms 708 KB Output is correct
9 Correct 2 ms 708 KB Output is correct
10 Correct 3 ms 724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 724 KB Output is correct
2 Correct 2 ms 724 KB Output is correct
3 Correct 3 ms 724 KB Output is correct
4 Correct 2 ms 748 KB Output is correct
5 Correct 2 ms 748 KB Output is correct
6 Correct 2 ms 748 KB Output is correct
7 Correct 2 ms 756 KB Output is correct
8 Correct 2 ms 756 KB Output is correct
9 Correct 2 ms 756 KB Output is correct
10 Correct 3 ms 756 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 756 KB Output is correct
2 Correct 4 ms 756 KB Output is correct
3 Correct 3 ms 756 KB Output is correct
4 Correct 3 ms 756 KB Output is correct
5 Correct 5 ms 756 KB Output is correct
6 Correct 4 ms 756 KB Output is correct
7 Correct 4 ms 756 KB Output is correct
8 Correct 4 ms 756 KB Output is correct
9 Correct 4 ms 756 KB Output is correct
10 Correct 5 ms 756 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1081 ms 6984 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1081 ms 6984 KB Time limit exceeded
2 Halted 0 ms 0 KB -