/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 31ms 1.062 MiB
#3 Accepted 61ms 1.566 MiB

Code

#include <bits/stdc++.h>

using namespace std;

void solve(int cs) {
  int64_t a, b, c;
  cin >> a >> b >> c;
  int64_t ans = a / 2 * 2 + b / 2 * 2 + c / 2 * 2;
  if (a % 2 || b % 2 || c % 2) ++ans;
  cout << ans << "\n";
}

int32_t main() {
  cin.tie(0) -> sync_with_stdio(0);
  int t = 1;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    solve(i);
  }
  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:38:08
Judged At
2025-06-13 15:38:08
Judged By
Score
100
Total Time
61ms
Peak Memory
1.566 MiB