Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
帮忙查错 3Q结果在自己机子上是正确的 但是怎么提交了老超时呢?? #include <iostream> #include <string> using namespace std; string a[19]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"}; string b[20]={"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"}; int main(){ int num; int days[100]; string p; int x,y;char s; cin>>num; for(int i=0;i<num;i++) { cin>>x>>s>>p>>y; days[i]=x; for(int j=0;j<19;j++) {if(p==a[j]) {days[i]+=j*20; break;} } days[i]+=y*365; } cout<<num<<endl; int z; for(i=0;i<num;i++) { z=days[i]%260; cout<<(z%13+1)<<" "<<b[z%20]<<" "<<days[i]/260<<endl; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator