/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 30ms 1.02 MiB
#3 Wrong Answer 59ms 1.582 MiB

Code

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

/*#ifndef ONLINE_JUDGE
#include "DEBUG.h"
#define bug(...)           __f (#__VA_ARGS__, __VA_ARGS__)
#endif*/

#define first_in_out       ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define int                 long long int
#define double             long double
#define print(a)           for(auto x : a) cout << x << " ";
#define printpair(a)       for(auto x : a) cout << x.first << " " << x.second<<"\n";



void solve()
{

	int n, m, k;
	cin >> n >> m >> k;


	if (n % 2 == 0 and m % 2 == 0 and k % 2 == 0)
		cout << n + m + k << "\n";
	else
	{
		int f = 0;
		f += (n % 2 == 0);
		f += (m % 2 == 0);
		f += (k % 2 == 0);

		if (f == 2)
			cout << n + m + k  << "\n";
		else
			cout << n + m + k - 1 << "\n";
	}
}


int32_t main()
{
	first_in_out

	int t = 1;
	cin >> t;

	while (t--)
		solve();

}

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:42:44
Judged At
2025-06-13 15:42:44
Judged By
Score
0
Total Time
59ms
Peak Memory
1.582 MiB