# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
375160 | rinri | Sifra (COCI21_sifra) | C++14 | 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.
/*
#pragma GCC target ("avx2")
#pragma GCC optimize ("Ofast")
#pragma GCC optimize ("unroll-loops")
*/
#include "bits/stdc++.h"
#define iosb ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define BIT(x) __builtin_popcount(x)
#define all(x) x.begin() , x.end()
#define F first
#define S second
#define pb push_back
using namespace std ;
typedef unsigned long long UL ;
typedef long long L ;
typedef string T ;
typedef int I ;
const I MaxN = 1e5+1 ;
const I MOD = 1e9+7 ;
const I inf = 2e9+7 ;
const L INF = 2e18+7 ;
int32_t main()
{
//freopen(".in" , "r" , stdin) ;
//freopen(".out" , "w" , stdout) ;
string s ;
cin >> s ;
set<string> st ;
for(int i = 0 ; i < s.size() ; ++i)
{
if(s[i] >= '0' && s[i] <= '9')
{
string t = "" ;
int j ;
for(j = i ; j < s.size() ; ++j)
if(s[j] >= '0' && s[j] <= '9')
t+=s[j] ;
else
break ;
st.insert(t) ;
i = j-1 ;
}
}
cout << st.size() ;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |