-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path1455C.cpp
More file actions
39 lines (26 loc) · 454 Bytes
/
1455C.cpp
File metadata and controls
39 lines (26 loc) · 454 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <bits/stdc++.h>
#define range(a,b,c) for(int a=b; a<c; a++)
#define MX 1e4+5
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<vi> vvi;
void solve() {
//
int x, v;
cin >> x >> v;
int df = 0;
if(v)
df = 1;
cout << max(0, x - df) << " " << v << "\n";
}
int main() {
//
ios_base::sync_with_stdio(false);
int T;
cin >> T;
while(T--)
solve();
return 0;
}