Submission #1300315

#TimeUsernameProblemLanguageResultExecution timeMemory
1300315tabBridž (COCI17_bridz)C++20
50 / 50
2 ms576 KiB
#include "bits/stdc++.h" using namespace std; #define intt int #define fi first #define se second const intt mxN = 2e5 + 5; const intt LG = 20; const intt inf = 1e18; intt n; void _() { cin >> n; intt ans = 0; for(intt i = 0; i < n; i++) { string s; cin >> s; for(intt j = 0; j < (intt)s.size(); j++) { if(s[j] == 'A') ans+=4; if(s[j] == 'K') ans+=3; if(s[j] == 'Q') ans+=2; if(s[j] == 'J') ans+=1; } } cout << ans << endl; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); intt t = 1, buu = 1; // cin >> t; while(t--){ // cout << "Case #" << buu++ << ": "; _(); } }

Compilation message (stderr)

bridz.cpp:9:18: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
    9 | const intt inf = 1e18;
      |                  ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...