結果
| 問題 |
No.3173 じゃんけんの勝ちの回数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-06 22:50:37 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 2,000 ms |
| コード長 | 551 bytes |
| コンパイル時間 | 3,939 ms |
| コンパイル使用メモリ | 278,324 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-06-06 22:50:43 |
| 合計ジャッジ時間 | 5,540 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 33 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve();
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int tc; cin >> tc;
for (int tt = 0; tt < tc; tt++) solve();
return 0;
}
void solve() {
vector<int> a(3), b(3);
for (int &x : a) cin >> x;
for (int &x : b) cin >> x;
int w_max = min(a[0], b[1]) + min(a[1], b[2]) + min(a[2], b[0]);
int w_min = max(0, max({a[0] + b[1], a[1] + b[2], a[2] + b[0]}) - a[0] - a[1] - a[2]);
cout << w_min << " " << w_max << "\n";
}