/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 30ms 1.02 MiB
#3 Accepted 38ms 1.395 MiB

Code

/*
 *Copyright (c) Swadheen Islam Robi (SIR01)
 *Created on Fri Jun 13 2025 8:30:16 PM
 */
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pie 2*(acos(0.0))
#define yes cout<<"YES\n"
#define no cout<<"NO\n"
#define pb push_back
#define endl "\n"
#define lcm(a,b) (a*b)/(__gcd<ll>(a,b))
#define mod 1000000007
#define srt(v) sort(v.begin(),v.end())
#define rsrt(v) sort(v.rbegin(),v.rend())
#define ALLAHU_AKBAR ios::sync_with_stdio(false); cin.tie(nullptr);

void sir2()
{
    ll n; cin>>n;
    ll x = sqrt(n);
    ll ans = 0;
    for(ll i =1; i<=x; i++)
    {
        ll j = i+1;
        if(i*i<=n) ans++;
        if(i*j<=n) ans++;
    }
    cout<<ans<<endl;
    
}
void sir()
{
    ll a,b,c; cin>>a>>b>>c;
    ll cnt = 0;
    ll ans;
    if(a%2)cnt++;
    if(b%2)cnt++;
    if(c%2)cnt++;
    if(cnt<2) ans = a+b+c;
    else if(cnt==2) ans = (a+b+c)-1;
    else ans = (a+b+c)-2;
    cout<<ans<<endl;

}

int main() {
    ALLAHU_AKBAR

    ll t = 1;
    cin>>t;
    while(t--)
    {
        sir();
    }
    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:51:38
Judged At
2025-06-13 15:51:38
Judged By
Score
100
Total Time
38ms
Peak Memory
1.395 MiB