/// isA AC
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void ACPLS(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
#define tc int tttttt;cin>>tttttt;while(tttttt--)
#define sumrange(l,r,arr) (l==0?arr[r]:arr[r]-arr[l-1])
int main(){
ACPLS();
tc{
int n,m;
cin>>n>>m;
cout<<2*min(n,m)-2<<'\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
9 ms |
460 KB |
Output is correct |
7 |
Correct |
14 ms |
588 KB |
Output is correct |
8 |
Correct |
10 ms |
460 KB |
Output is correct |
9 |
Correct |
15 ms |
536 KB |
Output is correct |
10 |
Correct |
10 ms |
516 KB |
Output is correct |