# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
80006 | pzdba | Košnja (COCI17_kosnja) | C++14 | 22 ms | 868 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>
using namespace std;
int main(){
int k, n, m;
scanf("%d", &k);
for(int i=1;i<=k;i++){
scanf("%d%d", &n, &m);
n = min(n, m);
if(n == 1) printf("1\n");
else printf("%d\n", 2 + (n-2)*2);
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |