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

测试数据也过了 但是总是不能通过

Posted by davidmeng6628 at 2006-03-22 11:22:50 on Problem 1008
#include <iostream.h>
#include <string.h>
#include <stdio.h> 
int main()
{
	char month1[19][9]={"pop", "no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac", 
		"ceh","mac","kankin","muan","pax","koyab","cumhu","uayet" };
	char month2[20][10] ={ "ahau ","imix ", "ik ", "akbal ", "kan ", "chicchan ", "cimi ", "manik ", "lamat ", "muluk ", "ok ", 
		"chuen ","eb ", "ben ", "ix ", "mem ", "cib ", "caban ", "eznab ", "canac "};
	
	int year1,day1,year2,day2,count,day;
	char t,word[10];
	cin>>count;
	cout<<count<<endl;
	while(count--)
	{
		cin>>day1;
		cin>>t;
		cin>>word;
		int i=0;
		for (i=0;strcmp(word,month1[i]);i++);
		int m=i;
		cin>>year1;
		if (m==19)
			day=360+day1;
		else day=m*20+day1;
		day+=year1%260*365;
		day++;
		year2=year1/260*365+day/260;
		int mon=day%20;
		day2=day%13;
		if (day2==0)
			day2=13;
		cout<<day2<<" "<<month2[mon]<<year2<<endl;
	}
	return 0;
}
帮我看一下,高手们,QQ89434081 万分感谢!
还有JudgeOnlineSetup怎么用啊!麻烦解释一下!
	

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