QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#630052 | #8937. Stage: Agausscrab | miku# | WA | 0ms | 3496kb | C++23 | 1.2kb | 2024-10-11 16:14:20 | 2024-10-11 16:14:23 |
Judging History
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;
}
Details
Tip: Click on the bar to expand more detailed information
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'