Submission #00279


ソースコード

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;
}
}

ステータス

項目 データ
問題 0001 - 2 桁の整数
ユーザー名 r2207
投稿日時 2024-03-29 14:51:01
言語 C++
状態 Time Limit Exceeded
得点 0
ソースコード長 1036 Byte
最大実行時間 2000 ms
最大メモリ使用量 19032 KB

セット

セット 得点 Cases
1 ALL 0 / 5 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
01-01.txt TLE 2000 ms 2652 KB
1
01-02.txt TLE 2000 ms 4668 KB
1
01-03.txt TLE 2000 ms 5664 KB
1
01-04.txt TLE 2000 ms 7812 KB
1
01-05.txt TLE 2000 ms 9828 KB
1
01-06.txt TLE 2000 ms 11848 KB
1
01-07.txt TLE 2000 ms 14000 KB
1
01-08.txt TLE 2000 ms 16144 KB
1
01-09.txt TLE 2000 ms 17908 KB
1
01-10.txt TLE 2000 ms 19032 KB
1