2 条题解
-
0
#include <bits/stdc++.h> using namespace std; #define int long long void solve() { int a,b,c; cin >> a >> b >> c; // 若三幅牌的总数不是3的倍数,直接输出 "haha" if((a + b + c) % 3){ cout << "haha" << '\n'; return; }else{ int x = (a + b + c) / 3; // 若两人手中持牌数都不大于 X,则一定可以 if(a <= x && b <= x){ cout << "good" << '\n'; }else{ cout << "haha" << '\n'; } } } signed main() { ios::sync_with_stdio(0); cin.tie(0),cout.tie(0); int T = 1; cin >> T; while (T--) solve(); return 0; }
信息
- ID
- 1181
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- (无)
- 递交数
- 99
- 已通过
- 50
- 上传者