답안 #886681

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
886681 2023-12-12T16:12:58 Z vjudge1 Košnja (COCI17_kosnja) C++17
50 / 50
61 ms 1116 KB
#include <bits/stdc++.h>
using namespace std;
#define sp << " " << 
#define int long long
#define vi vector<int>
#define F(xxx,yyy) for (int xxx=1;xxx<=yyy;xxx++)
#define pii pair<int,int>
#define pb push_back
const int N = 2e5+1;
const int inf = 1e9+1;

void solve() {
  int a,b;
  cin >> a >> b;
  if (a > b) swap(a,b);
  cout << (a-1)*2 << endl;
}
    
                  
                             
signed main() { 
  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  #ifdef Local
  freopen("in","r",stdin);
  freopen("out","w",stdout); 
  #endif
  int t = 1;
  cin >> t;
	F(i,t) solve();
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 38 ms 1004 KB Output is correct
7 Correct 57 ms 1116 KB Output is correct
8 Correct 41 ms 856 KB Output is correct
9 Correct 61 ms 1104 KB Output is correct
10 Correct 39 ms 1032 KB Output is correct