QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#550029#8937. Stage: Agausscrabliuxy2357#WA 0ms3504kbC++14919b2024-09-07 09:01:582024-09-07 09:02:00

Judging History

This is the latest submission verdict.

  • [2024-09-07 09:02:00]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3504kb
  • [2024-09-07 09:01:58]
  • Submitted

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;
}

详细

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'