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 |
谁来救救我!!!!!!!!!其他人犯的错我都没出现,可我仍是WA?????????#include<iostream> #include<string> using namespace std; void main() { long *day,*year,i,n,j; long Ty,Td,Tzd1,Nd(0),Tzd2; char p; char* Haab[19]= {"pop","no","zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"}; char*Tzolkin[20]= {"ahau","imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac"}; string *mon; cin>>n; day=new long[n]; year=new long[n]; mon=new string[n]; for(i=0;i<n;i++) { cin>>day[i]>>p>>mon[i]>>year[i]; } cout<<n<<endl; for(i=0;i<n;i++) { for(j=0;j<19;j++) { if(mon[i]==Haab[j]) {Nd=j*20;} } Nd=Nd+year[i]*365+day[i]+1; Ty=(Nd-1)/260; Td=(Nd%260); Tzd2=Td%20; if(Td%13!=0) { Tzd1=Td%13;} else{Tzd1=13;} cout<<Tzd1<<ends<<Tzolkin[Tzd2]<<ends<<Ty<<endl; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator