/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 29ms 988.0 KiB
#3 Accepted 37ms 1.363 MiB

Code

#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//#include <utility> 
#define ll long long
#define endl "\n"
using namespace std;
//struct cmp { bool operator()(const ll &a, const ll &b) const { return a < b; }};
//#define ordered_set tree<ll, null_type,cmp,rb_tree_tag, tree_order_statistics_node_update>
// st.find_by_order(index) gives the k-th smallest element (0-based index)
// st.order_of_key(x) gives the number of elements strictly less than x
#define sp(x) fixed << setprecision(x)
//int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move 
//int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
// auto it = mp.find(x);if (it != mp.end())
//priority_queue<pair<ll, ll>,vector<pair<ll,ll>>,greater<pair<ll,ll>>> pq;
//sort(vec.begin(), vec.end(),greater<int>());
//vector<bool> isPrime(limit + 1, true);
#define memo(a,b) memset(a,b,sizeof(a))




int main ()
{
ios_base::sync_with_stdio(0);cin.tie(0);
int test;
cin >>test;
while (test--)
{

ll a,b,c; cin>>a>>b>>c;

ll sum=a+b+c;
ll cnt=(a&1)+(b&1)+(c&1);
cnt--;
cout<<sum-max(0LL,cnt)<<endl;

}

}

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:40:06
Judged At
2025-06-13 15:40:06
Judged By
Score
100
Total Time
37ms
Peak Memory
1.363 MiB