Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...) 42
#endif
#define int long long
void solve() {
int n, m, k;
cin >> n >> m >> k;
int ans = (n / 2 + m / 2 + k / 2) * 2;
if (n & 1 || m & 1 || k & 1) {
ans++;
}
cout << ans << '\n';
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
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:33:39
- Judged At
- 2025-06-13 15:33:39
- Judged By
- Score
- 100
- Total Time
- 53ms
- Peak Memory
- 1.562 MiB