QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#800666#8937. Stage: Agausscrabdiandian2020#RE 1ms3724kbC++14817b2024-12-06 14:11:282024-12-06 14:11:30

Judging History

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

  • [2024-12-06 14:11:30]
  • 评测
  • 测评结果:RE
  • 用时:1ms
  • 内存:3724kb
  • [2024-12-06 14:11:28]
  • 提交

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

result: