結果
問題 |
No.2110 012 Matching
|
ユーザー |
![]() |
提出日時 | 2022-10-29 18:53:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 571 bytes |
コンパイル時間 | 224 ms |
コンパイル使用メモリ | 40,900 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 16:07:10 |
合計ジャッジ時間 | 1,865 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 10 |
ソースコード
/* -*- coding: utf-8 -*- * * 2110.cc: No.2110 012 Matching - yukicoder */ #include<cstdio> #include<algorithm> using namespace std; /* constant */ /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ /* main */ int main() { int tn; scanf("%d", &tn); while (tn--) { ll a, b, c; scanf("%lld%lld%lld", &a, &b, &c); ll sum = 0; ll d02 = min(a, c); a -= d02, c -= d02; sum += d02 * 2 + c / 2; ll d01 = min(a, b); b -= d01; sum += d01 + b / 2 * 2; printf("%lld\n", sum); } return 0; }