Submission #503983

#TimeUsernameProblemLanguageResultExecution timeMemory
503983nicecoder37Kaučuk (COCI21_kaucuk)C++17
50 / 50
1 ms292 KiB
/*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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...