제출 #120485

#제출 시각아이디문제언어결과실행 시간메모리
120485KieranHorgan크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++17
0 / 100
1084 ms64520 KiB
#include <bits/stdc++.h> using namespace std; int a[1000005][23], curStep=0, node, i; void Init() {} void TypeLetter(char L) { a[++curStep][21] = L; a[curStep][22] = a[curStep-1][22]+1; a[curStep][0] = curStep-1; for(i = 1; 1<<i <= a[curStep][22]; i++) a[curStep][i] = a[a[curStep][i-1]][i-1]; } void UndoCommands(int U) { copy(a[curStep-1-U], a[curStep-1-U]+23, a[++curStep]); } char GetLetter(int P) { for(i = 21, node = curStep; a[node][22] != P+1;) node = a[node][31-__builtin_clz(a[node][22]-P)]; return a[node][21]; }

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

scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:12:70: warning: operation on 'curStep' may be undefined [-Wsequence-point]
 void UndoCommands(int U) { copy(a[curStep-1-U], a[curStep-1-U]+23, a[++curStep]); }
                                                                      ^~~~~~~~~
scrivener.cpp:12:70: warning: operation on 'curStep' may be undefined [-Wsequence-point]
#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...