結果
問題 |
No.2110 012 Matching
|
ユーザー |
![]() |
提出日時 | 2023-05-02 22:40:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 338 ms / 2,000 ms |
コード長 | 356 bytes |
コンパイル時間 | 540 ms |
コンパイル使用メモリ | 70,476 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 10:37:48 |
合計ジャッジ時間 | 3,831 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 11 |
ソースコード
#include <iostream> #include <vector> #include <cmath> using namespace std; typedef long long ll; ll satisfaction(ll a, ll b, ll c){ ll ret; if(a>c){ ret = 2*(c+b/2); if(b&1) ret++; } else { ret = 2*(a+b/2)+(c-a)/2; } return ret; } int main() { int t;cin>>t; while(t--){ ll a,b,c;cin>>a>>b>>c; cout << satisfaction(a,b,c)<<endl; } }