# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
675809 | 2022-12-28T02:52:15 Z | Tangirkul | Kaučuk (COCI21_kaucuk) | C++17 | 1 ms | 320 KB |
#include<bits/stdc++.h> #define ll long long #define fi first #define se second #define pb push_back #define sz size #define Junanna ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); using namespace std; const ll K = 32; const ll INF = 1e9 + 7; const ll MOD = 1e9 + 7; const ll N = (1e5 + 125); void ma1n () { ll n; cin >> n; ll v[500]; for (ll i = 0; i <= 400; i++) { v[i] = 0; } ll sze = 1; for (ll t = 1; t <= n; t++) { string a, b; cin >> a >> b; ll cnt = 1; for (ll i = 2; i < a.sz (); i+=3) { if (a[i - 2] == 's' && a[i - 1] == 'u' && a[i] == 'b') { cnt++; } else { break; } } if (cnt== sze) { v[cnt]++; } else if (cnt > sze) { for (ll j = sze + 1; j <= cnt; j++) { v[j] = 1; } sze = cnt; } else { v[cnt]++; sze = cnt; } cout << v[1]; for (ll j = 2; j <= sze; j++) { cout << "." << v[j]; } cout << " "; cout << b << "\n"; } } int main () { Junanna; ll t = 1; while (t--) { ma1n (); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 292 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 316 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 292 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 0 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 1 ms | 316 KB | Output is correct |
12 | Correct | 0 ms | 320 KB | Output is correct |
13 | Correct | 0 ms | 320 KB | Output is correct |
14 | Correct | 0 ms | 320 KB | Output is correct |
15 | Correct | 0 ms | 320 KB | Output is correct |
16 | Correct | 0 ms | 212 KB | Output is correct |
17 | Correct | 1 ms | 212 KB | Output is correct |
18 | Correct | 0 ms | 320 KB | Output is correct |