prompt string | response string |
|---|---|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n=int(input())
nn=n
k=n
li=list()
li1=list()
while nn>0:
x,y=map(int,input().split())
li.append([x,y])
nn-=1
while n>0:
a, b = map(int, input().split())
li1.append([a, b])
n-=1
di=dict()
for i in range(k):
for j in range(k):
s1=li[i][0]+li1[j][0]
s2=li[i][1]+li1[j][1]
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
x = 0
y = 0
for _ in range(2 * n):
dx, dy = list(map(int, input().split()))
x += dx
y += dy
print(x // n, y // n) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | from collections import defaultdict as dc
n=int(input())
xy=[]
a=[]
k=dc(int)
for i in range(n):
x,y=[int(i) for i in input().split()]
xy.append((x,y))
for i in range(n):
x,y=[int(i) for i in input().split()]
a.append((x,y))
if n==1:
print(xy[i][0]+a[0][0],xy[i][1]+a[0][1])
else:... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... |
import java.io.*;
import java.util.*;
public class Main {
public static StringTokenizer ST;
public static BufferedReader BR;
public static PrintWriter PW;
public static String next() {
while(ST == null || !ST.hasMoreTokens()) {
try {
ST = new StringTokenizer(BR.readLine());
} catch (Exception e) {... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
template <class T, class U>
inline void add_self(T &a, U b) {
a += b;
if (a >= mod) a -= mod;
if (a < 0) a += mod;
}
template <class T, class U>
inline void min_self(T &x, U y) {
if (y < x) x = y;
}
template <class T, class U>
inline void ma... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | xs =0
ys = 0
t = int(input())
for test in range(t*2):
x, y = list(map(int, input().split()))
xs += x
ys += y
solx = int(xs/t)
soly = int(ys/t)
print(solx, soly) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | //New year and the treasure geolocation
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.Arrays;
import java.util.Comparator;
public class NewYearAndTheTreasureGeolocation
{
public static void main(String args[]) throws IOEx... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = input()
pos = [0 for i in xrange(n)]
for i in xrange(n):
pos[i] = map(int, raw_input().strip().split())
ab = [0 for i in xrange(n)]
for i in xrange(n):
ab[i] = map(int, raw_input().strip().split())
pos.sort()
ab.sort(reverse = True)
x = pos[0][0] + ab[0][0]
y = pos[0][1] + ab[0][1]
print x, y
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
pts, hints = [], []
for i in range(n):
pts.append([int(x) for x in input().split()])
for i in range(n):
hints.append([int(c) for c in input().split()])
if n == 1:
print(hints[0][0] + pts[0][0], hints[0][1] + pts[0][1])
else:
a = [set() for j in range(n)]
c = 0
for i in pts:
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
typedef struct c {
int x, y;
};
typedef struct o {
int x, y;
};
c clue[1005];
o obe[1005];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> obe[i].x >> obe[i].y;
}
for (int i = 0; i < n; i++) {
cin >> clue[i].x >> clue[i].y;
}
for... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
int n;
cin >> n;
vector<pair<int, int> > xy(n), ab(n);
for (int i = 0; i < n; i++) {
cin >> xy[i].first >> xy[i].second;
}
for (int i = 0; i < n; i++) {
cin >> ab[i].first >> ab[i].second;
}
map<pair<int, ... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | from collections import defaultdict
n = int(input())
obelisks = []
clues = []
for i in range(n):
obelisks.append(list(map(int, input().split())))
for i in range(n):
clues.append(list(map(int, input().split())))
possible = defaultdict(int)
for x, y in obelisks:
for a, b in clues:
tx, ty = x +... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n=int(input())
s1,s2=0,0
for i in range(2*n):
x,y=map(int,input().split())
s1+=x
s2+=y
print(int(s1/n),int(s2/n)) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n;
long int a = 0, b = 0, x, y, t, tt;
m = n * 2;
vector<long int> ar;
vector<long int> br;
vector<long int> arr;
vector<long int> brr;
for (int i = 0; i < m; i++) {
cin >> x >> y;
if (i < n) {
ar.push_back(x);
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
struct Node {
vector<int> adj;
};
void dfs(vector<int>& a) {}
int main() {
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
vector<pair<int, int> > a(n);
vector<pair<int, int> > b(n);
for (int i = 0; i < n; i++) cin >> a[i].first... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> a(n), b(n);
for (int i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
for (int i = 0; i < n; i++) cin >> b[i].first >> b[i].second;
multiset<pair<int, int>> s1;
for (int i = 0; i < n; i++) {
s1.inser... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.io.*;
import java.util.*;
public class B {
public static void main(String[] args) throws FileNotFoundException {
int toFile = 0;
InputStream inputStream;
OutputStream outputStream;
if (toFile == 0) {
inputStream = System.in;
outputStream = System.out;
} else {
inputStream = new FileInpu... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.util.*;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.OutputStream;
public class prbl2 {
public static void main(St... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(raw_input())
lis = []
for i in xrange(n):
x,y = map(int, raw_input().split())
lis.append([x,y])
lis = sorted(lis)
lol = []
for i in xrange(n):
a,b = map(int, raw_input().split())
lol.append([a,b])
lol = sorted(lol)
lol = lol[::-1]
print lis[0][0] + lol[0][0], lis[0][1] + lol[0][1] |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | def main():
n = int(raw_input())
a = [map(int, raw_input().split()) for _ in xrange(n)]
b = [tuple(map(int, raw_input().split())) for _ in xrange(n)]
q = set(b)
for i in xrange(n):
tx, ty = a[i][0] + b[0][0], a[i][1] + b[0][1]
s = [(b[0][0], b[0][1])] + [(tx - a[j][0], ty - a[j][1]) ... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import math
n = int(input())
ml1 = -math.inf
ml2 = -math.inf
sl1 = math.inf
sl2 = math.inf
for each in range(n):
x = input().split()
x[0], x[1] = int(x[0]), int(x[1])
if x[0] >= ml1:
ml1 = x[0]
if x[1] >= ml2:
ml2 = x[1]
for each in range(n):
x = input().split()
x[0], x[1] = int... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
l1 = []
for i in range(n):
l1.append([int(j) for j in input().split()])
l2 = []
for i in range(n):
l2.append([int(j) for j in input().split()])
l1.sort()
l2.sort()
x = l1[0][0] + l2[-1][0]
y = l1[0][1] + l2[-1][1]
print(x,y) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import sys
n = int(sys.stdin.readline().strip())
x = []
y = []
a = []
b = []
for i in range (0, n):
line = sys.stdin.readline().strip().split()
x.append(int(line[0]))
y.append(int(line[1]))
for i in range (0, n):
line = sys.stdin.readline().strip().split()
a.append(int(line[0]))
b.append(int(... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
/**
* @author Don Li
*/
public class NewYearAndTheTreasureGeolocation {
void solve() {
int n = in.nextInt();
int[] x = new int[n], y = new int[n];
f... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n=input()
x=[]
for _ in range(n):
x.append(map(int,raw_input().split()))
a=[]
for _ in range(n):
a.append(map(int,raw_input().split()))
x.sort()
a.sort()
print x[0][0]+a[-1][0],x[0][1]+a[-1][1] |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<long long, long long> > v1, v2;
for (int i = 0; i < n; ++i) {
long long a, b;
cin >> a >> b;
v1.push_back({a, b});
}
for (int i = 0; i < n; ++i) {
long long a, b;
cin >> a >> b;
v2.push_back({a, b... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
// Scanner sc= new Scanner(System.in);
PrintWriter out ... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... |
import java.util.Arrays;
import java.util.Scanner;
/**
* Created by makarfi on 12/30/18.
**/
public class B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
ObselikPoint[] obselikPoints = new ObselikPoint[N];
CluePoint[] clue... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
const int MAX = 200005;
const int MOD = 998244353;
int main() {
int i = 0, y = 0, j = 0, k = 0, l = 0, n, sum = 0, mini = 99999999, maxi = 0,
c = 1;
cin >> n;
map<int, int> px, dx, py, dy;
vector<pair<int, int> > ans;
for (int i = 0; i < n; i++) {
cin >>... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long i, n, j, k, f, c, y, z;
cin >> n;
vector<pair<long long, long long>> p;
vector<pair<long long, long long>> q;
vector<pair<long long, long long>> x;
long long r[2];
for (i = 0; i < n; i++) {
cin >> y >> z;
p.push_back({y, z});
}... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
c = []
for _ in range(n):
c.append(tuple(map(int, input().split())))
p = []
for _ in range(n):
p.append(tuple(map(int, input().split())))
print(max(c, key=lambda t: t[0])[0] + min(p, key=lambda t: t[0])[0],
max(c, key=lambda t: t[1])[1] + min(p, key=lambda t: t[1])[1])
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import math
n = int(input())
X = [0] * n
Y = [0] * n
A = [0] * n
B = [0] * n
s = 0
k = 0
for i in range(n):
X[i], Y[i] = map(int, input().split())
s += X[i]
k += Y[i]
for i in range(n):
A[i], B[i] = map(int, input().split())
s += A[i]
k += B[i]
s /= n
k /= n
print(math.trunc(s), math.trunc(k))
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import sys
range = xrange
input = raw_input
# Will extremly quickly convert s into a list of integers.
# The format of the string is required to be integers (positive or negative)
# separated with a single character with ascii value <'-', so like a whitespace.
# It also handles the string ending with an additional cha... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.io.*;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import java.util.StringTokenizer;
public class geolocation {
static class coordinate {
int x;
int y;
public coordinate(int x, int y) {
this.x = x;
this.y = y;
}
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.awt.*;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.util.Random;
import java.util.StringTokenizer;
public class Main {
String fileName = "";
int[][] steps = {{0,1}, {1, 0}};
int INF = Integer.MAX_VALUE / 10 - 123123;
///////... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n=int(input())
a,b=[],[]
for i in range(n):
a.append(list(map(int,input().split())))
for i in range(n):
b.append(list(map(int,input().split())))
a.sort()
b.sort()
b.reverse()
print(a[0][0]+b[0][0],a[0][1]+b[0][1]) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | x_coor=0;
y_coor=0;
n=input();
i=0;
while i<2*n:
i+=1;
test=raw_input().split();
x_coor+=int(test[0]);
y_coor+=int(test[1]);
res=str(x_coor/n)+' '+str(y_coor/n);
print(res); |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.util.Set;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileNotFoundException;
import java.util.HashSet;
import java.util.StringTokeniz... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
long long int n, x, y, sum1, sum2;
cin >> n;
sum1 = 0;
sum2 = 0;
vector<pair<long long int, long long int>> pa;
for (int i = 0; i < (2 * n); i++) {
cin >> x >> y;
pa.push_back(... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
x = []
y = []
a = []
b = []
for _ in range(n):
xi, yi = [int(item) for item in input().split()]
x.append(xi)
y.append(yi)
for _ in range(n):
ai, bi = [int(item) for item in input().split()]
a.append(ai)
b.append(bi)
Xl = [set() for _ in range(n)]
Yl = [set() for _ in range(n)]... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
int n;
scanf("%d", &n);
int x, y;
long long int sumx = 0, sumy = 0;
for (int i = 0; i < 2 * n; ++i) {
scanf("%d%d", &x, &y);
sumx += x;
sumy += y;
}
int ansx = sumx / n;
int ansy = sumy / n;
printf("%d %d", ansx, ansy);
re... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int n;
int x[1005], y[1005];
int a[1005], b[1005];
map<pair<int, int>, int> mp;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i) {
scanf("%d %d", x + i, y + i);
mp[{x[i], y[i]}] = 1;
}
for (int i = 1; i <= n; ++i) {
scanf("%d %d", a + i, b + i)... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> ob(n), clue(n);
for (int i = 0; i < n; i++) {
cin >> ob[i].first >> ob[i].second;
}
for (int i = 0; i < n; i++) {
cin >> clue[i].first >> clue[i].second;
}
sort(ob.begin(), ob.end());
sort(clue.b... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... |
n=int(input())
sum_x=0
sum_y=0
arr=[]
for x in range(0,2*n):
arr=input().split()
sum_x+=int(arr[0])
sum_y+=int(arr[1])
print(int(sum_x/n),' ',int(sum_y/n)) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
struct node {
int x, y;
} p1[1100], p2[1100];
int main() {
int n;
cin >> n;
long long sumx = 0, sumy = 0;
for (int i = 1; i <= n; i++) {
int x, y;
cin >> x >> y;
sumx += x;
sumy += y;
}
for (int i = 1; i <= n; i++) {
int x, y;
cin >> x ... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long xx = 0, yy = 0;
for (int i = 0; i < 2 * n; i++) {
int x, y;
cin >> x >> y;
xx += x;
yy += y;
}
cout << xx / n << " " << yy / n;
return 0;
}
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... |
import java.awt.Point;
import java.io.*;
import java.util.*;
public class B
{
static StringBuilder st = new StringBuilder() ;
public static void main(String[] args) throws Exception
{
Scanner sc = new Scanner();
PrintWriter out = new PrintWriter(System.out);
int n = sc.nextInt() ;
Point [] p = n... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
/* abhi2601 */
public class Q1 implements Runnable{
final static long mod = (long)1e9 + 7;
public void run() {
InputReader sc = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
long... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | def r(a, b):
ans = a // b
if a % b != 0:
ans += 1
return ans
n = int(input())
x, y = 0, 0
for i in range(2 * n):
xx, yy = map(int, input().split())
x += xx
y += yy
print(x // n, y // n)
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | string = input()
N = int(string)
coords = []
hints = []
for i in range(0, N):
string = input()
coord = tuple(string.split(' '))
coords.append((int(coord[0]), int(coord[1])))
for i in range(0, N):
string = input()
hint = tuple(string.split(' '))
hints.append((int(hint[0]), int(hint[1])))
(x, y) =... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | def get_coords(a, v):
coords = {}
for i in range(len(a)):
for j in range(len(v)):
crd = (a[i][0] + v[j][0], a[i][1] + v[j][1])
if crd not in coords:
coords[crd] = 1
else:
coords[crd] += 1
if coords[crd] == len(a):
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import sys
import itertools
amount = int(input())
obeliscs = []
vecs = set()
for i in range(amount):
obeliscs.append([int(s) for s in input().split()])
for i in range(amount):
vecs.add(tuple([int(s) for s in input().split()]))
#print(vecs)
for item in vecs:
point = [obeliscs[0][0] + item[0], ob... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int n;
pair<int, int> A[300300];
pair<int, int> B[300300];
int OK(int x, int y) {
multiset<pair<int, int> > have;
for (int i = 0; i < n; i++) have.insert(make_pair(B[i].first, B[i].second));
for (int i = 0; i < n; i++) {
int needX = x - A[i].first, needY = y - A[i... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
summ_x = 0
summ_y = 0
for i in range(2 * n):
a, b = map(int, input().split())
summ_x += a
summ_y += b
print(summ_x // n, summ_y // n) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.util.*;
public class twod{
public static void main(String s[]){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
ArrayList<Integer> pehlai = new ArrayList<Integer>();
ArrayList<Integer> pehlaj = new ArrayList<Integer>();
for(int i=0;i<(2*n);i++)
{
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n=int(input())
a=[]
b=[]
for _ in range(n):
a.append(list(map(int,input().split())))
for _ in range(n):
b.append(list(map(int,input().split())))
a.sort(reverse=True)
b.sort()
print(a[0][0]+b[0][0],a[0][1]+b[0][1]) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int( input() )
p = []
for i in range(n):
x, y = list( map( int, input().split() ) )
p.append( (x,y) )
c = []
for i in range(n):
x, y = list( map( int, input().split() ) )
c.append( (x,y) )
T = {}
for i in p:
for j in c:
x, y = i[0]+j[0], i[1]+j[1]
if (x,y) not in T:
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import sys
n=int(raw_input())
l=[]
for _ in xrange(n):
l.append(tuple(map(int,raw_input().split())))
a=[]
for _ in xrange(n):
a.append(list(map(int,raw_input().split())))
# hm={}
# found=False
# for i in xrange(n):
# if found==True:
# break
# for j in xrange(n):
# t=(l[j][0]+a[i][0],l[j][1]+a[i][1])
# if t ... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
x = 0;
char c = getchar();
int f = 1;
while (!isdigit(c)) {
if (c == '-') f = -1;
c = getchar();
}
while (isdigit(c)) {
x = x * 10 + c - '0';
c = getchar();
}
x *= f;
}
inline unsigned int R() {
static unsigned in... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.io.*;
import java.util.HashSet;
public class icpc{
public static void main(String[] args)throws IOException {
FastReader in=new FastReader(System.in);
StringBuilder sb=new StringBuilder();
//int n=in.nextInt();
int i,j,a,b,x,y,f;
int n;
n=in.nextInt();
//int arr[][]=new int[20000... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long tx = 0, ty = 0;
for (int i = 0; i < n; ++i) {
int x, y;
cin >> x >> y;
tx += x;
ty += y;
}
for (int i = 0; i < n; ++i) {
int x, y;
cin >> x >> y;
tx += x;
ty += y;
}
tx /= n;
ty /= n;
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
pair<int, int> t1[1005];
pair<int, int> t2[1005];
string s;
vector<pair<int, int> > v[32000];
int n, m, k;
int main() {
cin >> n;
for (int i = 0; i < n; i++) cin >> t1[i].first >> t1[i].second;
for (int i = 0; i < n; i++) cin >> t2[i].first >> t2[i].second;
sort(t1,... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n=int(input())
corx=0
cory=0
for i in range(2*n):
x,y=input().split()
x=int(x)
y=int(y)
corx=corx+x
cory=cory+y
print(f"{corx//n} {cory//n}")
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSe... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
vector<pair<long long int, long long int>> v, vv;
int main() {
long long int n, x, xx = 0, yy = 0, i, j, y, a, aa = 0, bb = 0, b;
cin >> n;
for (i = 0; i < n; i++) {
cin >> x >> y;
v.push_back(make_pair(x, y));
xx += x;
yy += y;
}
for (i = 0; i < n... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.util.*;
import java.io.*;
public class TreasureFounder
{
public static void main(String args[])throws IOException
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
//for obelisks
long min = 1000001,y_obelisk=0,max=-2000001,y_clue=0,xi=0,yi=0;
for(in... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
long long modpow(long long base, long long exp, long long modulus) {
base %= modulus;
long long result = 1;
while (exp > 0) {
if (exp & 1) result = (result * base) % modulus;
base = (base * base) % modulus;
exp >>= 1;
}
return result;
}
int main() {
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | # DON'T USE PYTHON FOR RECURSION
# TRY PYPY
import math
import sys
from sys import stdin, stdout
# stdin = open('.in')
n = int(stdin.readline())
xs = ys = 0
for _ in range(n * 2):
[x, y] = map(int, stdin.readline().strip().split(' '))
xs += x
ys += y
print xs / n, ys / n
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long myXOR(long long x, long long y) {
long long res = 0;
for (long long i = 31; i >= 0; i--) {
bool b1 = x & (1 << i);
bool b2 = y & (1 << i);
bool xoredBit = (b1 & b2) ? 0 : (b1 | b2);
res <<= 1;
res |= xoredBit;
}
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class GoodBye1091B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// List<Integer> lis1 = new ArrayList<>();
// List<Integer> lis2 = new ArrayList<>();
int n = sc.nextI... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.util.Scanner;
public class testing{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long sx = 0;
long sy = 0;
for(int i = 0; i < n; ++i) {
sx += sc.nextInt();
sy += sc.nextInt();
}
for(int i = 0; i < n; ++i) {
sx += sc.... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long n, x, y;
cin >> n;
vector<pair<long long, long long>> a, b;
for (long long i = 0; i < n; i++) {
cin >> x >> y;
a.push_back(make_pair(x, y));
}
for (long long i = 0; i < n; i+... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | a=int(raw_input())
dic={}
for i in xrange(a):
x,y=map(int,raw_input().split())
dic[(x,y)]=True
j1=x
k=y
l=[]
for i in xrange(a):
x,y=map(int,raw_input().split())
l.append((x,y))
for i in l:
u=i[0]
t=i[1]
r1=u+j1
r2=t+k
cont=0
for j in l:
if (r1-j[0],r2-j[1]) in dic:
cont+=1
if cont==a:
print... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const double eps = 1e6 - 9;
const long long mod = 1e9 + 7;
const long long llinf = (1ll << 60);
const long long inf = (1ll << 60);
int main() {
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(15);
long long n;
cin >> n... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... |
import java.util.Iterator;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
Point2D[] clues = new Point2D[n];
Point2D[] ob = new Point2... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
minx = 1e9
miny = 1e9
for i in range(n):
x, y = map(int, input().split())
minx = min(minx, x)
miny = min(miny, y)
maxx = -1e9
maxy = -1e9
for i in range(n):
x, y = map(int, input().split())
maxx = max(maxx, x)
maxy = max(maxy, y)
print(minx + maxx, miny + maxy) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
int main() {
ios::sync_with_stdio(0);
cin.tie(nullptr);
cout.tie(nullptr);
int n;
cin >> n;
ll sumX = 0, sumY = 0, tempX, tempY;
for (int i = 0; i < 2 * n; ++i) {
cin >> tempX >> tempY;
sumX += tempX;
s... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
long long n, A = 0, B = 0;
cin >> n;
for (long long i = 0; i < n * 2; i++) {
long long a, b;
cin >> a >> b;
A += a;
B += b;
}
cout << A / n << " " << B / n;
return 0;
}
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | t=int(input())
a=[]
b=[]
for i in range(2*t):
x,y=map(int,input().split())
a.append(x)
b.append(y)
print(sum(a)//t,sum(b)//t)
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... |
import java.util.*;
import java.io.*;
public class GoodBye2 {
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(bf.readLine());
long xsum = 0;
long ysum = 0;
for(i... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int a[1005], b[1005], c[1005], d[1005];
map<pair<int, int>, int> mp;
int n;
void init() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i) {
scanf("%d%d", a + i, b + i);
}
for (int i = 1; i <= n; ++i) {
scanf("%d%d", c + i, d + i);
}
for (int i = 1; i <= n;... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
int n;
cin >> n;
vector<int> x(n), y(n), a(n), b(n);
for (int i = 0; i < n; ++i) cin >> x[i] >> y[i];
map<pair<int, int>, int> cnt;
for (int i = 0; i < n; ++i) {
cin >> a[i] >> b[i];
for (int j = 0; j < n; ++j)... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n=int(input())
o=[]
mat=[None]*n
for i in range(n):
o.append(list(map(int,input().split())))
a=[]
for i in range(n):
mat[i]=[None]*n
a.append(list(map(int,input().split())))
dct={}
mx=0
ans=[None]
for i in range(n):
for j in range(n):
mat[i][j]=[o[i][0]+a[j][0] , o[i][1]+a[j][1]]
x=str(m... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
struct node {
int x;
int y;
} a[1005], mov[1005];
bool cmp(const node &a, const node &b) {
if (a.x != b.x)
return a.x < b.x;
else
return a.y < b.y;
}
bool cmp2(const node &a, const node &b) {
if (a.x != b.x)
return a.x > b.x;
else
return a.y > b.... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | from sys import stdin
n=int(stdin.readline().strip())
p=[]
c=[]
for i in range(n):
p.append(list(map(int,stdin.readline().strip().split())))
for i in range(n):
c.append(list(map(int,stdin.readline().strip().split())))
p.sort()
c.sort(reverse=True)
print(p[0][0]+c[0][0],p[0][1]+c[0][1])
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n=int(input())
x=y=0
for i in range(2*n):
a,b=map(int,input().split())
x+=a
y+=b
print(str(x//n) + ' '+ str(y//n)) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 101;
struct node {
int x, y;
bool operator<(const node &a) const { return x == a.x ? y < a.y : x < a.x; }
} c[N];
int n;
signed main() {
cin >> n;
for (int i = 1; i <= n * 2; i++) cin >> c[i].x >> c[i].y;
sort(c + 1, c + n * 2 + 1);
cout << c... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
x = y = 0
for _ in range(2*n):
a, b = map(int, input().split())
x += a
y += b
print(x//n, y//n) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
long long int n, k, p, a, b, minIn = 0, min = 1000000;
cin >> n;
vector<pair<long long, long long>> z, y;
for (int i = 0; i < n; i++) {
cin >> k >> p;
z.push_back(make_pair(k, p));
}
sort(z.begin(), z.end());
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> a(n), b(n);
for (int i = 0; i < n; i++) {
int x, y;
cin >> a[i].first >> a[i].second;
}
map<pair<int, int>, int> t;
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
for (int j = 0; ... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.io.*;
import java.sql.SQLOutput;
import java.util.*;
public class Main {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new
InputStreamReader(System.in));
}
String n... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input().strip())
x, y = 0, 0
for i in range(n):
xi, yi = map(int, input().strip().split())
x += xi
y += yi
for i in range(n):
xi, yi = map(int, input().strip().split())
x += xi
y += yi
print(x//n, y//n) |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int minx = 1e9, miny = 1e9, maxx = -1e9, maxy = -1e9, n;
int main() {
cin >> n;
for (int i = 1; i <= n; i++) {
int a, b;
scanf("%d%d", &a, &b);
if (a < minx || (a == minx && b < miny)) {
minx = a;
miny = b;
}
}
for (int i = 1; i <= n; i++... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
a = 0
b = 0
for i in range(2*n):
x , y =[int(i) for i in input().split()]
a += x
b += y
print(int(a/n),int(b/n))
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class C1230201802 {
private static class Pair {
int x, y;
... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | #include <bits/stdc++.h>
using namespace std;
int n;
struct node {
int x;
int y;
node(){};
node(int xx, int yy) {
x = xx;
y = yy;
}
bool operator<(const node &b) const { return x > b.x; }
} p[1009], q[1009];
map<pair<int, int>, int> s;
int main() {
ios::sync_with_stdio(false);
cin >> n;
for (i... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = int(input())
a = 0
b = 0
suma = 0
sumb = 0
for i in range(0,2*n):
a,b = input().split()
a = int(a)
b = int(b)
suma += a
sumb += b
print(suma//n,sumb//n)
|
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | n = input()
l = [];m = []
for i in range(n):
l.append(map(int,raw_input().split()))
for i in range(n):
m.append(map(int,raw_input().split()))
d = {}
for i in range(n):
a,b = l[i]
for x in m:
p,q = x
if (a+p,b+q) in d:
d[(a+p,b+q)] +=1
else:
d[(a+p,b+q)] =... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... |
# MasterKali
from sys import stdin
from collections import Counter
from math import sqrt, factorial, log10, log, floor, ceil
from itertools import permutations, combinations, combinations_with_replacement
input = stdin.readline
def li(): return list(map(int, input().split()))
def lis(): return list(map(str, input().... |
Problem: Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point T, which coordinates to be found out.
Bob travelled around the world and collected clues of the treasure location at n obelisks. These clues were in an ancient language, and he has only decrypted th... | def _mp():
return map(int,raw_input().split())
n=input()
x=0
y=0
for i in range(2*n):
a,b=_mp()
x+=a
y+=b
print x/n,y/n |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.