# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
381328 | AdiZer0 | Košnja (COCI17_kosnja) | C++17 | 19 ms | 620 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |