답안 #166641

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
166641 2019-12-03T10:47:02 Z muhi1112 Košnja (COCI17_kosnja) C++17
50 / 50
18 ms 1408 KB
#include <bits/stdc++.h>
using namespace std;
 
#define endl '\n'
#define f1 first
#define s2 second
#define pb push_back
#define mp make_pair
#define ll long long
#define fri(a) freopen(a,"r",stdin);
#define fro(a) freopen(a,"w",stdout);
const int N=405;

int tt,a,b;

int main(){
	//fri("in.txt");
	//fro("out.txt");
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cin>>tt;
	while(tt--){
		cin>>a>>b;
		cout<<2*min(a-1,b-1)<<endl;
	}


return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 380 KB Output is correct
4 Correct 3 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 12 ms 1016 KB Output is correct
7 Correct 18 ms 1408 KB Output is correct
8 Correct 13 ms 1016 KB Output is correct
9 Correct 17 ms 1272 KB Output is correct
10 Correct 12 ms 1016 KB Output is correct