预期定位:红 / 字符串 / 模拟
直接按照题意模拟即可。
std by Karmallis
#include<bits/stdc++.h>
using namespace std;
#define h(x) (s.find(x)!=s.npos)
int n,x,y;
string s;
main(){
cin>>n>>y;
x=y;
while(n--){
cin>>s;
if(h("kirai")) x=-max(-x,0);
else if(h("shuki")) x+=1+h("daishuki");
else x--;
}
cout<<(x>0?to_string(x-y):"shuki");
}