Skip to content

Commit a8580b8

Browse files
committed
[codeforces - 1047] Add C++ solution for B - Cover Points
1 parent 9443d01 commit a8580b8

File tree

6 files changed

+28
-1
lines changed

6 files changed

+28
-1
lines changed

codeforces/1047/b-1.ans

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3

codeforces/1047/b-1.in

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
3
2+
1 1
3+
1 2
4+
2 1

codeforces/1047/b-2.ans

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4

codeforces/1047/b-2.in

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
4
2+
1 1
3+
1 2
4+
2 1
5+
2 2

codeforces/1047/b.cc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// https://codeforces.com/contest/1047/problem/B
2+
#include <bits/stdc++.h>
3+
4+
using namespace std;
5+
6+
typedef long long ll;
7+
8+
int main() {
9+
ll n,x,y,m=0;
10+
cin >> n;
11+
for (int i = 0; i < n; i++) {
12+
cin >> x >> y;
13+
m = max(m, x+y);
14+
}
15+
cout << m << endl;
16+
}

codeforces/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ There are solutions for the following [codeforces](http://codeforces.com/) conte
2323
- [Codeforces Round #518 (Div. 2)](1068) ([contest site](https://codeforces.com/contest/1068)):
2424
[A](1068/a.py), [B](1068/b.cc), [C](1068/c.cc), D, E, [F](1068/f.cc)
2525
- [Codeforces Round #511 (Div. 2)](1047) ([contest site](https://codeforces.com/contest/1047)):
26-
[A](1047/a.py), B, C, D, E
26+
[A](1047/a.py), [B](1047/b.cc), C, D, E
2727
- [Codeforces Round #510 (Div. 2)](1042) ([contest site](https://codeforces.com/contest/1042)):
2828
[A](1042/a.cc), [B](1042/b.cc), [C](1042/c.cc), D, E, F
2929
- [Codeforces Round #508 (Div. 2)](1038) ([contest site](https://codeforces.com/contest/1038)):

0 commit comments

Comments
 (0)