# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
499460 | 2021-12-28T13:04:02 Z | Alisaf9 | Kaučuk (COCI21_kaucuk) | C++14 | 1 ms | 332 KB |
#include <bits/stdc++.h> using namespace std; int main() { int n,x=0,c=0,d=0,u; string s[50]; pair<pair<int,int>,int>pp[1000]; cin>>n; u=n+1; for(int i=0;i<n;i++) { cin>>s[i]>>s[u]; if(s[i]=="section") { x++; cout<<x<<" "<<s[u]<<endl; } else if(s[i]=="subsection") { c++; cout<<x<<"."<<c<<" "<<s[u]<<endl; } else if(s[i]=="subsubsection") { d++; cout<<x<<"."<<c<<"."<<d<<" "<<s[u]<<endl; } u++; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 332 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 332 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 0 ms | 204 KB | Output is correct |
7 | Runtime error | 1 ms | 332 KB | Execution killed with signal 11 |
8 | Halted | 0 ms | 0 KB | - |