/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 57ms 992.0 KiB
#3 Accepted 36ms 1.52 MiB

Code

#include<bits/stdc++.h>
using namespace std;
#define e4 ios_base::sync_with_stdio(false); cin.tie(NULL)
#define endl '\n'
#define ll  long long
#define test_case int tc;cin>>tc;while(tc--)



int  main() {

	
	  	 e4;

	  	 test_case{

	  	 ll n,m,k;

	  	 cin>>n>>m>>k;

	  	 ll ans=0;

	  	 if(n&1){
	  	 	ans+=(n+m+k);
	  	 	if(m&1)ans--;
	  	 	if(k&1)ans--;
	  	 }
	  	 else{
	  	 	ans+=(n+m+k);
	  	 	if(m&1 && k&1)ans--;
	  	 }

	  	 cout<<ans<<endl;

	  	}


	  	 
}	
	
		    //          S m o t h e r e d  M a t e !!		 //	

Information

Submit By
Type
Submission
Problem
P1195 B. Palindrome
Language
C++17 (G++ 13.2.0)
Submit At
2025-07-30 11:45:21
Judged At
2025-07-30 11:45:21
Judged By
Score
100
Total Time
57ms
Peak Memory
1.52 MiB