結果
| 問題 | No.8116 TCP ソート | 
| コンテスト | |
| ユーザー |  greentea011 | 
| 提出日時 | 2025-04-03 13:39:46 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 443 bytes | 
| コンパイル時間 | 869 ms | 
| コンパイル使用メモリ | 63,116 KB | 
| 実行使用メモリ | 7,848 KB | 
| 最終ジャッジ日時 | 2025-04-03 13:39:48 | 
| 合計ジャッジ時間 | 1,828 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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;
}
            
            
            
        