/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 332.0 KiB
#2 Accepted 30ms 1.023 MiB
#3 Accepted 37ms 1.395 MiB

Code

#include<bits/stdc++.h>
using namespace std;

#define Alhamdulillah ios_base::sync_with_stdio(0), cin.tie(0);
#define ll long long
#define ull unsigned long long
#define endl '\n'
#define db(i) cout << "c -> " << i << endl;
#define pv(v) for(auto e : v)   cout << e << " ";   cout << endl;
#define pm(m) for(auto [x,y] : m)   cout << x << " " << y << endl;   cout << endl;

void solve(){
    ll z,o,t,ct = 0;  cin >> z >> o >> t;
    ct += ((z/2LL*2LL) + (o/2LL*2LL) + (t/2LL*2LL));
    if(z%2 || o%2 || t%2)  ++ct;
    cout << ct << endl;
}

int main(){
    Alhamdulillah
    int t=1;    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:47:24
Judged At
2025-06-13 15:47:24
Judged By
Score
100
Total Time
37ms
Peak Memory
1.395 MiB