# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1074716 | Cherypashkin | Sifra (COCI21_sifra) | C++14 | 1 ms | 348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define ld long double
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define TASK_NAME "windows"
#define coutp cout << " "
#define cont continue
using namespace std;
using namespace __gnu_pbds;
template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
/*
ordered_set<int> s;
s.order_of_key(a[i]); the number of elements STRICTLY less than a[i]
s.insert(a[i].S);
*/
const long long inf = 2e18, mod = 1000000007;
const ld eps = 1e-9;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int multitest = 1; //cin >> multitest;
while(multitest--) {
string s; cin >> s;
set<string> se;
string s2 = "";
for (int i = 0; i < (int)s.size(); i++) {
if (s[i] - '0' >= 0 and s[i] - '0' <= 9) {
s2 += s[i];
cont;
}if (s2.size() != 0) {
if (s2[0] != '0')se.insert(s2);
s2 = "";
}
}if (s2.size() != 0) {
if (s2[0] != '0')se.insert(s2);
s2 = "";
}cout<< se.size();
}return 0;
}
/*
26
5 4 5 4 5 4 3 2 1 2 1 1 1 3 3 3 3 3 3 3 3 3 3 3 3 3
7
6 3 9 5 2 8 7
*/
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |