QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#682573#8937. Stage: Agausscrab170zhiyixiWA 0ms3536kbC++201.0kb2024-10-27 16:09:072024-10-27 16:09:07

Judging History

你现在查看的是最新测评结果

  • [2024-10-27 16:09:07]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3536kb
  • [2024-10-27 16:09:07]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define ff first
#define ss second
typedef pair<int, int> pii;
typedef pair<pair<int, int>, int>piii;
const int inf = 0x3f3f3f;
const int mod = 1000;
//using i128 = __int128;
//using i64 = __int64_t;
//using u64 = unsigned long long;
struct node
{
	string s;
	int x;
}a[1010];
int b[1010];
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0); 
    int n;
    cin >> n;
    
    for (int i = 1; i <= n; i++)
    {
    	cin >> a[i].s >> a[i].x;
    	b[i] = a[i].x;
	}
	sort(b + 1, b + 1 + n);
	string s;
	int o = 0;
	for (int i = 1; i <= n; i++)
	{
		string p = a[i].s;
		int len = p.length();
		p = " " + p;
		int d = upper_bound(b + 1, b + 1 + n, a[i].x) - b;
		d = n - d + 2;
		if (len > d)
		{
			for (int i = 1; i <= len - d; i++)
			{
				if (o == 0)
				{
					o = 1;
					s += p[i] + 'A' - 'a';
					continue;
				}
				s += p[i];
			}
		}
		
	}
	cout << "Stage:" << s;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3536kb

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'