結果
| 問題 |
No.2110 012 Matching
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-28 21:26:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 337 ms / 2,000 ms |
| コード長 | 231 bytes |
| コンパイル時間 | 506 ms |
| コンパイル使用メモリ | 63,220 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 00:23:53 |
| 合計ジャッジ時間 | 3,574 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 11 |
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
main()
{
int T;cin>>T;
for(;T--;)
{
long a,b,c;
cin>>a>>b>>c;
long ans=b/2*2;b%=2;
long t=min(a,c);
ans+=t*2;a-=t;c-=t;
ans+=c/2;c%=2;
ans+=min(a,b);
cout<<ans<<"\n";
}
}