ZJANS

b762. 英國聯蒙

Easy Last Update: 2026/01/21
cpp

解法一

✅ 完整代碼

評分結果(參考) : AC (3ms, 332KB)

#include<bits/stdc++.h>
#define int long long
using namespace std;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    string report[] = {"",
        "You have slain an enemie.", "You have slain an enemie.",
        "KILLING SPREE!", "RAMPAGE~",
        "UNSTOPPABLE!", "DOMINATING!",
        "GUALIKE!", "LEGENDARY!"};
    
    int n;
    cin >> n;
    
    string s;
    int killstreak = 0;
    int kill=0, death=0, assist=0;
    
    
    for(int i=0; i<n; i++){
        cin >> s;
        if(s == "Get_Kill"){
            killstreak++;
            kill++;
            if(killstreak > 8) cout << report[8] << "\n";
            else cout << report[killstreak] << "\n";
        }
        else if(s == "Get_Assist"){
            assist++;
        }
        else if(s == "Die"){
            death++;
            if(killstreak < 3) cout << "You have been slained.\n";
            else cout << "SHUTDOWN.\n";
            killstreak = 0;
        }
    }
    cout << kill << "/" << death << "/" << assist;
    
    return 0;
}