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
北京大学《ACM/ICPC大学生程序设计竞赛训练》暑期课面向全球招生!

我跟你一样。只打了18个月的表,ft

Posted by raymond8023 at 2009-03-22 13:36:49 on Problem 1008
In Reply To:Re:注意这组数据——好东东 Posted by:wlys111 at 2007-05-03 11:14:49
> 
> 好的测试数据,我居然把最后一个月落下了,哈哈……
> 作为反馈,贴上我的垃圾代码,请大家指点(Accepted 132K 15MS C++ 728B ):
> #include <iostream>
> using namespace std;
> 
> void main()
> {
> 	int count;
> 	cin>>count;
> 	cout<<count<<endl;
> 	char mounth[15];
> 	char map[40] = "lllinnmmmpppppssrrjkhbbaaaocccccgddddfe";
> 	char *mounth2[20] = { "imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"};
> 
> 	while( count-- ) {
> 		int day,year;
> 		cin>>day>>mounth>>mounth>>year;
> 		int m = map[mounth[0]+mounth[1]-200] - 'a';
> 		if(m == 9 && mounth[0] == 'k')
> 			m = 16;
> 		long days = 365*year + m*20 +day;//没有判断输入的格式
> 		year = days/260;
> 		day = days%260;
> 		m = day%20;
> 		day = day%13+1;
> 		cout<<day<<" "<<mounth2[m]<<" "<<year<<endl;
> 	}
> }

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