제출 #37973

#제출 시각아이디문제언어결과실행 시간메모리
37973wasylKošnja (COCI17_kosnja)C++11
25 / 50
0 ms2176 KiB
#include <vector>
#include <iostream>
#include <algorithm>
#define d(...) __VA_ARGS__
#define all(x) (x).begin(), (x).end()
#define eb(...) emplace_back(__VA_ARGS__)
using namespace std;using ll=long long;
template<class t>using V = vector< t >;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie( nullptr );
	int n;
	cin >> n;
	while ( n-- )
	{
		int a, b;
		cin >> a >> b;
		int c = min( a, b );
		int res = ( c / 2 ) * 4;
		res -= ( c % 2 == 0 ? 2 : 0 );
		cout << res << '\n'; 
	}		
}	
#Verdict Execution timeMemoryGrader output
Fetching results...