QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#834456 | #8937. Stage: Agausscrab | L3067545513# | WA | 0ms | 11572kb | C++23 | 685b | 2024-12-27 17:25:16 | 2024-12-27 17:25:16 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
#define pb push_back
const int M = 2e5 + 7;
struct S{
std::string s;
int a;
}a[M];
signed main () {
int n; std::cin >> n;
std::vector<int> b;
for(int i = 1; i <= n; ++ i) {
std::cin >> a[i].s >> a[i].a;
b.pb(a[i].a);
}
std::sort(b.begin() , b.end());
int cnt = 0;
std::cout << "Stage:";
for(int i = 1; i <= n; ++ i) {
int pos = std::upper_bound(b.begin() , b.end() , a[i].a) - b.begin() + 1;
pos --;
pos = n - pos + 1;
// std::cout << pos << ' ';
for(int j = 0; j < (int)a[i].s.size() - pos; ++ j , cnt ++) if(cnt == 0) std::cout << (char)(a[i].s[j] -32); else std::cout << a[i].s[j];
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 11572kb
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'