結果
問題 | No.2110 012 Matching |
ユーザー | t98slider |
提出日時 | 2022-10-28 21:30:50 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 483 bytes |
コンパイル時間 | 1,644 ms |
コンパイル使用メモリ | 164,032 KB |
実行使用メモリ | 4,504 KB |
最終ジャッジ日時 | 2023-09-20 04:16:02 |
合計ジャッジ時間 | 2,984 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int T; cin >> T; while(T--){ ll A, B, C, ans = 0; cin >> A >> B >> C; auto f = [](ll &x, ll &y){ ll d = min(x, y); x -= d, y -= d; return d; }; ans += 2 * f(A, C); ans += 2 * (B / 2); B %= 2; ans += A / 2; cout << ans << '\n'; } }