QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#630052#8937. Stage: Agausscrabmiku#WA 0ms3496kbC++231.2kb2024-10-11 16:14:202024-10-11 16:14:23

Judging History

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

  • [2024-10-11 16:14:23]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3496kb
  • [2024-10-11 16:14:20]
  • 提交

answer

#include<bits/stdc++.h>
#define pb push_back
#define x first
#define y second
#define endl '\n'
using namespace std;
using ll =long long ;
using pii =pair<int,int>;
using pll=pair<ll,ll>;
bool cmp(pll a,pll b){
	return a.y<b.y;
}
struct cmp1{
    bool operator()(pair<ll,ll>a,pair<ll,ll>b){
	if(a.x==b.x)return a.y>b.y;
	return a.x>b.x; 
}
};
const int mod=998244353;
ll ksm(ll a,ll b){ll ans=1;while(b){if(b&1){ans*=a;ans=ans%mod;}a=a*a;a%=mod;b>>=1;}return ans;}
ll gcd(ll a,ll b){ll t=a%b;while(t){a=b;b=t;t=a%b;}return b;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
ll get_inv(ll x){return ksm(x,mod-2);}
const int N=5e5+10;

void solve(){
	int n;
	cin>>n;
	vector<ll>cnt(n+1);
	vector<ll>v;
	vector<string>s(n+1);
	vector<ll>a(n+1);
	for(int i=1;i<=n;i++){
		cin>>s[i]>>a[i];
		v.pb(a[i]);
	}
	sort(v.begin(),v.end());
	string as="";
	for(int i=1;i<=n;i++){
		ll w=1+n-(upper_bound(v.begin(),v.end(),a[i])-v.begin());
		for(int j=0;j+w<s[i].size();j++){
			as+=s[i][j];
		}
	}
	as[0]-=32;
	cout<<"Stage:"<<as<<endl;
}
int main(){
	ios::sync_with_stdio(false);cin.tie(0);
	int _=1;
	// cin>>_;
	while(_--)solve();
	return 0;
}

详细

Test #1:

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

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'