/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 28ms 908.0 KiB
#3 Accepted 35ms 1.531 MiB

Code

 #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) 42
#endif
const double PI = acos(-1);
const ll MOD = 998244353;

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

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll tstcs;
    cin >> tstcs;
    for (int t = 1; t <= tstcs; t++)
    {
        // cout << "Case " << t << ": ";
        solve();
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1195 B. Palindrome
Language
C++17 (G++ 13.2.0)
Submit At
2025-07-13 14:48:53
Judged At
2025-07-13 14:48:53
Judged By
Score
100
Total Time
35ms
Peak Memory
1.531 MiB