結果
問題 | No.2110 012 Matching |
ユーザー |
👑 |
提出日時 | 2022-11-07 10:48:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 599 ms |
コンパイル使用メモリ | 67,292 KB |
最終ジャッジ日時 | 2025-02-08 19:08:05 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 11 |
ソースコード
#include <iostream> using namespace std; void solve(){ long long a,b,c;cin>>a>>b>>c; long long ans = b/2*2; b%=2; if(a<c){ ans += a*2; c-=a; a = 0; }else{ ans += c*2; a-=c; c = 0; } if(a){ ans++; a--;b--; } ans += c/2; cout << ans << endl; } int main(){ int n;cin>>n; for(int i = 0; n > i; i++)solve(); }