Submission #503983

# Submission time Handle Problem Language Result Execution time Memory
503983 2022-01-09T11:48:42 Z nicecoder37 Kaučuk (COCI21_kaucuk) C++17
50 / 50
1 ms 292 KB
/*MKAAN THE KING*/
#include <bits/stdc++.h>
#define space " "
#define endl "\n"
#define gcd __gcd
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pf push_front
#define inf 1000000000
#define md 1000000007
#define li 100005
#define lo long long
using namespace std;
int n,a,b,c;
string s,t;
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>s>>t;
		if(s[0]=='s' && s[1]=='e'){a++; b=0; c=0;}
		else if(s[0]=='s' && s[1]=='u' && s[2]=='b' && s[3]=='s' && s[4]=='e'){b++; c=0;}
		else c++;
		if(c>0) cout<<a<<"."<<b<<"."<<c<<space<<t<<endl;
		else if(b>0) cout<<a<<"."<<b<<space<<t<<endl;
		else if(a>0) cout<<a<<space<<t<<endl;
		//~ printf("\n");
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 288 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 1 ms 292 KB Output is correct
2 Correct 1 ms 292 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 292 KB Output is correct
2 Correct 1 ms 292 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 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 0 ms 288 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 1 ms 292 KB Output is correct
8 Correct 1 ms 292 KB Output is correct
9 Correct 1 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct
11 Correct 1 ms 204 KB Output is correct
12 Correct 1 ms 292 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 0 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 1 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct