Submission #381412

# Submission time Handle Problem Language Result Execution time Memory
381412 2021-03-25T07:32:19 Z D_B Košnja (COCI17_kosnja) C++17
50 / 50
138 ms 620 KB
#include<bits/stdc++.h>
using namespace std;
int main(){
    int t;
    cin>>t;
    for (int i = 1;i<=t;i++){
        int x,y;
        cin>>x>>y;
        if (x==1 || y==1){
            cout<<0<<'\n';
        }
        else{
            cout<<(min(x,y)-1)*2<<'\n';
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 87 ms 492 KB Output is correct
7 Correct 138 ms 620 KB Output is correct
8 Correct 94 ms 620 KB Output is correct
9 Correct 136 ms 620 KB Output is correct
10 Correct 92 ms 492 KB Output is correct