标签:结果 之间 ret 1.0 ota font weight pos main
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 61061 Accepted Submission(s): 18083
#include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <vector> #include <queue> #include <cstdlib> #include <iomanip> #include <cmath> #include <ctime> #include <map> #include <set> using namespace std; #define lowbit(x) (x&(-x)) #define max(x,y) (x>y?x:y) #define min(x,y) (x<y?x:y) #define MAX 100000000000000000 #define MOD 1000000007 #define pi acos(-1.0) #define ei exp(1) #define PI 3.141592653589793238462 #define INF 0x3f3f3f3f3f #define mem(a) (memset(a,0,sizeof(a))) typedef long long ll; char a[1506]; ll ans[1506]; int main() { while(scanf("%s",&a)!=EOF) { ll pos=0,k=0,i=0; int len=strlen(a); a[len]=‘5‘; while(a[i++]==‘5‘); for(i--;i<=len;i++) { if(i>0 && a[i]==‘5‘ && a[i-1]==‘5‘) continue; if(a[i]!=‘5‘) pos=pos*10+a[i]-‘0‘; else { ans[k++]=pos; pos=0; } } sort(ans,ans+k); for(ll i=0;i<k;i++) { if(i) printf(" "); printf("%lld",ans[i]); } printf("\n"); } return 0; }
标签:结果 之间 ret 1.0 ota font weight pos main
原文地址:http://www.cnblogs.com/shinianhuanniyijuhaojiubujian/p/7249540.html