# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
161483 | ToniB | Košnja (COCI17_kosnja) | C++14 | 179 ms | 1016 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 <iostream>
using namespace std;
int main(){
int k, m, n;
cin >> k;
int sol[k];
for(int i = 0; i < k; i++){
cin >> m >> n;
if(m == 1 or n == 1){
sol[i] = 0;
}
else if(m < n){
sol[i] = (m-1)*2;
}
else{
sol[i] = (n-1)*2;
}
}
for(int i = 0; i < k; i++){
cout << sol[i] << endl;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |