Submission #666885

#TimeUsernameProblemLanguageResultExecution timeMemory
666885teeslaCrayfish scrivener (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]; }

Compilation message (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...