# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
499471 |
2021-12-28T13:23:41 Z |
AramJ |
Kaučuk (COCI21_kaucuk) |
C++14 |
|
1 ms |
204 KB |
#include <iostream>
using namespace std;
int main(){
string s,t;
int n;
cin>>n;
int s1=0;
int s2=0;
int s3=0;
string m[n];
string p[n];
for(int i=0;i<n;i++){
cin>>s>>t;
if(s=="section"){
s1++;
p[i]=to_string(s1);
m[i]=t;
}
if(s=="subsection"){
s2++;
p[i]=to_string(s1)+"."+to_string(s2);
m[i]=t;
}
if(s=="subsubsection"){
s3++;
p[i]=to_string(s1)+"."+to_string(s2)+"."+to_string(s3);
m[i]=t;
}
}
for(int i=0;i<n;i++){
cout<<p[i]<<" "<<m[i]<<endl;
}
}
# |
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 |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 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 |
1 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 |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 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 |
1 ms |
204 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |