# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1025793 |
2024-07-17T10:11:25 Z |
vjudge1 |
Košnja (COCI17_kosnja) |
C++17 |
|
67 ms |
608 KB |
#include <bits/stdc++.h>
using namespace std;
void solve(){
int n, m;
cin >> n >> m;
if (min(n, m) % 2)
cout << 4 * (min(n, m) / 2) << endl;
else
cout << 4 * (min(n, m) / 2) - 2 << endl;
}
int main(){
int t;
cin >> t;
while (t--)
solve();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
43 ms |
468 KB |
Output is correct |
7 |
Correct |
66 ms |
608 KB |
Output is correct |
8 |
Correct |
46 ms |
592 KB |
Output is correct |
9 |
Correct |
67 ms |
592 KB |
Output is correct |
10 |
Correct |
60 ms |
592 KB |
Output is correct |