-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathneps3263.cpp
More file actions
41 lines (33 loc) · 752 Bytes
/
Copy pathneps3263.cpp
File metadata and controls
41 lines (33 loc) · 752 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
40
41
/*
* Contest : OBI 2025 - Fase 2
* Problem : Placar do Jogo
* Link : https://neps.academy/br/exercise/3263
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fastio ios::sync_with_stdio(0); cin.tie(0);
int main() {
fastio
int p, c, x;
vector<pair<int, int>> gols; cin >> p;
for (int i = 0; i < p; ++i) {
cin >> x;
gols.push_back({x, 0});
}
cin >> c;
for (int i = 0; i < c; ++i) {
cin >> x;
gols.push_back({x, 1});
}
sort(gols.begin(), gols.end());
cout << "0 0\n";
pair<int, int> res = {0, 0};
for (int i = 0; i < gols.size(); ++i) {
if (gols[i].second) res.second++;
else
res.first++;
cout << res.first << ' ' << res.second << '\n';
}
return 0;
}