結果
| 問題 |
No.2034 Anti Lexicography
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-12 22:33:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 2,000 ms |
| コード長 | 696 bytes |
| コンパイル時間 | 1,735 ms |
| コンパイル使用メモリ | 170,328 KB |
| 実行使用メモリ | 8,016 KB |
| 最終ジャッジ日時 | 2024-09-23 03:12:01 |
| 合計ジャッジ時間 | 2,665 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#include<bits/stdc++.h>
#define itsmdshahin ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ll long long
#define MX 1000006
const int N = 100100;
using namespace std;
vector<ll>g[N];
int main()
{
itsmdshahin;
ll n,z=0;
cin >> n;
vector<ll>a;
string t="abcdefghijklmnopqrstuvwxyz",s;cin >> s;
for(int j=0;j<s.size();j++){
for(int i=t.size()-1;i>=0;i--){
if(s[j]==t[i]){
a.push_back(i);
}
}
}
reverse(t.begin(),t.end());
for(int j=0;j<a.size();j++){
for(int i=0;i<t.size();i++){
if(a[j]==i){
cout << t[i];
}
}
}
cout << endl;
}