Submission #00280
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #include<bits/stdc++.h> using namespace std; int main(){ string s,st,str; int ss=0; while (1){ st= "" ; str= "" ; cin>>s; if (s== "#" ){ break ; } ss=s.size(); for ( int i=0;i<ss;i++){ for ( char c= 'a' ;c< 'z' ;c++){ if (s[i]==c){ st+=c; } } } for ( int i=0;i<ss;i++){ for ( char c= 'A' ;c< 'Z' ;c++){ if (s[i]==c){ str+=c; } } } vector< int > v; for ( int i=0;i<ss;i++){ for ( int c=0;c<9;c++){ if (s[i]- '0' ==c){ v.push_back(c); } } } sort(st.begin(),st.end()); sort(str.begin(),str.end()); sort(v.begin(),v.end()); cout<<st<<str; for ( int i=0;i<v.size();i++){ cout<<v[i]; } cout<<endl; } } |
ステータス
項目 | データ |
---|---|
問題 | 0005 - クレヨンの並べ替え |
ユーザー名 | r2207 |
投稿日時 | 2024-03-29 14:51:19 |
言語 | C++ |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 1043 Byte |
最大実行時間 | 23 ms |
最大メモリ使用量 | 616 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 20 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
A1 | WA | 23 ms | 476 KB |
1
|
A2 | WA | 22 ms | 440 KB |
1
|
A3 | WA | 23 ms | 528 KB |
1
|
A4 | WA | 23 ms | 616 KB |
1
|