結果
問題 | No.2110 012 Matching |
ユーザー |
![]() |
提出日時 | 2023-08-01 18:42:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 348 ms / 2,000 ms |
コード長 | 624 bytes |
コンパイル時間 | 4,038 ms |
コンパイル使用メモリ | 250,524 KB |
最終ジャッジ日時 | 2025-02-15 21:21:49 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=1000000007; ll inf=1000; int main(){ ll t; cin >> t; for (ll i = 0; i < t; i++) { ll a,b,c; cin >> a >> b >> c; ll x=0; x+=min(c,a)*2; a-=x/2; c-=x/2; x+=c/2; if (b%2) { if (a>=1) { x+=b; }else{ x+=b-1; } }else{ x+=b; } cout << x << endl; } }