This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |