QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#550029 | #8937. Stage: Agausscrab | liuxy2357# | WA | 0ms | 3504kb | C++14 | 919b | 2024-09-07 09:01:58 | 2024-09-07 09:02:00 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
using namespace std;
inline int read()
{
register int x = 0, f = 1;
register char c = getchar();
while(c < '0' || c > '9')
{
if(c == '-')f = -1;
c = getchar();
}
while(c <= '9' && c >= '0')
{
x = x * 10 + c - '0';
c = getchar();
}
return x * f;
}
inline void write(int x)
{
if(!x)return;
write(x / 10);
putchar(x % 10 + '0');
return;
}
int n, a[1010], t[20], r[1010];
string s[1010];
signed main()
{
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];
// cout << t[i] << " ";
}
for(int i = 1;i <= n;i++)r[i] = t[a[i] + 1] + 1;
string ans = "";
for(int i = 1;i <= n;i++)
{
if(r[i] >= s[i].size())continue;
ans += s[i].substr(0, s[i].size() - r[i]);
}
ans[0] -= 32;
cout << "Stage:" << ans;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3504kb
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'