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... | #include <bits/stdc++.h>
using namespace std;
void swap(long long *x, long long *y) {
long long t;
t = *x;
*x = *y;
*y = t;
}
int main() {
long long n;
cin >> n;
long long i, x[n], y[n], a[n], b[n];
for (i = 0; i < n; i++) cin >> x[i] >> y[i];
for (i = 0; i < n; i++) cin >> a[i] >> b[i];
sort(x, 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... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.BitSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.StringTokenizer;
public class TaskB {
public static ... |
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())
i=0
x=0
y=0
i=0
while i<2*n:
t=raw_input().split()
a=int(t[0])
b=int(t[1])
x=x+a
y=y+b
i=i+1
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... | # Enter your code here. Read input from STDIN. Print output to STDOUT# ===============================================================================================
# importing some useful libraries
from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import Byte... |
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() {
int64_t n;
cin >> n;
vector<pair<int64_t, int64_t>> v(n);
int64_t sum1 = 0;
int64_t sum2 = 0;
int64_t sum3 = 0;
int64_t sum4 = 0;
for (int i = 0; i < n; i++) {
cin >> v[i].first >> v[i].second;
sum1 = sum1 + v[i].first;
sum2 = 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... | n=int(input())
R=lambda:([*map(int,input().split())]for _ in[0]*n)
o,c=min(R()),max(R())
print(o[0]+c[0],o[1]+c[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... | from sys import stdin, stdout
from collections import defaultdict
n = int(stdin.readline())
x = list()
y = list()
for i in range (n):
x.append([int(a) for a in stdin.readline().split()])
for i in range (n):
y.append([int(a) for a in stdin.readline().split()])
ans = defaultdict(lambda:0)
for i in x:
for j 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;
int main() {
int N;
cin >> N;
vector<pair<int, int> > O(N), T(N);
for (int i = 0; i < N; i++) cin >> O[i].first >> O[i].second;
for (int i = 0; i < N; i++) cin >> T[i].first >> T[i].second;
sort(O.begin(), O.end());
sort(T.begin(), T.end());
reverse(T.begin(... |
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.FilterInputStream;
import java.io.BufferedInputStream;
import java.util.HashMap;
import java.util.ArrayList;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution ... |
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, a, b;
long long r1 = 0, r2 = 0;
int main() {
cin >> n;
for (int i = 0; i < n * 2; i++) {
cin >> a >> b;
r1 += a, r2 += b;
}
cout << r1 / n << ' ' << r2 / 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... | R = lambda: map(int, input().split())
n = int(input())
S1,S2 = 0,0
for i in range(2*n):
a,b = R()
S1 += a
S2 += b
print(S1//n,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() {
long long int n, p = 0, q = 0;
cin >> n;
for (int i = 0; i < 2 * n; i++) {
long long int x, y;
cin >> x >> y;
p += x;
q += y;
}
cout << p / n << " " << q / 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;
int a, b;
long long sumx = 0, sumy = 0;
cin >> n;
for (int i = 0; i < 2 * n; i++) {
cin >> a >> b;
sumx += a;
sumy += b;
}
if (sumx) sumx = sumx / n;
if (sumy) sumy = sumy / n;
cout << sumx << " " << sumy;
}
|
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):
x,y=map(int,input().split())
X.append(x)
Y.append(y)
A=[]
B=[]
for i in range(n):
a,b=map(int,input().split())
A.append(a)
B.append(b)
print((sum(X)+sum(A))//n,(sum(Y)+sum(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;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
long long n, p = 2000000, q = 2000000, x = -20000000, y = -2000000, a, b, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> a >> b;
if (a <= p) {
if (a == p) {
if (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... | #include <bits/stdc++.h>
using namespace std;
const int ms = 1e4 + 20;
int x[ms], y[ms], a[ms], b[ms];
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
scanf("%d %d", x + i, y + i);
}
for (int i = 0; i < n; i++) {
scanf("%d %d", a + i, b + i);
}
map<pair<int, int>, int> cnt;
for (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... | #include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> mp;
queue<pair<int, int> > q, q1;
int read() {
char ch = getchar();
int f = 0, x = 1;
while (ch < '0' || ch > '9') {
if (ch == '-') x = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
f = (f << 1) + (f << 3) + ch - '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.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.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual soluti... |
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 GCC optimize(3, "Ofast", "inline")
using namespace std;
bool Finish_read;
template <class T>
inline void read(T &x) {
Finish_read = 0;
x = 0;
int f = 1;
char ch = getchar();
while (!isdigit(ch)) {
if (ch == '-') f = -1;
if (ch == EOF) return;
ch = getchar();
}
... |
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())
Overallx=[]
Overally=[]
for i in range(0,n):
x,y=[int(x) for x in input().split()]
Overallx.append(x)
Overally.append(y)
for i in range(0,n):
x,y=[int(x) for x in input().split()]
Overallx.append(x)
Overally.append(y)
Overallx.sort()
Overally.sort()
x=Overallx[0]+Overallx[-1]
y=Ov... |
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> m;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
vector<pair<int, int> > v(n), w(n);
for (int i = 0; i < n; i++) {
cin >> v[i].first >> v[i].second;
}
for (int i = 0; i < n; i++) {
cin >> w[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 math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
def LI(): return list(map(int, sys.stdin.readline().spli... |
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... | #!/usr/bin/env python
"""
This file is part of https://github.com/Cheran-Senthil/PyRival.
Copyright 2018 Cheran Senthilkumar all rights reserved,
Cheran Senthilkumar <hello@cheran.io>
Permission to use, modify, and distribute this software is given under the
terms of the MIT License.
"""
from __future__ import divisi... |
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())
lix=0
lia=0
for i in range(n):
a,b=map(int,input().split())
lix+=a
lia+=b
for i in range(n):
a,b=map(int,input().split())
lix+=a
lia+=b
print(lix//n,lia//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.*;
import java.math.*;
import java.lang.*;
import static java.lang.Math.*;
public class fast implements Runnable {
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numCh... |
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_N = 1002;
int n, x[MAX_N], y[MAX_N], a[MAX_N], b[MAX_N];
map<pair<int, int>, int> mp;
void readInput() {
cin >> n;
for (int i = 1; i <= n; ++i) cin >> x[i] >> y[i];
for (int i = 1; i <= n; ++i) cin >> a[i] >> b[i];
}
bool check(int u, int v) {
mp.clear... |
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())
res = [0, 0]
for _ in range(2 * n):
l = [*map(int, input().split())]
res[0] += l[0]
res[1] += l[1]
print(res[0]//n, res[1]//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::cin.tie(0);
std::ios::sync_with_stdio(false);
int n, x, y;
cin >> n;
vector<pair<int, int> > v1(n), v2(n);
map<pair<int, int>, bool> maap, temp;
for (int i = 0; i < n; i++) {
cin >> v1[i].first >> v1[i].second;
}
for (int 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... | n = int(input())
x = 0
y = 0
for i in range(n * 2):
a,b = (int(x) for x in 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>
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
using namespace std;
int INF = 2e9;
int n;
vector<pair<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 sys
n = int(raw_input())
pillars = set()
for i in range(n):
t = tuple(map(int, raw_input().split()))
if i == 0:
pil0 = t
pillars.add(t)
clues = []
for i in range(n):
clues.append(tuple(map(int, raw_input().split())))
for i,clue in enumerate(clues):
px, py = pil0[0] + clue[0], pil0[... |
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 -*-
"""
Spyder Editor
This is a temporary script file.
"""
n=int(input())
a=[]
b=[]
for _ in range(n):
s,t=map(int,input().split())
a.append(s)
b.append(t)
#print(x,end=' ')
c=[]
d=[]
for _ in range(n):
s,t=map(int,input().split())
c.append(s)
d.append(t)
x=min(a)+max(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... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, a, b, x = 0, y = 0;
cin >> n;
for (long long i = 0; i < n; i++) {
cin >> a >> b;
x += a;
y += b;
}
for (long long i = 0; i < n; i++) {
cin >> a >> b;
x += a;
y += b;
}
cout << x / n << ' ' << y / n << '\n';
r... |
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())
o = []
c = []
for _ in range(n):
a, b = map(int, sys.stdin.readline().split())
o.append((a,b))
for _ in range(n):
a, b = map(int, sys.stdin.readline().split())
c.append((a,b))
dp = [[0] * n for _ in range(n)]
for i in range(n):
for j in range(n):
dp[... |
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 codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Agg
{
public static void main (String[] args) throws java.lang.Exception
{Scanner sc=new Scanner(System.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;
bool comp(pair<int, int> i, pair<int, int> j) {
if (i.first == j.first) return i.second > j.second;
return i.first > j.first;
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, i, j;
cin >> n;
pair<int, int> x[n], y[n];
for (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;
int main() {
int n, t1, t2;
while (scanf("%d", &n) != EOF) {
int xma = -3000000, yma = -3000000, xmi = 0x7f7f7f7f, ymi = 0x7f7f7f7f;
for (int i = 0; i < n; i++) {
scanf("%d%d", &t1, &t2);
xma = max(xma, t1);
yma = max(yma, t2);
}
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())
mas1 = [float('-inf'), float('-inf')]
min1 = [float('inf'), float('inf')]
for t in range(n):
x1, y1 = map(int, input().split())
mas1 = max(mas1, [x1,y1])
for t in range(n):
x1, y1 = map(int, input().split())
min1 = min(min1, [x1, y1])
print(mas1[0]+min1[0], mas1[1]+min1[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 N = 1e3 + 5;
int x[N], y[N], a[N], b[N];
set<pair<int, int> > s;
map<pair<int, int>, int> cnt;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
for (int i = 1; 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>
inline int read() {
char c = getchar();
register int x = 0, r = 1;
while (c < '0' || c > '9') {
if (c == '-') r = -1;
c = getchar();
}
while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - 48, c = getchar();
return x * r;
}
int n, tot;
void write(int x) {
if (x > 9) 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... | n=int(input())
arr1=[]
arr2=[]
arr1.append([])
arr1.append([])
arr2.append([])
arr2.append([])
for i in range(n):
tmp=input().split()
arr1[0].append(int(tmp[0]))
arr1[1].append(int(tmp[1]))
for i in range(n):
tmp=input().split()
arr2[0].append(int(tmp[0]))
arr2[1].append(int(tmp[1]))
ans=[]
for i in range(n):
an... |
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.PrintWriter;
import java.io.*;
import java.util.*;
import java.util.LinkedList;
import java.math.*;
import java.lang.*;
import java.util.PriorityQueue;
import static java.lang.Math.*;
@SuppressWarnings("unchecked")
public class Solution implements R... |
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 codeforces.Goodbye2018;
import java.io.*;
import java.util.InputMismatchException;
public class B {
public static void main(String args[]) throws Exception {
int n = scn.nextInt();
int[] pi = new int[n];
int[] pj = new int[n];
int maxi=Integer.MIN_VALUE, maxj = maxi;
... |
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,0} for i in range(0,n)]
b=[{0,0} for i in range(0,n)]
sax=say=sbx=sby=0
for i in range(0,n):
a[i]=tuple(map(int,input().split(' ')))
x,y=a[i];sax+=x;say+=y
for i in range(0,n):
b[i]=tuple(map(int,input().split(' ')))
x,y=b[i];sbx+=x;sby+=y
sx=(sax+sbx)//n
sy=(say+sby)//n
print(sx,sy) |
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... | k = int(input())
x, y = 0, 0
for i in range(2 * k):
a, b = map(int, input().split())
x += a
y += b
print(x // k, y // 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 java.util.ArrayList;
import java.util.Scanner;
public class Main {
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=new int[n];
int[] b=new int[n];
ArrayList<Coordinate>[] array = new ArrayList... |
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 = [list(map(int, input().split())) for _ in range(n)]
c = [list(map(int, input().split())) for _ in range(n)]
o.sort(key=lambda x: (x[0], x[1]))
c.sort(key=lambda x: (x[0], x[1]), reverse=True)
print(o[0][0]+c[0][0], o[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... | #include <bits/stdc++.h>
const long long int MOD = 1e9 + 7;
using namespace std;
int32_t main(void) {
ios::sync_with_stdio(0);
cin.tie(0);
long long int n, a, b;
cin >> n;
vector<pair<long long int, long long int>> o(n);
map<pair<long long int, long long int>, long long int> ans;
for (long long int i = 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 B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long x = 0;
long y = 0;
for (int i = 0; i < 2*n; i++) {
x+=sc.nextInt();
y+=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())
sum1=0
sum2=0
for i in range(2*n):
a,b=map(int,input().split())
sum1+=a
sum2+=b
print(int(sum1/n),int(sum2/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())
x, y, a, b = [], [], [], []
for _ in range(n):
xi, yi = map(int, input().split())
x.append(xi)
y.append(yi)
for _ in range(n):
ai, bi = map(int, input().split())
a.append(ai)
b.append(bi)
x.sort()
y.sort()
a.sort()
b.sort()
print("%d %d" % (x[0] + a[-1], y[0] + b[-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... | t=int(input())
l=[]
o=2*t
while(o>0):
a,b=input().strip().split()
l.append([int(a),int(b)])
o-=1
l.sort()
s=str(l[0][0]+l[len(l)-1][0])+" "+str(l[0][1]+l[len(l)-1][1])
print(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... | n=int(input())
x=0
y=0
for i in range(2*n):
a=input().split()
x+=int(a[0])
y+=int(a[1])
print(int(x/n),int(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 n;
cin >> n;
vector<long long> vec1, vec2;
for (int i = 0; i < 2 * n; i++) {
long long num1, num2;
cin >> num1 >> num2;
vec1.push_back(num1);
vec2.push_back(num2);
}
sort(vec1.begin(), vec1.en... |
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 = sys.stdin.readline
def main():
n = int(input())
coords = []
hints = []
for i in range(2*n):
if i < n:
x, y = map(int, input().split())
z = (x, y, i + 1)
coords.append(z)
else:
a, b = 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... |
import java.awt.List;
import java.util.*;
public class Leaderboard {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in=new Scanner(System.in);
ArrayList<Long>q=new ArrayList<Long>();
TreeMap<Character,Integer>set=new TreeMap<Character,Integer>();
TreeMap<String,Integer>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())
s1 = 0
s2 = 0
for i in range(2 * n):
x, y = map(int, input().split())
s1 += x
s2 += y
print(s1 // n, 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;
pair<int, int> P[10000], C[10000];
map<pair<int, int>, int> T;
void inc(int x, int y) {
pair<int, int> p = {x, y};
if (T.find(p) == T.end()) T[p] = 0;
T[p]++;
}
int main(void) {
int n;
cin >> n;
for (long long int(i) = (long long int)(0); (i) < (long long 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;
pair<int, int> operator+(pair<int, int> a, pair<int, int> b) {
return {a.first + b.first, a.second + b.second};
}
pair<int, int> operator-(pair<int, int> a, pair<int, int> b) {
return {a.first - b.first, a.second - b.second};
}
int main() {
ios_base::sync_with_stdio(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;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
long long n;
cin >> n;
vector<pair<long long, long long> > v1(n);
vector<pair<long long, long long> > v2(n);
for (long long i = 0; i < n; ++i) {
long long f, s;
cin >> f >> s;
v1[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 long long int N = 2e5 + 9;
const long long int INF = 1e6 + 9;
const long long int mod = 998244353;
long long int max_d = 0;
void solve() {
long long int n;
cin >> n;
long long int i, j, x[n], y[n], a[n], b[n], flag = 1;
vector<pair<long long int, long long 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... | class Index:
def __init__(self, x = 0, y = 0):
self.x = x
self.y = y
def __add__(self, other):
temp = Index(self.x + other.x, self.y + other.y)
return temp
def Ans(self, n):
print(self.x // n, self.y // n)
Num = int(input())
T = Index()
for i in range(2 * Num):
... |
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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class NewYearAndTheTreasureGeolocation {
public static BufferedReader in = new BufferedReader(new InputStreamReader(Sys... |
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 modex(long long a, long long b, long long m) {
if (b == 0) return 1;
long long ans = a;
long long save = 1;
while (b != 1) {
if (b % 2 == 1) {
save *= ans;
save %= m;
}
ans *= ans;
ans %= m;
b /= 2;
}
return (ans * save)... |
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 namespace std;
struct point {
int x;
int y;
} ob[MAXN], clue[MAXN];
int main() {
int n;
int tx, ty;
bool clue_visd[MAXN];
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d%d", &ob[i].x, &ob[i].y);
}
for (int i = 0; i < n; i++) {
scan... |
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):
(t1,t2)=map(int,input().split())
x.append(t1)
y.append(t2)
for _ in range(n):
(t1,t2)=map(int,input().split())
a.append(t1)
b.append(t2)
tx=[[] for _ in range(n)]
ty=[[] for _ in range(n)]
for i in range(n):
for j in range(n):
tx[i].append(x[i]+a[j])
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... | nb_points = int(input())
sum_x = 0
sum_y = 0
for _ in range(2 * nb_points):
a, b = [int(x) for x in input().split()]
sum_x += a
sum_y += b
print(sum_x//nb_points, sum_y//nb_points) |
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;
vector<pair<int, int> > coords;
vector<pair<int, int> > vects;
map<pair<int, int>, int> m;
map<pair<int, int>, int>::iterator it;
int main() {
scanf("%d", &N);
for (int i = 0; i < N; i++) {
int a, b;
scanf("%d %d", &a, &b);
coords.push_back(make_pair(... |
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(input())
x,y=0,0
for _ in " "*(2*a):
g,h=map(int,input().split())
x+=g
y+=h
print(x//a,y//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... | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
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.*;
import java.util.*;
public class b {
static class FastScanner {
BufferedReader br;
StringTokenizer st;
public FastScanner() {
try {
br = new BufferedReader(new InputStreamReader(System.in));
st = new StringTokenizer(br... |
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 = 2e7 + 7;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
vector<pair<int, int>> v;
vector<pair<int, int>> v1;
map<pair<int, int>, int> mp;
for (int i = 0; i < n; i++) {
int a, b;
cin >> 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())
a_list = []
b_list = []
x_list = []
y_list = []
for i in range(n):
x, y = map(int, input().split(" "))
x_list.append(x)
y_list.append(y)
for i in range(n):
a, b = map(int, input().split(" "))
a_list.append(a)
b_list.append(b)
min_x = min(x_list)
min_y = min(y_list)
max_a = 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;
const int N = int(2e5) + 5;
const int inf = (int)1e9 + 7;
int n;
int x[N], y[N];
int a[N], b[N];
map<pair<int, int>, int> cur;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i) {
scanf("%d %d", x + i, y + i);
}
for (int i = 1; i <= n; ++i) {
scanf("... |
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())
l=[]
for i in range(2*t):
n,k=map(int,input().split())
l.append((n,k))
ans=[]
for i in range(2):
s=0
for j in range(len(l)):
s+=l[j][i]
ans.append(s//t)
print(*ans)
|
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);
cin.tie(0);
int n;
cin >> n;
long long x = 0, y = 0;
for (int i = 0; i < 2 * n; i++) {
int xx, yy;
cin >> xx >> yy;
x += xx;
y += yy;
}
cout << (x / n) << " " << (y / n) << '\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;
long long x = 0, y = 0, a, b;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a >> b;
x += a;
y += b;
}
for (int i = 1; i <= n; i++) {
cin >> a >> b;
x += 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... | #include <bits/stdc++.h>
char ch;
bool fs;
void re(int& x) {
while (ch = getchar(), ch < 33)
;
if (ch == '-')
fs = 1, x = 0;
else
fs = 0, x = ch - 48;
while (ch = getchar(), ch > 33) x = x * 10 + ch - 48;
if (fs) x = -x;
}
using namespace std;
map<pair<int, int>, int> f;
int n, x[1001], y[1001], 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 = input()
ans1 = 0
ans2 = 0
for i in range(n):
x,y = map(int,raw_input().split())
ans1 = ans1 + x
ans2 = ans2 + y
for i in range(n):
x,y = map(int,raw_input().split())
ans1 = ans1 + x
ans2 = ans2 + y
ans1 = ans1/n
ans2 = ans2/n
print ans1,ans2
|
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 int read() {
int x = 0, sign = 1;
char c = getchar();
for (; c < '0' || c > '9'; c = getchar()) {
if (c == '-') sign = -1;
}
for (; c >= '0' && c <= '9';)
x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
return x * sign;
}
int n;
long long p1 = ... |
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())
summ1 = 0
summ2 = 0
for i in range(2 * n):
k, m = map(int, input().split())
summ1 += k
summ2 += m
print(summ1 // n, summ2 // 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;
vector<pair<long long, long long> > ve, ve2;
int main() {
long long n;
cin >> n;
for (long long i = 0; i < n; i++) {
long long u, v;
cin >> u >> v;
ve.push_back({u, v});
}
for (long long i = 0; i < n; i++) {
long long u, v;
cin >> u >> v;
v... |
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, j;
scanf("%d", &n);
int x[n], y[n], a[n], b[n];
for (i = 0; i < n; i++) scanf("%d %d", &x[i], &y[i]);
for (i = 0; i < n; i++) scanf("%d %d", &a[i], &b[i]);
vector<pair<int, int> > ans;
vector<int> numbers;
for (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... | from sys import stdin
a = [(0,0)]
b = [(0,0)]
n = int(stdin.readline())
di = {}
fi = {}
for _ in xrange(n):
x,y = map(int,stdin.readline().split())
a.append((x,y))
di[ (x,y)] = _ + 1
for _ in xrange(n):
x,y = map(int,stdin.readline().split())
b.append((x,y))
fi[ (x,y)] = _ + 1
def solve(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())
x = 0
y = 0
for b in range(n*2):
v = input()
x += int(v[:list(v).index(" ")])
y += int(v[list(v).index(" "):])
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_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long n;
cin >> n;
long long sum1 = 0, sum2 = 0;
for (long long i = 1; i <= 2 * n; i++) {
long long x, y;
cin >> x >> y;
sum1 += x;
sum2 += y;
}
cout << sum1 / 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... | a = input()
a = int(a)
obelisk = []
clues = []
for i in range(a):
b = input()
b = b.split()
obelisk.append(b)
for i in range(a):
b = input()
b = b.split()
clues.append(b)
x = 0
y = 0
for i in obelisk:
x += int(i[0])
y += int(i[1])
for i in clues:
x += int(i[0])
y += int(i[1])
pri... |
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.Collections;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.Scanner;
public class TreasureGeolocation2 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int obelisk[][] = new int[n][2];
int ab[][] = 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... | from collections import defaultdict
n = int(input())
arr = []
d = {}
d2 = defaultdict(int)
listt = []
goal = (0,0)
for _ in range(n):
x,y = map(int,input().split())
arr.append((x,y))
x,y = arr[0]
for _ in range(n):
a,b = map(int,input().split())
d[str((a,b))] = 0
listt.append((a,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;
int main() {
long long int n;
cin >> n;
vector<long long int> x, y, a, b;
for (long long int i = 0; i < n; i++) {
long long int p, q;
cin >> p >> q;
x.push_back(p);
y.push_back(q);
}
for (long long int i = 0; i < n; i++) {
long long int p, 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... | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;
import java.util.Arrays;
import java.util.ArrayList;
public class Main {
pub... |
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 = 1000 * 1000 * 1000;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
pair<int, int> minp1(INF, INF), minp2(INF, INF);
for (int i = 0; i < n; i++) {
int x, y;
cin >> x >> y;
minp1 = min(minp1, ... |
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.lang.*;
import java.awt.*;
import java.awt.geom.*;
import java.math.*;
import java.text.*;
import java.math.BigInteger.*;
import java.util.Arrays;
public class Goodbye2018
{
BufferedReader in;
StringTokenizer as;
int nums[][],nums2[][];
ArrayList < Integer >... |
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 = 0, 0
for x in range(2 * n):
q, w = map(int, input().split())
a += q
b += w
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... | # x[i]=list(map(int,input().split()))
def solve():
n=list(map(int,input().split()))[0]
xx = yy = 0
for i in range(n*2):
x,y=list(map(int,input().split()))
xx += x
yy += y
print(xx//n,yy//n)
if __name__ == '__main__':
solve()
|
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> n1[1005];
pair<int, int> n2[1005];
bool cmp1(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(void) {
int n;
cin >> n;
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;
int main() {
long long int n, i, j, k, p = 0, q = 0, fx[6001] = {0}, fy[6001] = {0};
cin >> n;
int a[n], b[n], x[n], y[n];
for (i = 0; i < n; i++) cin >> x[i] >> y[i];
for (i = 0; i < n; i++) cin >> a[i] >> b[i];
for (i = 0; i < n; i++) {
for (j = 0; j < 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];
bool f(node a, node b) {
if (a.x == b.x)
return a.y < b.y;
else
return a.x < b.x;
}
int main() {
int n;
while (scanf("%d", &n) != EOF) {
for (int i = 0; i < n; i++) scanf("%d %d", &p1[i].x, &p1[i].y);
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 = int(input())
x = 0
y = 0
for _ in range(2*n):
a, b = [int(s) for s in 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... | import math
n=int(input())
sum1=sum2=0
for i in range(2*n):
a,b=[int(x) for x in input().split()]
sum1+=a
sum2+=b
#print(sum1,sum2)
#g=math.gcd(sum1,sum2)
print(sum1//n,sum2//n) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.