/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 1ms 532.0 KiB
#4 Accepted 1ms 368.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
#define optimize()                    \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);cout.tie(NULL);
#define fraction()                \
    cout.unsetf(ios::floatfield); \
    cout.precision(20);           \
    cout.setf(ios::fixed, ios::floatfield);
#define file()                        \
    freopen("input.txt", "r", stdin); \
    freopen("output", "w", stdout);
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef long long ll;
typedef pair<int, int> pr;
template <typename T> using ordered_set = tree <T, null_type,less<T>, rb_tree_tag, tree_order_statistics_node_update>;
ll lcm(ll a, ll b)
{
    return (a * b) / __gcd(a, b);
}
int gcd(ll a, ll b)
{
    return __gcd(a, b);
}
#define el "\n"
const int mod = 1e9+7;
const int mx = 5e5 + 125;

bool com(const pair<ll, ll> &p1, const pair<ll, ll> &p2)
{
    if (p1.first == p2.first) return p1.second > p2.second;
    return p1.first < p2.first;
}
bool compare(const pair<pair<int, int>, int>& a, const pair<pair<int, int>, int>& b)
{

    if (a.first.first != b.first.first)
        return a.first.first < b.first.first;
    if (a.first.second != b.first.second)
        return a.first.second < b.first.second;
    return a.second < b.second;
}

//const int mx = 1e8;
bitset<mx> isPrime;
vector<int> primes;
map<int,int>m;

void primeGen ( int n )
{
    for ( int i = 3; i <= n; i += 2 ) isPrime[i] = 1;

    int sq = sqrt(n);
    for ( int i = 3; i <= sq; i += 2 )
    {
        if(isPrime[i])
        {
            for ( int j = i*i; j <= n; j += i )
            {
                isPrime[j] = 0;
            }
        }
    }

    primes.push_back(2);

    for ( int i = 3; i <= n; i += 2 )
    {
        if(isPrime[i] == 1)
        {
            primes.push_back(i);
        }
    }
}

void factors(int x)
{
    for ( auto p : primes )
    {
        for ( int i = p; i <= primes.size(); i += p )
        {
            int n = x;

            while ( n % p == 0 )
            {
                //factors[i].push_back(p);
                m[p]++;
                n /= p;
            }
        }
    }

}

int power(ll x,ll y)
{
    int num=1;
    for(int i=0; i<y; i++)
    {
        num*=3;
    }
    return num;
}




void giveanswer()
{
    int a,b,c;
    cin>>a>>b>>c;
    if(a%2==0 and b%2==0)
    {
        cout<<c<<el;
    }
    else if(b%2==0 and c%2==0)
    {
        cout<<a<<el;
    }
    else if(a%2==0 and c%2==0)
    {
        cout<<b<<el;
    }
    if(a%2 and b%2)
    {
        cout<<c<<el;
    }
    else if(b%2 and c%2)
    {
        cout<<a<<el;
    }
    else if(a%2 and c%2)
    {
        cout<<b<<el;
    }

}

int main()
{
    optimize();
    fraction();
    /*int t;
    cin>>t;
    while(t--)
    {*/
    giveanswer();
    //}
}


Information

Submit By
Type
Submission
Problem
P1232 Parity
Contest
LUCC Presents Intra LU Junior Programming Contest - Replay
Language
C++17 (G++ 13.2.0)
Submit At
2025-09-02 15:34:01
Judged At
2025-09-02 15:34:01
Judged By
Score
100
Total Time
1ms
Peak Memory
532.0 KiB