# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
381368 | BilAktauAlmansur | Košnja (COCI17_kosnja) | C++17 | 141 ms | 748 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 ans;
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 {
int um=min(n, m);
for (int i=2; i<=um; i++) {
ans+=2;
}
cout << ans << endl;
ans=0;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |