Submission #375115

#TimeUsernameProblemLanguageResultExecution timeMemory
375115IerusSifra (COCI21_sifra)C++17
50 / 50
1 ms364 KiB
#include<bits/stdc++.h> using namespace std; #pragma GCC target ("avx2") #pragma GCC optimize ("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC target("avx,avx2,fma") #pragma GCC optimize("O3") #define F first #define S second #define sz size() #define pb push_back #define int long long #define all(x) (x).begin(),(x).end() #define NFS ios_base::sync_with_stdio(0) , cin.tie(0) , cout.tie(0) ; #define file(s) if (fopen(s".in", "r")) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout); template <class T> inline T pw(T a, int n, T res = 1){while (n) {if (n & 1) res *= a;a *= a;n >>= 1;}return res;} template <typename T> istream &operator>>(istream &is, vector<T> &vec) { for (auto &v : vec) is >> v; return is; } template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) { os << '{'; for (auto v : vec) os << v << ' '; os << '}'; return os; } const int E = 1e6+777; const int inf = 4e9+777; const int N = 5e4+10; string s, t; set<string> ans; signed main(){auto solve=[&](){ cin >> s; s += '$'; for(auto i : s){ if(isdigit(i)){ t += i; }else if(!t.empty()){ ans.insert(t); t.clear(); } } cout << ans.sz; };NFS;solve();}
#Verdict Execution timeMemoryGrader output
Fetching results...