Submission #37973

# Submission time Handle Problem Language Result Execution time Memory
37973 2017-12-29T19:17:26 Z wasyl Košnja (COCI17_kosnja) C++11
25 / 50
0 ms 2176 KB
#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 time Memory Grader output
1 Correct 0 ms 2176 KB Output is correct
2 Correct 0 ms 2176 KB Output is correct
3 Correct 0 ms 2176 KB Output is correct
4 Correct 0 ms 2176 KB Output is correct
5 Correct 0 ms 2176 KB Output is correct
6 Runtime error 0 ms 2176 KB Execution killed because of forbidden syscall writev (20)
7 Runtime error 0 ms 2176 KB Execution killed because of forbidden syscall writev (20)
8 Runtime error 0 ms 2176 KB Execution killed because of forbidden syscall writev (20)
9 Runtime error 0 ms 2176 KB Execution killed because of forbidden syscall writev (20)
10 Runtime error 0 ms 2176 KB Execution killed because of forbidden syscall writev (20)