# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
499434 |
2021-12-28T12:07:20 Z |
Abito |
Kaučuk (COCI21_kaucuk) |
C++14 |
|
1 ms |
204 KB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int sec=0,subsec=0,subsubsec=0;
string x,y;
for (int i=0;i<n;i++)
{
cin>>x>>y;
if (x=="section")
{
sec++;
cout<<sec<<' '<<y<<"\n";
}
else if (x=="subsection")
{
subsec++;
cout<<sec<<'.'<<subsec<<' '<<y<<"\n";
}
else
{
subsubsec++;
cout<<sec<<'.'<<subsec<<'.'<<subsubsec<<' '<<y<<"\n";
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 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 |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 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 |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |