제출 #666885

#제출 시각아이디문제언어결과실행 시간메모리
666885teesla크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++14
12 / 100
1092 ms1176 KiB
#include <bits/stdc++.h> using namespace std; char last; string s; void Init() { s=""; return; } void TypeLetter(char L) { last = L; s=s+last; return; } void UndoCommands(int U) { string prov=""; for(int i=0; i<s.size()-U; i++){ prov=prov+s[i]; } s=prov; return; } char GetLetter(int P) { return s[P]; }

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

scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:23:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |   for(int i=0; i<s.size()-U; i++){
      |                ~^~~~~~~~~~~
#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...