# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
37974 | wasyl | Košnja (COCI17_kosnja) | C++11 | 136 ms | 2016 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
#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()
{
int n;
scanf( "%d", &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 );
printf( "%d\n", res );
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |