/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 28ms 920.0 KiB
#3 Accepted 33ms 1.438 MiB

Code

#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define endl '\n'
#define ll long long
#define vi vector<ll>
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define rep(i, a, b) for(ll i = (a); i < (b); i++)
#define print(v) for(auto e:v) cout<<e<<" "; cout<<endl;

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll t=1;cin>>t;
    for(int i=1;i<=t;i++){
        solve(i);
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1195 B. Palindrome
Language
C++17 (G++ 13.2.0)
Submit At
2025-06-14 07:44:31
Judged At
2025-06-14 07:44:31
Judged By
Score
100
Total Time
33ms
Peak Memory
1.438 MiB