제출 #1074716

#제출 시각아이디문제언어결과실행 시간메모리
1074716CherypashkinSifra (COCI21_sifra)C++14
50 / 50
1 ms348 KiB
#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 timeMemoryGrader output
Fetching results...