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

帮忙查错 3Q

Posted by kelven at 2006-05-28 16:21:45 on Problem 1008
结果在自己机子上是正确的 但是怎么提交了老超时呢??
#include <iostream>
#include <string>
using namespace std;
string a[19]={"pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin", "mol", "chen", "yax", "zac", "ceh", "mac", "kankin", "muan", "pax", "koyab", "cumhu","uayet"};
string b[20]={"imix", "ik", "akbal", "kan", "chicchan", "cimi", "manik", "lamat", "muluk", "ok", "chuen", "eb", "ben", "ix", "mem", "cib", "caban", "eznab", "canac", "ahau"};
int  main(){
int num;
int days[100];
string p;
int x,y;char s;
cin>>num;
for(int i=0;i<num;i++)
{
cin>>x>>s>>p>>y;
days[i]=x;
for(int j=0;j<19;j++)
{if(p==a[j])
{days[i]+=j*20;
break;}
}

days[i]+=y*365;
}
cout<<num<<endl;
int z;
for(i=0;i<num;i++)
{
z=days[i]%260;
cout<<(z%13+1)<<" "<<b[z%20]<<" "<<days[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