# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
80005 | pzdba | Košnja (COCI17_kosnja) | C++14 | 26 ms | 724 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);
int 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... |