Submission #381326

# Submission time Handle Problem Language Result Execution time Memory
381326 2021-03-25T06:12:36 Z abzal028 Košnja (COCI17_kosnja) C++14
50 / 50
136 ms 748 KB
#include<iostream>
using namespace std;
main(){
    int k,n,m;
    cin>>k;
		for(int i = 1;i <= k; ++i){ 
        cin>>n>>m;
        n = min(n, m);
        n--;
        cout<<n * 2<<endl;
    }
    return 0;
}

Compilation message

kosnja.cpp:3:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      |      ^
# 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 133 ms 664 KB Output is correct
8 Correct 93 ms 620 KB Output is correct
9 Correct 136 ms 748 KB Output is correct
10 Correct 94 ms 492 KB Output is correct