# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
381339 | BilAktauAlmansur | Košnja (COCI17_kosnja) | C++17 | 136 ms | 632 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=0;
cin>>k;
int n=0, m=0;
for (int i=0; i<k; i++) {
cin>>n>>m;
if (n==1 || m==1) {
cout << 0;
}
else {
if (max(n, m)%2==0) {
cout << max(n, m);
}
else {
cout << max(n, m)+1;
}
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |