제출 #384620

#제출 시각아이디문제언어결과실행 시간메모리
384620vulpesKarte (COCI15_karte)C++17
50 / 50
2 ms364 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); string s; cin >> s; map<string,bool> m; for (int i = 0; i < s.size(); i += 3) { if (m[s.substr(i, 3)]) { return cout << "GRESKA" << endl, 0; } m[s.substr(i, 3)] = true; } vector<char> a = {'P', 'K', 'H', 'T'}; for (char i : a) { int c = count(s.begin(), s.end(), i); cout << 13 - c << " "; } return 0; }

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

karte.cpp: In function 'int main()':
karte.cpp:9:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |     for (int i = 0; i < s.size(); i += 3) {
      |                     ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...