제출 #1154187

#제출 시각아이디문제언어결과실행 시간메모리
1154187THXuanSifra (COCI21_sifra)C++20
50 / 50
0 ms328 KiB
#include <iostream> #include <vector> #include <algorithm> #include <cstring> #include <string> #include <array> #include <cmath> #include <stack> #include <queue> #include <map> #include <set> #define INF 1e9 using namespace std; typedef long long ll; const ll MOD = 1000000007; const ll MAXN = 300005; void solve() { string s; cin >> s; string ans; set<int>v; for (int i = 0; i < s.size(); i++) { if (s[i] - 'a' < 0)ans.push_back(s[i]); else { if (ans.size()) { v.insert(stoi(ans)); ans.clear(); } } } if (ans.size()) v.insert(stoi(ans)); cout << v.size() << "\n"; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t = 1;// cin>>t; while (t--) solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...