# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
521437 | Rasoul006 | Košnja (COCI17_kosnja) | C++17 | 13 ms | 1212 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>
#define endl "\n"
typedef long long ll;
using namespace std;
const int N = 1e6+5;
ll t , n , m ;
int main()
{
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin >> t ;
while(t--){
cin >> n >> m ;
ll ans = 0;
if(n <= m){
ans = 2 * (n - 1) ;
}
else{
ans = 2 * (m - 1) ;
}
cout << ans << endl;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |