結果
| 問題 |
No.2110 012 Matching
|
| コンテスト | |
| ユーザー |
sorag
|
| 提出日時 | 2022-10-28 23:01:36 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 854 bytes |
| コンパイル時間 | 891 ms |
| コンパイル使用メモリ | 114,812 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 02:14:30 |
| 合計ジャッジ時間 | 3,739 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 10 |
ソースコード
#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 and b==1) ans+=1;
else {
if(b==1){
c--;
ans+=c/2;
}
else ans+=c/2;
}
cout<<ans<<endl;
}
return 0;
}
sorag