/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 3ms 532.0 KiB
#2 Accepted 190ms 1.02 MiB
#3 Accepted 190ms 1.566 MiB

Code

#include<bits/stdc++.h>
using namespace std;
const int N = 2e5+10;
#define int long long
#define Yes cout<<"YES"<<endl
#define No  cout<<"NO"<<endl
#define f first
#define s second
const int M = 1e9+7;
#define all(x) (x).begin(),(x).end()
#define setprecision(x) fixed<<setprecision((int)(x))
bool odd(int num) {return ((num & 1) == 1);}
bool even(int num) {return ((num & 1) == 0);}
const int inf = 1e18;
   


void solve(){
   int n,m,k;
    cin>>n>>m>>k;
   int ans = (n / 2) * 2 + (m / 2) * 2 + (k / 2) * 2;
   if (n % 2 == 1 || m % 2 == 1 || k % 2 == 1) {
        ans++;
    }
    cout << ans << endl;
}



 
int32_t main(){ 
    ios::sync_with_stdio(0);cin.tie(0);
 
    //solve();



    int t;
    cin>>t;
    for(int T=1;T<=t;T++){
       //cout<<"Case "<<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:55:08
Judged At
2025-06-13 15:55:08
Judged By
Score
100
Total Time
190ms
Peak Memory
1.566 MiB