Submission #522234

#TimeUsernameProblemLanguageResultExecution timeMemory
522234blueKaučuk (COCI21_kaucuk)C++17
50 / 50
1 ms292 KiB
#include <iostream> #include <vector> #include <algorithm> #include <stack> #include <queue> #include <set> #include <map> #include <deque> #include <string> using namespace std; using vi = vector<int>; using vvi = vector<vi>; using ll = long long; using vll = vector<ll>; using vvll = vector<vll>; int main() { int N; cin >> N; vi ct(3, 0); for(int t = 1; t <= N; t++) { string s, a; cin >> s >> a; int lvl = (int(s.size()) - 7)/3; // cerr << lvl << ' '; // cerr << '\n'; // for(int k = 0; k < 3; k++) cerr << ct[k] << ' '; // cerr << '\n'; // cerr << "! \n"; // cerr << ct[lvl] << '\n'; ct[lvl]++; // cerr << ct[lvl] << '\n'; for(int j = lvl+1; j <= 2; j++) ct[j] = 0; // for(int k = 0; k < 3; k++) cerr << ct[k] << ' '; // cerr << '\n'; // cerr << lvl << " \n"; cout << ct[0]; for(int k = 1; k <= lvl; k++) cout << "." << ct[k]; cout << " "; cout << a << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...