結果
問題 |
No.8116 TCP ソート
|
ユーザー |
![]() |
提出日時 | 2025-04-01 22:22:58 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 397 bytes |
コンパイル時間 | 3,547 ms |
コンパイル使用メモリ | 282,680 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-04-01 22:23:03 |
合計ジャッジ時間 | 4,545 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 16 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int n = (int)s.size(); map<char, int> mp; for (int i = 0; i < n; i++) mp[s[i]]++; auto f = [&](char c) { string res = ""; for (int i = 0; i < mp[c]; i++) res += c; return res; }; string ans = f('T') + f('C') + f('P'); cout << ans << endl; return 0; }