結果
| 問題 | No.2110 012 Matching |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-28 21:26:00 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 204 ms / 2,000 ms |
| コード長 | 231 bytes |
| 記録 | |
| コンパイル時間 | 526 ms |
| コンパイル使用メモリ | 73,848 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-03-27 10:48:11 |
| 合計ジャッジ時間 | 2,946 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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";
}
}