/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 198ms 1004.0 KiB
#3 Accepted 196ms 1.574 MiB

Code

#include <bits/stdc++.h>

using namespace std;


int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int t;
    cin >> t;
    while (t--)
    {
        long long n, m, k;
        cin >> n >> m >> k;
        int odd = 0;
        if (n & 1) odd++;
        if (m & 1) odd++;
        if (k & 1) odd++;
        if (odd == 0 || odd == 1)
            cout << n + m + k << endl;
        else if (odd == 2)
            cout << n + m + k - 1 << endl;
        else if (odd == 3)
            cout << n + m + k - 2 << endl;

    }
}

Information

Submit By
Type
Submission
Problem
P1195 B. Palindrome
Language
C++17 (G++ 13.2.0)
Submit At
2025-07-16 13:27:38
Judged At
2025-07-16 13:27:38
Judged By
Score
100
Total Time
198ms
Peak Memory
1.574 MiB