結果
| 問題 | No.8116 TCP ソート |
| コンテスト | |
| ユーザー |
greentea011
|
| 提出日時 | 2025-04-03 13:39:46 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 443 bytes |
| 記録 | |
| コンパイル時間 | 315 ms |
| コンパイル使用メモリ | 78,248 KB |
| 実行使用メモリ | 9,288 KB |
| 最終ジャッジ日時 | 2026-07-08 07:56:42 |
| 合計ジャッジ時間 | 1,852 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 16 |
ソースコード
#include <iostream>
#include <string>
int main()
{
std::string str;
std::cin >> str;
int count[3] = {0};
for (char c : str)
{
if (c == 'T') count[0] += 1;
else if (c == 'C') count[1] += 1;
else count[2] += 1;
}
std::string out{""};
for (int i = 0; i < count[0]; ++i) out += 'T';
for (int i = 0; i < count[1]; ++i) out += 'C';
for (int i = 0; i < count[2]; ++i) out += 'P';
std::cout << out << std::endl;
return 0;
}
greentea011