QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#642392 | #8937. Stage: Agausscrab | Wolam# | WA | 0ms | 3736kb | C++17 | 755b | 2024-10-15 13:49:46 | 2024-10-15 13:49:46 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
using namespace std;
string s[1005],ans;
int a[1005],t[1005];
int n;
void solve(void)
{
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>s[i]>>a[i];
t[a[i]]++;
}
for(int i=9;i>=1;i--)
t[i]+=t[i+1];
for(int i=1;i<=n;i++)
{
int r=t[a[i]+1]+1;
while(!s[i].empty()&&r)
{
r--;
s[i].pop_back();
}
ans+=s[i];
}
if(!ans.empty())ans[0]-=32;
cout<<"Stage : "<<ans;
}
signed main(void)
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t=1;
//cin>>t;
while(t--)
{
solve();
}
return 0;
}
/*
1
4
2 1 1 2
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3736kb
input:
4 arcos 2 gausr 5 scrail 3 bei 3
output:
Stage : Agausscrab
result:
wrong answer 1st lines differ - expected: 'Stage: Agausscrab', found: 'Stage : Agausscrab'