# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1098467 | 2024-10-09T12:36:14 Z | venoman | Sifra (COCI21_sifra) | C++17 | 0 ms | 348 KB |
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; int duzina = 0; int n = 0; map<int, int> mapa; for(int i = 0; i < s.length(); i++){ if(isdigit(s[i]) && duzina == 0){ duzina++; n+=s[i]-'0'; } else if(isdigit(s[i]) && duzina > 0){ duzina++; n*=10; n+=s[i]-'0'; } else if(isdigit(s[i-1]) && !isdigit(s[i])){ duzina = 0; mapa[n]++; n = 0; } } cout<<mapa.size(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Incorrect | 0 ms | 348 KB | Output isn't correct |
3 | Incorrect | 0 ms | 348 KB | Output isn't correct |
4 | Incorrect | 0 ms | 348 KB | Output isn't correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |