[解題報告][ZeroJudge][d584] 技能點數skill 七月 12, 2010 程式碼, ZeroJudge 本文总阅读量次 123456789101112131415161718192021/*Problem: d584Language: C++Result: AC (5ms, 722KB) on ZeroJudgeAuthor: m80126colin at 2010-07-12 19:02:37Solution: Table*/#include <iostream>using namespace std;int a[5][201],i,j;inline void ad() { for (a[2][8]=i=1;i<3;i++) a[2][8+i]=a[2][7+i]+3; for (i=10;i<=200;i++) { if (i==10) a[1][i]=a[3][i]=a[4][i]=a[1][i-1]+1; else if (i==30||i==70) for (j=1;j<=4;j++) a[j][i]=a[j][i-1]+4; else if (i==120) for (j=1;j<=4;j++) a[j][i]=a[j][i-1]+6; else for (j=1;j<=4;j++) a[j][i]=a[j][i-1]+3; }}int main() {for (ad();~scanf("%d%d",&i,&j);printf("%d\n",a[i][j]));} Newer [解題報告][ZeroJudge][d586] 哈密瓜美語 Older [解題報告][ZeroJudge][d583] 幼稚的企鵝