| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 375123 | AdiZer0 | Sifra (COCI21_sifra) | C++17 | 1 ms | 364 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
#define whole(x) x.begin(), x.end()
#define sz(x) (int)x.size()
using namespace std;
typedef long long ll;
typedef long double ld;
const int N = (int)2e6 + 8;
const int INF = (int)1e9 + 7;
const ll linf = (ll)1e15 + 2;
map<string, bool> was;
int cnt;
string cur;
void upd() {
if (!cur.empty()) {
if (!was[cur]) ++cnt, was[cur] = 1;
cur = "";
}
}
int main() {
string s; cin >> s;
int n = sz(s);
for (int i = 0; i < n; ++i) {
if ('a' <= s[i] && s[i] <= 'z') {
if (!cur.empty()) upd();
continue;
}
if (sz(cur) == 3) upd();
cur += s[i];
}
upd();
cout << cnt << "\n";
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
