Submission #00096


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <bits/stdc++.h>
#define endl "\n"
#define INF INT_MAX
using namespace std;
int main(){
#define int long long
cin.tie(nullptr);ios::sync_with_stdio(false);
while(true){
string s;
cin >>s;
if(s == "#")return 0;
string A="",a="",n="";
for(auto i:s){
if('A' <= i&&i <= 'Z')A += i;
else if('a' <= i&&i <= 'z')a += i;
else n += i;
}
sort(A.begin(),A.end());
sort(a.begin(),a.end());
sort(n.begin(),n.end());
cout <<a<<A<<n<<endl;
}
}

ステータス

項目 データ
問題 0005 - クレヨンの並べ替え
ユーザー名 ei2332
投稿日時 2024-03-29 12:14:11
言語 C++17
状態 Accepted
得点 20
ソースコード長 519 Byte
最大実行時間 31 ms
最大メモリ使用量 748 KB

セット

セット 得点 Cases
1 ALL 20 / 20 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
A1 AC 16 ms 604 KB
1
A2 AC 31 ms 544 KB
1
A3 AC 21 ms 748 KB
1
A4 AC 24 ms 692 KB
1