結果
問題 | No.2110 012 Matching |
ユーザー |
![]() |
提出日時 | 2022-10-28 23:33:57 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 312 ms / 2,000 ms |
コード長 | 545 bytes |
コンパイル時間 | 532 ms |
コンパイル使用メモリ | 74,220 KB |
最終ジャッジ日時 | 2025-02-08 15:17:00 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 11 |
ソースコード
#include <atcoder/modint>using mint = atcoder::modint998244353;using ll = long long;#include <algorithm>#include <iostream>#include <utility>#include <vector>int main() {int T;std::cin >> T;for (int cc = 0; cc < T; cc++) {ll A, B, C;std::cin >> A >> B >> C;ll ans = 0;{ll m = std::min(A, C);ans += 2 * m;A -= m;C -= m;}if (A == 0) {ans += 2 * (B / 2);ans += C / 2;}else {ans += B;}std::cout << ans << "\n";}return 0;}