# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
473120 | Ahmed_Solyman | Košnja (COCI17_kosnja) | C++14 | 110 ms | 680 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;
typedef long long ll;
int main(){
ll t;cin>>t;
while(t--){
ll n,m;cin>>n>>m;
if(n>1 && m>1)cout<<2+(2*(min(n,m)-2))<<endl;
else cout<<0<<endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |