Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

诚心的请求大家帮我看看,是在不知道为什么WA,数据测试都是对的啊

Posted by xiaoyuer3677 at 2014-08-29 15:49:22 on Problem 1008
#include <iostream>
#include <string.h>
using namespace std;

char mnameHaab[19][10]={"pop","no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"};
char mnameTzolkin[20][10]={ "imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "en", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"};

int main()
{
	int n=0,y1=0,d1=0,m1=0,alld[1000]={0};
	char sd1[10],sm1[20];
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>sd1;cin>>sm1;cin>>y1;
		for(m1=0;m1<19;m1++)
			if(!strcmp(sm1,mnameHaab[m1])) break;
		d1=0;
		for(int j=0;sd1[j]!='.';j++)
			d1=d1*10+(sd1[j]-'0');
		alld[i]=365*y1+20*m1+d1; //计算总天数

	}
	cout<<n<<endl;
	for(int i=0;i<n;i++)
	{
cout<<1+alld[i]%13<<" "<<mnameTzolkin[alld[i]%20]<<" "<<alld[i]/260<<endl;
	}
	
	return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator