Submission #559619

#TimeUsernameProblemLanguageResultExecution timeMemory
559619TrunktyKošnja (COCI17_kosnja)C++14
50 / 50
12 ms1220 KiB
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;

#define DEBUG
#ifdef DEBUG
  #define debug(x) cout << #x << ": " << x << endl
#else
  #define debug(x)
#endif

int k;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cin >> k;
	for(int i=1;i<=k;i++){
		int n,m;
		cin >> n >> m;
		cout << (min(n,m)-1)*2 << "\n";
	}
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...