답안 #250480

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
250480 2020-07-18T07:14:56 Z Vladikus004 Košnja (COCI17_kosnja) C++14
50 / 50
17 ms 640 KB
#include <bits/stdc++.h>
#define inf 2e9
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair <int, int> pii;

int t, n, m, mn = inf;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    #ifdef LOCAL
        freopen("input.txt", "r", stdin);
    #endif // LOCAL
    cin >> t;
    while (t--){
        cin >> n >> m;
        if (n > m) n = m;
        cout << n * 2 - 2 << "\n";
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 11 ms 512 KB Output is correct
7 Correct 17 ms 640 KB Output is correct
8 Correct 10 ms 512 KB Output is correct
9 Correct 16 ms 640 KB Output is correct
10 Correct 11 ms 512 KB Output is correct