# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
486130 | davi_bart | Sifra (COCI21_sifra) | C++14 | 1 ms | 204 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define fi first
#define se second
#define ld long double
#define pb push_back
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
string a;
cin >> a;
vector<pair<int, bool> > v(1, {0, 0});
for (auto x : a) {
if ('0' <= x && x <= '9') {
v.back().fi = v.back().fi * 10 + x - '0';
v.back().se = 1;
} else {
if (v.back().se) v.pb({0, 0});
}
}
set<int> s;
for (auto [a, b] : v) {
if (b) s.insert(a);
}
cout << s.size() << endl;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |