# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
375115 | Ierus | Sifra (COCI21_sifra) | C++17 | 1 ms | 364 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |