結果

問題 No.8116 TCP ソート
ユーザー hen
提出日時 2025-04-01 21:27:37
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 2,324 bytes
コンパイル時間 5,293 ms
コンパイル使用メモリ 332,532 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-04-01 21:27:44
合計ジャッジ時間 6,566 ms
ジャッジサーバーID
(参考情報)
judge6 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
#ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif
using ull = unsigned long long;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
using P = pair<ll,ll>;
#define rep(i, n) for(ll i = 0; i< (ll)(n); i++)
#define drep(i,n) for(ll i = (n)-1; i>=0; i--) // decrease
#define rrep(i,n) for(ll i = 1; i<=(n); i++) // [1,n]
ull INF = 2e18;
#define nall(a) a.begin(),a.end();
#define rall(a) a.rbegin(),a.rend(); // reverse all
#define pb push_back
#define eb emplase_back
#define em emplace
#define pob pop_back
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define YN {cout<<"Yes"<<endl;}else{cout<<"No"<<endl;} // true → Yes false → No
vl dx = {1,0,-1,0};
vl dy = {0,1,0,-1};
// cout << fixed << setprecision(20); 
// 最大公約数
ll gcd(ll a, ll b) {
    return b ? gcd(b,a%b) : a;
}
ll ngcd(vl a) {
    ll res;
    res = a[0];
    for(int i=1; i<a.size() && res!=1; i++) {
        res = gcd(a[i],res);
    }
    return res;
}
// 最小公倍数
ll lcm(ll a, ll b) {
    return a / gcd(a,b) * b;
}
ll nlcm(vl a) {
    ll res;
    res = a[0];
    for(int i = 1; i<a.size(); i++) {
        res = lcm(res,a[i]);
    }
    return res;
}
// 素数判定
bool isprime(ll x) {
    int i;
    if(x < 2) return 0;
    else if(x==2) return 1;
    if(x%2==0) return 0;
    for(i = 3; i*i<=x; i+=2) if(x%i==0) return 0;
    return 1;
}
// 桁和
ll digsum(ll n) {
    int res=0;
    while(n>0) {
        res += n%10;
        n /= 10;
    }
    return res;
}
// 桁数
ll digit(ll n) {
    int res = 0;
    while(n>0) {
        res++;
        n /= 10;
    }
    return res;
}
// 約数全列挙
vi divisor(ll n) {
    vi ret;
    for(int i = 1; i*i<=n; i++) {
        if(n%i == 0) {
            ret.pb(i);
            if(i!=1 && i*i != n) {
                ret.pb(n/i);
            }
        }
    }
    return ret;
}
// 特定文字count
int stringcount(string s, char c) {
    return count(s.cbegin(),s.cend(),c);
}
int main() {
	string s; cin>>s;
	int p=0; int c=0;int t=0;
	rep(i,s.size()) {
		if(s[i] == 'P') p++;
		if(s[i] == 'C') c++;
		if(s[i] == 'T') t++;
	}
	rep(i,t) cout <<'T';
	rep(i,c) cout <<'C';
	rep(i,p) cout <<'P';
	cout << endl;
}
0