Accepted
Code
#ifndef LOCAL
#include <bits/stdc++.h>
#define debug(...)
#endif
using namespace std;
#define int long long
#define cinv(v) for (auto &it:v) cin>>it;
#define coutv(v) for (auto &it:v) cout<< it<<' '; cout<<'\n';
void shelby() {
int a, b, c;
cin >> a >> b >> c;
int rem = max(0LL, (a % 2) + (b % 2) + (c % 2) - 1);
cout << (a + b + c) - rem << '\n';
}
signed main() {
cin.tie(0)->sync_with_stdio(0);
int t = 1;
cin >> t;
for (int _ = 1; _ <= t; ++_) {
// cout << "Case " << _ << ": ";
shelby();
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1195 B. Palindrome
- Contest
- Brain Booster #10
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-06-13 15:43:53
- Judged At
- 2025-06-13 15:43:53
- Judged By
- Score
- 100
- Total Time
- 57ms
- Peak Memory
- 1.52 MiB