标签:数据 pre 没有 unknown using math def 长度 algorithm
0051231232050775
0 77 12312320
#include <cstdio> #include <iostream> #include <cmath> #include <string> #include <cstring> #include <algorithm> #include <queue> #include <vector> #include <map> using namespace std; #define ll long long string s; ll num[1000+8]; int main() { while(cin>>s) { memset(num, -1, sizeof(num)); ll len = s.size(), ii = 1; int id = 0; for(ll i = 0; i<len; i++) { if(s[i] == ‘5‘) { if(i && s[i-1] != ‘5‘)id++; continue; } if(num[id] != -1)num[id] = num[id]*10+s[i]-48; else num[id] = s[i]-48; } if(num[id] != -1)id++; sort(num, num+id); bool flag = 0; for(ll i = 0; i<id; i++) { if(flag)printf(" "); flag = 1; printf("%lld", num[i]); } printf("\n"); } return 0; }
标签:数据 pre 没有 unknown using math def 长度 algorithm
原文地址:https://www.cnblogs.com/RootVount/p/10990343.html