[ZJ]b762: 英國聯蒙

題目:
http://zerojudge.tw/ShowProblem?problemid=b762

========================================================================
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
string s[45];
int kill = 0, flag_kill = 0, die = 0, assist = 0;
for(int i=0;i<n;i++)
{
cin >> s[i];
if(s[i] == "Get_Kill")
{
kill++;
flag_kill++;
switch(flag_kill)
{
case 1:
printf("You have slain an enemie.\n");
break;
case 2:
printf("You have slain an enemie.\n");
break;
case 3:
printf("KILLING SPREE!\n");
break;
case 4:
printf("RAMPAGE~\n");
break;
case 5:
printf("UNSTOPPABLE!\n");
break;
case 6:
printf("DOMINATING!\n");
break;
case 7:
printf("GUALIKE!\n");
break;
default :
printf("LEGENDARY!\n");
break;
}
}
else if(s[i] == "Get_Assist")
assist++;
else if(s[i] == "Die")
{
if(flag_kill <= 2)
printf("You have been slained.\n");
else
printf("SHUTDOWN.\n");
die++;
flag_kill = 0;
}
}
printf("%d/%d/%d\n",kill,die,assist);
}
return 0;
}

留言

這個網誌中的熱門文章

[ZJ]b513: 判斷質數-商競103

[ZJ]d212: 東東爬階梯