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 |
输入格式错误哪位大牛帮忙修改一下,不胜感激!#include<iostream > using namespace std; int main() { char a[19][10]={ "pop","no","zip","zotz", "tzec","xul","yoxkin","mol", "chen","yax","zac","ceh", "mac","kankin","muan","pax", "koyab","cumhu","uayet"}; int tab_day[20]={0,20,20,20,20, 20,20,20,20,20, 20,20,20,20,20, 20,20,20,20,5}; char b[20][10]={"imix","ik","akbal","kan", "chicchan","cimi","manik","lamat", "muluk","ok","chuen","eb","ben", "ix","mem","cib","caban", "eznab"," canac","ahau"}; int n,m=0; cin>>n; int i,k,j,day1[1000],day2[1000],year1[1000],year2[1000]; char c[1000], str[1000][20]; int s[1000],t[1000]; for(i=0;i<n;i++) { s[i]=0; t[i]=0; } for(i=0;i<n;i++) { cin>>day1[i]>>c[i]>>str[i]>>year1[i]; if(m==0) { cout <<n; cout<<endl;m++; } for(j=0;j<19;j++) { if(strcmp(a[j],str[i])==0) { for(k=0;k<j;k++) s[i]+=tab_day[k+1]; s[i]+= (year1[i]*365+day1[i]); } } t[i]=s[i]%20; day2[i]=s[i]%13+1; year2[i]=s[i]/260; cout <<day2[i]<<" "<<b[t[i]]<<" "<<year2[i] ; cout<<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