Submission #384620

#TimeUsernameProblemLanguageResultExecution timeMemory
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; }

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