#include <bits/stdc++.h>
using namespace std;
int main() {
int T, K, n1, b, t, n2, x;
cin >> T >> K;
// 初始化当前筹码
x = T;
while(K--){
cin >> n1 >> b >> t >> n2;
if(t > x){
printf("Not enough tokens. Total = %d.\n", x);
}
else if((n1 < n2 && b == 1) || (n1 > n2 && b == 0)){
x += t;
printf("Win %d! Total = %d.\n", t, x);
}
else{
x -= t;
printf("Lose %d. Total = %d.\n", t, x);
}
// 输光
if(x <= 0) {
cout << "Game Over.\n";
return 0;
}
}
}
相关文章
- 12-03PAT (Basic Level) Practice (中文)1071 小赌怡情 (15 分)
- 12-03L1-005 考试座位号 (15 point(s))
- 12-031071 小赌怡情 (15 point(s))
- 12-03PAT乙级 1071 小赌怡情(C实现)
- 12-03PAT (Basic Level) 1031 查验身份证 (15 point(s))
- 12-031041 考试座位号 (15 point(s))
- 12-031031 查验身份证 (15point(s))
- 12-031056 组合数的和 (15 point(s))
- 12-03L1-017 到底有多二 (15 point(s))
- 12-03L1-016 查验身份证 (15 point(s))