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())
sumX, sumY = 0, 0
for i in range(0, 2 * n):
a, b = map(int, input().split())
sumX += a
sumY += b
print("%d %d" % (sumX / n, sumY / 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())
#xi,yi--------
xs = []
ys = []
for _ in range(n):
xiyi = list(map(int,input().rstrip().split()))
xi = xiyi[0]
yi = xiyi[1]
xs.append(xi)
ys.append(yi)
#aibi----------
As = []
Bs = []
for _ in range(n):
aibi = list(map(int,input().rstrip().split()))
ai = aibi[0]
bi = ... |
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.*;
import java.math.*;
import java.awt.Point;
public class Main {
//static final long MOD = 998244353L;
//static final long INF = -1000000000000000007L;
static final long MOD = 1000000007L;
//static final int INF = 1000000007;
public static void main(String[] args) {
FastSc... |
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 Counter
def read():
return int(input())
def readlist():
return list(map(int, input().split()))
def readmap():
return map(int, input().split())
n = read()
X = []
Y = []
for _ in range(n):
x, y = readmap()
X.append(x)
Y.append(y)
A = []
B = []
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>
using namespace ::std;
const int INF = int(1e9);
const long long INF64 = (long long)(1e18);
int main() {
long long n;
cin >> n;
long long finX = 0, finY = 0;
for (int i = 0; i < n * 2; i++) {
long long x, y;
cin >> x >> y;
finX += x;
finY += y;
}
cout << finX / 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.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Scanner s=new Scanner(System.in);
int n=s.nextInt();
HashM... |
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.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class ProblemB {
public static Scanner sc;
public static void main(String[] args) throws FileNotFoundException {
sc = new Scanner(System.in);
// sc = new Scanner(new File("input-b.txt"));
new Pr... |
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 {
private void solve() throws Exception {
int n = nextInt();
long x = 0L;
long y = 0L;
for(int i = 0; i < n; i++) {
x += nextLong();
y += nextLong();
}
for(int i = 0; i < n; i++) {
x += nextLong();
y += nextLong();
}
out.println(x/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... | t = int(input())*2;x=0;y=0;n=t//2
while t > 0 :
t -= 1
a,b=input().split()
x+=int(a)
y+=int(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... | n = int(input())
r_1 = 0
r_2 = 0
for i in range(2*n):
x, y = map(int, input().split())
r_1 += x
r_2 += y
print(r_1//n, r_2//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;
bool compareInterval(pair<long long int, long long int> a,
pair<long long int, long long int> b) {
if (a.first == b.first) {
return a.second > b.second;
}
return (a.first > b.first);
}
bool compareInterval1(pair<long long int, long long int> 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 java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;
public class temp4 {
static class FastReader
{
BufferedReader br;
StringTokenizer 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... | #include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
namespace fast {
inline int read() {
int num = 0, w = 1;
char c = 0;
while (c != '-' && !isdigit(c)) c = getchar();
if (c == '-') w = -1, c = getchar();
while (isdigit(c)) num = num * 10 + c - '0', c = getchar();
return num * w;
}... |
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.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.*;
import java.math.*;
import java.io.*;
import java.text.*;
public class hacker
{
// YO fUCK PUSSY MAN
// Believe yourself you gonna get it
// Oh!love, oh mine ,gonna fuck you
public stati... |
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 itertools
n = input()
n = int(n)
xs = []
ys = []
xsp = []
ysp = []
for i in range(n):
x,y = input().split()
x = int(x)
y = int(y)
xs.append(x)
ys.append(y)
for i in range(n):
x,y = input().split()
x = int(x)
y = int(y)
xsp.append(x)
ysp.append(y)
x = (sum(xs)+sum... |
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())
ch = [0,0]
ko = []
if n == 1:
a, b = list(map(int, input().split()))
c, d = list(map(int, input().split()))
print(a + c, b + d)
exit()
x, y = list(map(int, input().split()))
for i in range(n - 1):
a, b = list(map(int, input().split()))
ch[0] += a
ch[1] += b
for i 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>
using namespace std;
const int maxn = 1010;
struct node {
int x, y;
} a[maxn], b[maxn];
int n;
int cmp(const void *a, const void *b) {
if ((*(node *)a).x != (*(node *)b).x)
return (*(node *)a).x - (*(node *)b).x;
else
return (*(node *)a).y - (*(node *)b).y;
}
int main() {
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... | # -*- coding: utf-8 -*-
"""
@author: zzf
@file: main.py
@time: 2018/11/13
"""
n = int(input())
x = []
a = []
sx1 = 0
sx2 = 0
for i in range(n):
x1, y1 = map(int, input().split())
x.append((x1, y1))
sx1 += x1
sx2 += y1
sa1 = 0
sa2 = 0
for i in range(n):
x1, y1 = map(int, input().split())
a.appen... |
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 Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int obeliskNum = scan.nextInt();
int[][] obelisks = new int[obeliskNum][2];
for(int i = 0; i<obeliskNum; i++){
obelisks[i][0] = scan.nextInt();
... |
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... | #include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> check;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
pair<int, int> oblisks[n];
pair<int, int> clues[n];
for (int i = 0; i < n; i++) cin >> oblisks[i].first >> oblisks[i].second;
for (int i = 0; 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, obe[1000][2], clue[1000][2];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> obe[i][0] >> obe[i][1];
}
for (int i = 0; i < n; i++) {
cin >> clue[i][0] >> clue[i][1];
}
int aux[2];
bool flag, res = true;
for (int 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... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
pair<int, int> a[N], b[N];
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++) scanf("%d%d", &a[i].first, &a[i].second);
for (int i = 1; i <= n; i++) scanf("%d%d", &b[i].first, &b[i].second);
sort(a + 1, a + n + 1);
sort(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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelp... |
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> toado[1002];
pair<int, int> vectorr[1002];
unsigned int n;
int main() {
long long t1, t;
cin >> n;
for (int i = 1; i <= n; i++) cin >> toado[i].first >> toado[i].second;
for (int i = 1; i <= n; i++) cin >> vectorr[i].first >> vectorr[i].second;
sort... |
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 Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long sumx = 0, sumy = 0;
for (int i = 0; i < 2*n; i++) {
sumx += sc.nextLong();
sumy += sc.nextLong();
}
System.out.println(sumx/n + " " + sumy/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 long long MOD = (long long)1e9 + 7;
const int inf = (int)1e9 + 7;
const double eps = 1e-7;
const double pi = 3.14159265359;
const int N = (int)1e3;
int n;
pair<int, int> a[N], b[N];
set<pair<int, int> > r;
signed main() {
cin >> n;
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;
bool comp(pair<int, int> a, pair<int, int> b) {
if (a.first == b.first)
return a.second < b.second;
else
return a.first < b.first;
}
int main() {
int N, a, b;
cin >> N;
int temp = N;
vector<pair<int, int> > xy;
vector<pair<int, int> > ab;
while (temp... |
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);
cin.tie(0);
map<pair<int, int>, int> M;
int n;
cin >> n;
vector<pair<int, int> > mov, pos;
for (int i = int(0); i < int(n); ++i) {
pair<int, int> lel;
cin >> lel.first >> lel.second;
pos.push_back(lel);
... |
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... | R = lambda :map(int, input().split())
n = int(input())
sa = 0
sb = 0
for _ in range(n + n):
a, b = R()
sa += a
sb += b
print(sa // n, sb // 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.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.Map;
/**
* @author thesparkboy
*
*/
public class A2 {
public static class Key {
private fi... |
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())
xs = []
ys = []
for i in range(n):
x, y = map(int, input().split())
xs.append(x)
ys.append(y)
a, b = map(int, input().split())
xs.append(a)
ys.append(b)
x = sum(xs)//n
y = sum(ys)//n
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... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
long long a, b, suma = 0, sumb = 0;
for (int i = 0; i < 2 * n; i++) {
cin >> a >> b;
suma += a;
sumb += b;
}
cout << suma / n << " " << sumb / 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... | n = int(input())
a = sorted([tuple(map(int,input().split())) for i in range(n)])
b = sorted([tuple(map(int,input().split())) for i in range(n)])
print(a[0][0] + b[-1][0], a[0][1] + b[-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... | n=int(input())
obes=[]
clue=[]
for i in range(n):
obes.append(list(map(int,input().split())))
for i in range(n):
clue.append(list(map(int,input().split())))
obes.sort()
clue.sort(reverse=True)
Tx,Ty=obes[0][0]+clue[0][0], obes[0][1]+clue[0][1]
print(Tx,Ty) |
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 x[1111], y[1111], a[1111], b[1111];
int N;
map<pair<int, int>, bool> ada;
bool coba(int X, int Y) {
for (int i = 0; i < N; i++) {
if (ada[make_pair(X - a[i], Y - b[i])] == 0) return 0;
}
cout << X << " " << Y << endl;
return 1;
}
void solve() {
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... | n = int(input())
sx=0
sy=0
for i in range(2*n):
x, y = map(int, input().split())
sx += x
sy += y
print(int(sx/n), int(sy/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 sys
for s in sys.stdin:
totx = 0
toty = 0
for i in range(0,int(s)*2):
x,y = input().split(" ")
x = int(x)
y = int(y)
totx += x
toty += y
totx= totx/int(s)
toty= toty/int(s)
print("%.0f %.0f"%(totx,toty))
|
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(input())
ob = []
p = []
for i in range(n):
a, b = map(int, input().split())
ob.append((a, b))
for i in range(n):
a, b = map(int, input().split())
p.append((a, b))
p.sort(); ob.sort()
print(p[0][0] + ob[-1][0], p[0][1] + ob[-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... | n=int(input())
x=[]
y=[]
for i in range(n):
x1,y1=[int(x) for x in input().split()]
x.append(x1)
y.append(y1)
for i in range(n):
x1,y1=[int(x) for x in input().split()]
x.append(x1)
y.append(y1)
print(sum(x)//n,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... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
long x=0;
long y=0;
long xx=0;
long yy=0;
for (int i = 0; i < 2*n; i++) {
x=sc.nextLong();
... |
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 ax[2000010], ay[2000010], bx[2000010], by[2000010];
int main() {
int n;
cin >> n;
for (int i = 0; i <= n - 1; i++) {
scanf("%d %d", &ax[i], &ay[i]);
}
for (int i = 0; i <= n - 1; i++) {
scanf("%d %d", &bx[i], &by[i]);
}
int tx, ty;
sort(ax, ax + ... |
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())
xy=[list(map(int,input().split())) for i in range(n)]
ab=[list(map(int,input().split())) for i in range(n)]
sol=[]
for i in range(n):
x={(xy[i][0]+ab[j][0],xy[i][1]+ab[j][1]) for j in range(n)}
sol.append(x)
ss=sol[0]
for j in ss:
ch=0
for i in sol:
if j in i:
ch+=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;
const int maxn = 1005;
pair<int, int> a[maxn][maxn];
pair<int, int> par1[maxn], par2[maxn];
map<pair<int, int>, int> mp;
int main(int argc, char const *argv[]) {
int n;
cin >> n;
for (int i = 0; i < n; ++i) {
scanf("%d%d", &par1[i].first, &par1[i].second);
}
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... | #include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-13;
const long double PI = acos(-1);
const int INF = (int)1e9;
const long long INFF = (long long)1e18;
const int mod = 998244353;
const int MXN = (int)1e6 + 7;
pair<int, int> a[MXN], b[MXN];
pair<int, int> st[MXN];
int ck[MXN];
map<pair<int, 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.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class yarab {
public static void main(String [] args) throws Exception
{Scanner x = new Scann... |
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())
x = []
xy = []
a = []
ab = []
for _ in xrange(n):
xi, yi = map(int, raw_input().split())
x.append(xi)
xy.append((xi, yi))
for _ in xrange(n):
ai, bi = map(int, raw_input().split())
a.append(ai)
ab.append((ai, bi))
minx = min(x)
maxa = max(a)
T_x = minx + maxa
yy = [yi for 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... | __author__ = 'Sudip'
n=int(input())
a=[[0,0] for i in range(n)]
b=[[0,0] for i in range(n)]
for i in range(n):
a[i]=list(map(int,input().split()))
for i in range(n):
b[i]=list(map(int,input().split()))
a.sort()
b.sort(reverse=True)
print(a[0][0]+b[0][0],end=' ')
print(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... | import java.awt.Point;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class B1091 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int[] X = new int[N];
int[] Y = new int[N];
int[] A = ne... |
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, a1, b1, a2, b2, t1, t2;
cin >> n;
cin >> a1 >> b1;
for (int i = 0; i < n - 1; i++) {
cin >> t1 >> t2;
if (t1 < a1) {
a1 = t1;
b1 = t2;
}
if (t1 == a1 && t2 < b1) {
a1 = t1;
b1 = t2;
}
}
cin >> a2 >>... |
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 = []
c = []
for i in range(n):
p.append(tuple(map(int, input().split())))
for i in range(n):
c.append(tuple(map(int, input().split())))
ts = [set() for i in range(n)]
for i in range(n):
for j in range(n):
ts[i].add((p[i][0]+c[j][0], p[i][1]+c[j][1]))
for i in range(n):
tx, 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;
int main() {
int n, i;
long long a, b;
long long mn1, mn2, mx1, mx2;
cin >> n;
cin >> a >> b;
mn1 = a;
mn2 = b;
for (i = 1; i < n; i++) {
cin >> a >> b;
mn1 = min(mn1, a);
mn2 = min(mn2, b);
}
cin >> a >> b;
mx1 = a;
mx2 = b;
for (i = 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=map(sum,zip(*(map(int,input().split())for _ in[0]*2*n)))
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... | n = int(input())
obs = []
clues = []
for i in range(n):
x, y = [int(i) for i in input().split()]
obs.append([x, y])
for i in range(n):
a, b = [int(i) for i in input().split()]
clues.append([a, b])
x = y = 0
for i in range(n):
x += obs[i][0] + clues[i][0]
y += obs[i][1] + clues[i][1]
print(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>
int a, b;
long long n, sum1, sum2;
int main() {
scanf("%lld", &n);
for (int i = 1; i <= n * 2; i++) {
scanf("%d%d", &a, &b);
sum1 += a;
sum2 += b;
}
printf("%lld %lld\n", sum1 / n, sum2 / 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... | #include <bits/stdc++.h>
using namespace std;
int n;
int x[1001], y[1001], a[1001], b[1001];
int dep(int p, int q, int ind) {
if (ind >= n) return 0;
for (int i = 0; i < n; i++) {
if (p == x[ind] + a[i] && q == y[ind] + b[i]) {
if (ind == n - 1 || dep(p, q, ind + 1) == 1) return 1;
}
}
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... | //package cf1;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class cf2 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner s=new Scanner(System.in);
int n=s.nextInt();
ArrayList<Integer> x=new ArrayList<Inte... |
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.0);
const double eps = 1e-6;
const int INF = 0x3f3f3f3f;
const int maxn = 100;
long long T, n, m;
int main() {
long long x, y, z;
while (cin >> n) {
x = 0;
y = 0;
for (int i = 0; i < 2 * n; i++) {
cin >> z;
x += 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... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 777;
const int M = INT_MAX;
int n;
pair<int, int> a[N], b[N];
int main() {
ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> a[i].first >> a[i].second;
}
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... | import java.util.*;
public class Bsol
{
public static void main(String args[])
{
Scanner in=new Scanner(System.in);
long x=0,y=0,i,a,b;
int n;
n=in.nextInt();
for(i=0;i<n;i++)
{
a=in.nextLong();
b=in.nextLong();
x+=a;
y+=b;
}
for(i=0;i<n;i++)
{
a=in.nextLong();
b=in.nextLong();
x+=a;
y+=b;
}
System.out.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... | n = int(input())
xy = [tuple(map(int, input().split())) for _ in range(n)]
ab = [tuple(map(int, input().split())) for _ in range(n)]
allX = 0
allY = 0
allA = 0
allB = 0
for x, y in xy:
allX += x
allY += y
for a, b in ab:
allA += a
allB += b
print((allX+allA)//n, (allY+allB)//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 + 5, nBits = 2e8 + 5, MM = (1 << 16), MAX = 1111,
OO = 0x3f3f3f3f, MOD = 1e9 + 7, inf = 1 << 30;
const long long INF = (long long)1e18;
long long fact(long long z) { return (z <= 1) ? 1 : z * fact(z - 1); }
int n, x, y, maxii, A[1001], B[1001];
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... | n = int(input())
pts = []
for X in range(n):
pt = [int(i) for i in input().split()]
pts.append(pt)
dirs = []
for X in range(n):
d = [int(i) for i in input().split()]
dirs.append(d)
dc = dict()
for i in range(n):
for j in range(n):
x, y = pts[i]
dx, dy = dirs[j]
if (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>
const int MAXN = 1010;
using std::make_pair;
using std::pair;
pair<int, int> a[MAXN], b[MAXN];
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; ++i) {
int u, v;
scanf("%d%d", &u, &v);
a[i].first = u;
a[i].second = v;
}
for (int i = 1; i <= n; ++i) {
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... | def check_others(os, pairs, x, y):
for o in os:
found = False
for i, p in enumerate(pairs):
if p is not None:
if o[0] + p[0] == x and o[1] + p[1] == y:
pairs[i] = None
found = True
break
if not found:
... |
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... | #treature at pt T
# n obselisks provide clues, in ancient language (can only be decripted at home)
#jth clue is 2 int (aj,bj) at (xi,yi), belonging to the pj O (p is perm of n)
#ith obelisk lives at cordinates (xi,yi)
#T = (xpj+aj,ypj+bj)
n= int(input())
tx=0
ty=0
for i in range(n):
x,y= map(int,input().split())... |
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())
xy = []
ab = []
for i in range(n):
xy.append(list(map(int, input().split())))
for i in range(n):
ab.append(list(map(int, input().split())))
xy.sort()
ab.sort()
print(xy[0][0]+ab[-1][0], xy[0][1]+ab[-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() {
vector<long long> vec;
vector<long long> so;
long long t;
cin >> t;
long long c = t * 2;
while (c--) {
long long a, b;
cin >> a >> b;
vec.push_back(a);
so.push_back(b);
}
long long po = 0, mo = 0;
for (int i = 0; i < vec.size()... |
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.Scanner;
public class Geolocation {
static class P {
int x, y;
public P(int x, int y) {
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public int getY() {
retur... |
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 B {
public static void main(String[]args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int[][]obelisks=new int[n][2];
for(int i=0;i<n;i++)
obelisks[i]=new int[]{sc.nextInt(),sc.nextInt()};
TreeSet<String>clues=new TreeSet<String>();
int[][]cluesArr=new int[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() {
long long n;
cin >> n;
long long ax = 0, ay = 0;
for (int i = 0; i < 2 * n; i++) {
long long x, y;
cin >> x >> y;
ax += x;
ay += y;
}
cout << (ax / n) << " " << (ay / n) << '\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())
R=lambda:sorted([*map(int,input().split())]for _ in[0]*n)
o,c=R(),R()
print(o[0][0]+c[-1][0],o[0][1]+c[-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... | n=int(input())
l=[]
p=[]
for i in range(n):
a,b=map(int,input().split())
l.append([a,b])
for i in range(n):
a,b=map(int,input().split())
p.append([a,b])
l.sort()
p.sort()
print((l[0][0]+p[-1][0]),(l[0][1]+p[-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 java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util... |
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 A{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int x[]=new int[n];
int y[]=new int[n];
int a[]=new int[n];
int b[]=new int[n];
for(int i=0;i<n;i++){
x[i]=sc.nextInt... |
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())))
d={}
for i in range(n):
for j in range(n):
k=a[i][0] + b[j][0]
l=a[i][1] + b[j][1]
d[(k,l)]=d.get((k,l),0)+1
for i in d:
if d[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 n;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> n;
long long sum_x = 0, sum_y = 0;
for (int i = 1; i <= (n << 1); ++i) {
long long x, y;
cin >> x >> y;
sum_x += x, sum_y += y;
}
sum_x /= (1LL * n), sum_y /= (1LL * n);
cout << ... |
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([int(i) for i in input().split()])
for i in range(n):
b.append([int(i) for i in input().split()])
u = set()
for i in range(n):
u.add((a[0][0]+b[i][0], a[0][1]+b[i][1]))
for j in range(n):
c = set()
for i in range(n):
c.add((a[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.util.Scanner;
public class Fmain {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc =new Scanner(System.in);
int n;
long sum1=0,sum2=0;
n=sc.nextInt();
for(int i=1;i<=2*n;i++) {
int x;
x=sc.nextInt();
sum1+=x;
x=sc.nextInt();
sum2+... |
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(input())
x,y=0,0
for i in range(2*n):
a,b=map(int,input().split())
x+=a
y+=b
print(x//n,y//n)
if __name__=="__main__":
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... | n = int(input())
obelisks = []
clues = []
"""for inp1 in range(n):
x1,y1=map(int, input().split())
obelisks.append([x1,y1])
for inp2 in range(n):
x2,y2=map(int, input().split())
clues.append([x2,y2])
if n == 1:
print(x1+x2, y1+y2)
else:
acceptablePoints = []
for z in range(0,n):
if ... |
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
input_name = 'b_input1.txt'
# f = open(input_name, 'r')
# sys.stdin = f
n = int(input())
pts = []
diff = []
for _ in range(n):
x, y = list(map(int, input().split()))
pts.append((x, y))
for _ in range(n):
x, y = list(map(int, input().split()))
diff.append((x, y))
# f.close()
pts = sort... |
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;
constexpr const int INT_INF = 0x3f3f3f3f;
constexpr const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
template <typename T>
bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <typename T>
bool chmax(T &a, T b) {
if (a < b) {
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... | n = int(input())
xs,ys = 0,0
clx, cly = 0,0
for i in range(n):
x,y = map(int, input().split())
xs+=x
ys+=y
for i in range(n):
x,y = map(int, input().split())
xs+=x
ys+=y
xs//=n
ys//=n
print(xs, ys)
|
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 n, x[2000], y[2000], a[3000][3000], l, c;
pair<int, int> z;
int main() {
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
map<pair<int, int>, int> m;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> x[i] >> y[i];
}
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 = [tuple(map(int, input().split())) for i in range(n)]
b = [tuple(map(int, input().split())) for i in range(n)]
x1, y1 = max(a)
x2, y2 = min(b)
print(x1 + x2, y1 + y2) |
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.util.HashMap;
import java.util.Scanner;
public class B1091 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
Point[] ob = new Point[n];
for (int i = 0; i < n; i++) {
ob[i] = new Point(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... | # Created by nikita at 30/12/2018
n = int(input())
obel = []
for i in range(n):
x, y = [int(i) for i in input().split()]
obel.append((x, y))
pods = []
for i in range(n):
a, b = [int(i) for i in input().split()]
pods.append([a, b])
possible = []
for i in range(n):
possible.append([obel[0][0] + po... |
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 _ in range(2*n):
x,y = map(int,input().split(" "))
a += x
b += y
print(a//n,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... | #include <bits/stdc++.h>
using namespace std;
const int ms = 2e5 + 100;
const int sigma = 30;
int n, m, k, t;
map<pair<int, int>, int> pres;
pair<int, int> ele[ms];
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int a, b, c;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> ele[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;
map<long long int, long long int> mp, mk;
set<long long int> s1, s2;
vector<int> v, w;
string s = "", qq = "", ss = "", pp = "";
char ch;
long long int m, n, i, j, l, r, x, t, y, u, g, h, mn, mx, d, z, c, f, e, k;
int main() {
cin >> n;
for (i = 1; 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... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;
import java.util.StringTokenizer;
public class ProblemB {
static InputReader in = new InputReader(System.in);
public static void main(String[] args) {
int 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())
o = []
for _ in range(n):
x, y = map(int, input().split())
o.append((x, y))
o.sort()
p = []
for _ in range(n):
x, y = map(int, input().split())
p.append((x, y))
p.sort(reverse = True)
print(o[0][0]+p[0][0], o[0][1]+p[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... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
vector<pair<long long, long long> > m;
for (long long i = 0; i < 2 * n; i++) {
long long a, b;
cin >> a >> b;
m.push_back({a, b});
}
sort(m.begin(), m.end());
long long x, y;
x = m[0].first + m[2 * n - 1].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... | n=int(input())
a=0
b=0
for i in range(n):
x, y=map(int, input().split())
a+=x
b+=y
for i in range(n):
x, y=map(int, input().split())
a+=x
b+=y
print (a//n, 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... | def Bshorter():
n = int(input())
x = 0
y = 0
for i in range(2*n):
xy_in = input().split()
x+= int(xy_in[0])
y+= int(xy_in[1])
print("{} {}".format(x//n,y//n))
Bshorter()
|
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 sum1 = 0, sum2 = 0;
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
sum1 += x;
sum2 += y;
}
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
sum1 += x;
sum2 += y;
}
cout << ... |
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 = input()
n = int(n)
xa = 0
ya = 0
x = 0
y = 0
for i in range(2*n):
xa, ya = input().split()
x += int(xa)
y += int(ya)
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() {
std::ios::sync_with_stdio(false);
long long n;
cin >> n;
long long x = 0, y = 0;
for (long long i = 0; i <= n - 1; ++i) {
long long xx, yy;
cin >> xx >> yy;
x += xx;
y += yy;
}
for (long long i = 0; i <= n - 1; ++i) {
long 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... | t=int(input())
x=0
y=0
result=''
for i in range(2*t):
s=input()
s=s.split(' ')
for i in range(2):
s[i]=int(s[i])
x=x+s[0]
y=y+s[1]
x=x//t
y=y//t
result=result+str(x)+' '+str(y)
print(result)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.