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 |
为什么!?人生最大的痛苦就是VC上运行成功,ACM上却提交失败#include<iostream> #include<string.h> using namespace std; void swap(int d1,char *p1,int y1) { char m2[20][9]={"imix","ik","akbal","kan","chicchan","cimi","manik", "lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban", "eznab","canac","ahau"}; char m1[19][9]={"pop","no","zip","zotz","tzec", "xul","yoxkin","mol","chen","yax","zac", "ceh","mac","kankin","muan","pax","koyab","cumhu", "uayet"}; int tol,i=0; int d2,y2; int x; while(strcmp(m1[i],p1)!=0) {i++;} tol=y1*365+d1+i*20+1; y2=tol/260; d2=tol%13; x=tol%20; cout<<d2<<' '<<m2[x-1]<<' '<<y2<<endl; } int main() { int i,d,y; char p[8],q; cin>>i; cout<<i<<endl; for(int j=0;j<i;j++) { cin>>d>>q>>p>>y; swap(d,p,y); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator