QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#111008 | #6559. A Tree and Two Edges | OOBMABTRAMS# | WA | 0ms | 3436kb | C++17 | 708b | 2023-06-05 13:39:05 | 2023-06-05 13:39:09 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N=1013,mod=998244353;
typedef long long ll;
typedef long double ld;
int input=0;
const ll inf=2e18;
//i day j site
string s[N];
int k[N],b[N],d[N];
void solve(){
int dep=0,n;cin>>n;
for(int i=1;i<=n;i++){
cin>>s[i];
d[i]=dep;
if(s[i].back()=='{')dep++;else dep--,d[i]--;
for(auto c:s[i])if(c=='s')b[i]++;else if(c=='t')k[i]++;
}
for(int i=1;i<=n;i++)cout<<d[i]<<":"<<k[i]<<' '<<b[i]<<'\n';
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
cout<<fixed<<setprecision(10);
int T;
if(input)cin>>T;else T=1;
for(int tc=1;tc<=T;tc++)solve();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3436kb
input:
4 6 1 2 1 3 1 4 2 3 2 4 1 2 1 3 1 4 2 3 2 4 3 4
output:
-1:0 0 -2:0 0 -3:0 0 -4:0 0
result:
wrong answer 1st lines differ - expected: '3', found: '-1:0 0'