# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
381328 | 2021-03-25T06:16:55 Z | AdiZer0 | Košnja (COCI17_kosnja) | C++17 | 19 ms | 620 KB |
#include <bits/stdc++.h> #define pb push_back #define whole(x) x.begin(), x.end() #define sz(x) (int)x.size() using namespace std; typedef long long ll; typedef long double ld; const int N = (int)3e5 + 7; const int INF = (int)1e9 + 7; const ll linf = (ll)1e18 + 1; void solve() { int n, m; scanf ("%d %d", &n, &m); if (n > m) swap(n, m); ll ans = (n - 1) * 1ll * 2; printf ("%lld\n", ans); } int main() { int tt; scanf ("%d", &tt); while (tt--) solve(); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 1 ms | 364 KB | Output is correct |
3 | Correct | 1 ms | 364 KB | Output is correct |
4 | Correct | 1 ms | 364 KB | Output is correct |
5 | Correct | 1 ms | 364 KB | Output is correct |
6 | Correct | 12 ms | 492 KB | Output is correct |
7 | Correct | 18 ms | 620 KB | Output is correct |
8 | Correct | 13 ms | 492 KB | Output is correct |
9 | Correct | 19 ms | 620 KB | Output is correct |
10 | Correct | 16 ms | 492 KB | Output is correct |