QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#694454 | #8937. Stage: Agausscrab | 2018haha# | WA | 0ms | 3780kb | C++17 | 761b | 2024-10-31 17:59:05 | 2024-10-31 17:59:18 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
int n;
cin>>n;
vector<pair<string,int>> s(n);
vector<int> r(n,1);
for(int i=0;i<n;i++)
cin>>s[i].first>>s[i].second;
for(int i=0;i<n;i++)
{
for(int j=0;j<=n;j++)
{
if(i==j) continue;
auto &[s1,a1]=s[i];
auto &[s2,a2]=s[j];
if(a2>a1) r[i]++;
}
}
string ans;
for(int i=0;i<n;i++)
{
string tmp=s[i].first;
if(r[i]>=tmp.length()) continue;
ans+=tmp.substr(0,tmp.length()-r[i]);
}
if(ans.size()) ans[0]-=32;
cout<<"Stage: "<<ans<<"\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3620kb
input:
4 arcos 2 gausr 5 scrail 3 bei 3
output:
Stage: Agausscrab
result:
ok single line: 'Stage: Agausscrab'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
4 zhe 1 jiang 3 sheng 5 sai 2
output:
Stage: Jiashen
result:
ok single line: 'Stage: Jiashen'
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3548kb
input:
1 yp 1
output:
Stage:
result:
wrong answer 1st lines differ - expected: 'Stage: Y', found: 'Stage: '