QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#726781 | #8937. Stage: Agausscrab | treeiii | RE | 0ms | 16524kb | C++14 | 1.5kb | 2024-11-09 08:30:52 | 2024-11-09 08:30:52 |
Judging History
answer
//妈的天天挂分,傻逼吧
//如此状态,如何noip?
#include<bits/stdc++.h>
#define int long long
#define _int __int128
#define y1 _
using namespace std;
static char buf[1000000],*p1=buf,*p2=buf;
inline int read(){
char c=getchar();
int res=0,f=1;
while(c<'0'||c>'9'){
if(c=='-')f=-1;
c=getchar();
}
while(c>='0'&&c<='9'){
res=res*10+c-'0';
c=getchar();
}
return res*f;
}
inline void write(int x){
static char buf[20];
static int len=-1;
if(x<0){
putchar('-');
x=-x;
}
do{
buf[++len]=x%10;
x/=10;
}
while(x);
while(len>=0){
putchar(buf[len--]+48);
}
}
const int maxn=300005;
const int maxm=510;
const int inf=1e18;
const int bas=100;
const int mod=1e9+7;
const double eps=1e-4;
int n;
struct node{
string s;
int w;
}a[maxn];
int b[maxn];
map<int,int> mp;
void solve(){
n=read();
for(int i=1;i<=n;i++){
cin>>a[i].s;
a[i].s=" "+a[i].s;
a[i].w=read();
b[i]=a[i].w;
}
sort(b+1,b+n+1);
for(int i=1;i<=n;i++){
int cnt=0;
for(int j=i+1;j<=n;j++){
if(b[j]>b[i]){
cnt++;
}
}
mp[b[i]]=cnt;
}
string ans="";
for(int i=1;i<=n;i++){
for(int j=1;j<=a[i].s.size()-mp[a[i].w]-2;j++){
ans.push_back(a[i].s[j]);
}
}
ans[0]=(ans[0]-'a'+'A');
cout<<"Stage: "<<ans<<endl;
return ;
}
signed main(){
// freopen("puxi.in","r",stdin);
// freopen("puxi.out","w",stdout);
int T=1;
// T=read();
while(T--){
solve();
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 16524kb
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