# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
810265 | 2023-08-06T07:46:49 Z | tlnk07 | Sifra (COCI21_sifra) | C++17 | 1 ms | 212 KB |
#include<bits/stdc++.h> using namespace std; long long cnt = 0; string s, s1 = ""; map<string, bool> mp; int main() { cin >> s; for(int i = 0; i < s.size(); ++i) { if(s[i] < '0' || s[i] > '9') continue; while(s[i] >= '0' && s[i] <= '9') { s1 += s[i]; ++i; } if(!mp[s1]) ++cnt; mp[s1] = true; s1 = ""; } cout << cnt; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |