結果
問題 | No.2110 012 Matching |
ユーザー |
![]() |
提出日時 | 2022-10-28 22:56:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 767 bytes |
コンパイル時間 | 1,035 ms |
コンパイル使用メモリ | 114,388 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 02:10:03 |
合計ジャッジ時間 | 4,115 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 11 |
ソースコード
#include <iostream> #include<random> #include<utility> #include <vector> #include <regex> #include <map> #include<string> #include<queue> #include<math.h> #include<set> #include<cstring> #include<algorithm> #define pb push_back #define all(x) begin(x),end(x) #define gall(x) begin(x),end(x),greater<>() #define ll long long #define P pair<int,int> #define lP pair<ll,ll> #define bit(x,i) (x>>i&1) using namespace std; int main(){ int t; cin>>t; for(int i=0;i<t;i++){ ll a,b,c,ans=0; cin>>a>>b>>c; ll mi=min(a,c); ans+=2*mi; a-=mi; c-=mi; ans+=2*(b/2); b=b%2; if(a>c) ans+=1; else { c--; ans+=c/2; } cout<<ans<<endl; } return 0; }