Submission #1079404

#TimeUsernameProblemLanguageResultExecution timeMemory
1079404TrumlingCrayfish scrivener (IOI12_scrivener)C++14
5 / 100
83 ms5720 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define F first #define S second #define enter cout<<'\n'; #define INF 99999999999999999 #define MOD 1000000007 #define all(x) x.begin(),x.end() char last; ll idx=-1; string s; void Init() {} void TypeLetter(char L) { if(idx==s.size()-1) s+=L; idx++; s[idx]=L; } void UndoCommands(int U) { idx--; } char GetLetter(int P) { return s[P]; }

Compilation message (stderr)

scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:20:9: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |   if(idx==s.size()-1)
      |      ~~~^~~~~~~~~~~~
#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...