제출 #1079406

#제출 시각아이디문제언어결과실행 시간메모리
1079406Trumling크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++14
12 / 100
4 ms1372 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-=U; } char GetLetter(int P) { return s[P]; }

컴파일 시 표준 에러 (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...