# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
499433 | 2021-12-28T12:05:44 Z | Ibraheem | Kaučuk (COCI21_kaucuk) | C++14 | 2 ms | 3416 KB |
#include<bits/stdc++.h> using namespace std; string a[100005]; int main(){ int n , m = 0 , l = 0 , r = 0 , t , e , i = 1; string s = "section" , f = "subsection" , d = "subsubsection" , o , p; cin >> n; while(n > 0){ cin >> o >> p; if(o == s){ m++; }else if(o == f){ l++; } if(o == d){ r++; } if(l == 0 ){ cout << m << ' ' << p << endl; } if(l > 0 && m !=0 && r == 0){ cout << m << '.' << l << ' ' << p << endl; } if(m == 0 && l > 0){ cout << l << " " << p << endl; } if(m > 0 && l > 0 && r > 0){ cout << m << "." << l << "." << r << " " << p << endl; } a[i] = p; i++; n--; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 3404 KB | Output is correct |
2 | Correct | 2 ms | 3404 KB | Output is correct |
3 | Correct | 1 ms | 3404 KB | Output is correct |
4 | Incorrect | 2 ms | 3416 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 3404 KB | Output is correct |
2 | Correct | 2 ms | 3404 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 3404 KB | Output is correct |
2 | Correct | 2 ms | 3404 KB | Output is correct |
3 | Incorrect | 2 ms | 3404 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 3404 KB | Output is correct |
2 | Correct | 2 ms | 3404 KB | Output is correct |
3 | Correct | 1 ms | 3404 KB | Output is correct |
4 | Incorrect | 2 ms | 3416 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |