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

为什么老是Outputlimited succeed,太奇怪了。

Posted by 04603025 at 2003-12-13 21:27:20 on Problem 1008
#include<stdio.h>
#include<math.h>
#include<string.h>



#define pop 0
#define no 1
#define zip 2
#define zotz 3
#define tzec 4
#define xul 5
#define yoxkin 6
#define mol 7
#define chen 8
#define yax 9
#define zac 10
#define ceh 11
#define mac 12
#define kankin 13
#define muan 14
#define pax 15
#define koyab 16
#define cumhu 17
#define uayet 18

void main(){
struct c{
	int d;
	char str[8];
	int y;
}c[100];
	int x[100],y[100],z[100];
	int n,i,s;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d %s %d",&c[i].d,&c[i].str[8],&c[i].y);
	static char *month_name[20]={"imix","ik","akbal","chicchan","cimi","manik",
		"lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab",
		"canac","ahau"};
	printf("%d\n",n);
	for(i=0;i<n;i++)
	{   
		s=c[i].d+c[i].str[8]*20+c[i].y*365;
		x[i]=s/260;
		y[i]=s%260%13+1;
		z[i]=s%260%20;
		printf("%d %s %d",y[i],*month_name+z[i],x[i]);
		printf("\n");
	}
}


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