# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
810694 | 2023-08-06T14:10:23 Z | Tunglam07 | Sifra (COCI21_sifra) | C++17 | 1 ms | 300 KB |
#include<bits/stdc++.h> using namespace std; int main() { string s, s1 = ""; map<string, bool> mp; cin >> s; int cnt = 0; for(int i = 0; i < s.size(); ++i) { if(s[i] < 48 || s[i] > 57) { continue; } while(s[i] >= 48 && s[i] <= 57) { s1 += s[i]; ++i; } if(!mp[s1]) { ++cnt; } mp[s1] = 1; s1 = ""; } cout << cnt; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 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 | 1 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 300 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 1 ms | 212 KB | Output is correct |
10 | Correct | 1 ms | 212 KB | Output is correct |