Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#define ll long long
void solve() {
ll n, m, k; cin >> n >> m >> k;
ll x = n / 2 + m / 2 + k / 2;
bool ok = (n % 2) || (m % 2) || (k % 2);
long long ans = x * 2 + (ok ? 1 : 0);
cout << ans << endl;
}
int main() {
int t;
cin >> t;
while (t--) {
solve();
}
return 0;
}
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:46:12
- Judged At
- 2025-06-13 15:46:12
- Judged By
- Score
- 100
- Total Time
- 205ms
- Peak Memory
- 1.602 MiB