| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1038280 | MrPavlito | Sifra (COCI21_sifra) | C++17 | 1 ms | 348 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define sc second
#define endl "\n"
#define pii pair<int,int>
using namespace std;
const int MAXN = 1e5+5;
const int mod7 = 1e9+7;
const long long inf = 1e18;
bool isnumber(char c)
{
    if(c=='0')return true;
    if(c=='1')return true;
    if(c=='2')return true;
    if(c=='3')return true;
    if(c=='4')return true;
    if(c=='5')return true;
    if(c=='6')return true;
    if(c=='7')return true;
    if(c=='8')return true;
    if(c=='9')return true;
    return false;
}
signed main()
{
    ios_base::sync_with_stdio(false),cin.tie(0), cout.tie(0);
    int tt=1;
    //cin >> tt;
    while(tt--)
    {
        string s;
        int n;
        cin >> s;
        n = s.size();
        set<string> setic;
        for(int i=0; i<n; i++)
        {
            if(isnumber(s[i]))
            {
                int poz = i;
                while(i<n && isnumber(s[i]))
                {
                    i++;
                }
                i--;
                string novi = s.substr(poz, i-poz+1);
                setic.insert(novi);
            }
        }
        cout << setic.size() << endl;;
    }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
