QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#800666 | #8937. Stage: Agausscrab | diandian2020# | RE | 1ms | 3724kb | C++14 | 817b | 2024-12-06 14:11:28 | 2024-12-06 14:11:30 |
Judging History
answer
#include<cstdio>
#include<vector>
#include<cstring>
#include<iostream>
#include<algorithm>
#define fi first
#define se second
using namespace std;
typedef long long LL;
typedef pair<int,int> PII;
struct node{
int id,a;
bool operator<(const node &W)const{
return a<W.a;
}
}a[1009];
int n; char s[1009][25];
void solve(){
printf("Stage: ");
scanf("%d",&n);
bool f=0;
for(int i=1;i<=n;i++) scanf("%s%d",s[i]+1,&a[i].a),a[i].id=i;
for(int i=1;i<=n;i++){ int r=1;
for(int j=1;j<=n;j++) r+=a[j].a>a[i].a;
for(int j=1;j<=strlen(s[i]+1)-r;j++){
if(!f) putchar(s[i][j]-'a'+'A'),f=1;
else putchar(s[i][j]);
}
}
}
int main(){
int T=1;
// scanf("%d",&T);
while(T--) solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3724kb
input:
4 arcos 2 gausr 5 scrail 3 bei 3
output:
Stage: Agausscrab
result:
ok single line: 'Stage: Agausscrab'
Test #2:
score: -100
Runtime Error
input:
4 zhe 1 jiang 3 sheng 5 sai 2
output:
Stage: Zhe