Submission #480028

#TimeUsernameProblemLanguageResultExecution timeMemory
480028NachoLibreSifra (COCI21_sifra)C++17
50 / 50
1 ms204 KiB
#include <bits/stdc++.h>
#define ll long long
#define sz(x) ((int)x.size())
using namespace std;



int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	string s;
	cin >> s; s += "Y";
	map<string, bool> ma;
	string t = "";
	int fp = 0;
	for(int i = 0; i < sz(s); ++i) {
		if(s[i] >= '0' && s[i] <= '9') {
			t += s[i];
		} else {
			if(t != "") {
				fp += 1 - ma[t];
				ma[t] = 1;
				t = "";
			}
		}
	}
	cout << fp << endl;
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...