exec_outcome stringclasses 1
value | code_uid stringlengths 32 32 | file_name stringclasses 111
values | prob_desc_created_at stringlengths 10 10 | prob_desc_description stringlengths 63 3.8k | prob_desc_memory_limit stringclasses 18
values | source_code stringlengths 117 65.5k | lang_cluster stringclasses 1
value | prob_desc_sample_inputs stringlengths 2 802 | prob_desc_time_limit stringclasses 27
values | prob_desc_sample_outputs stringlengths 2 796 | prob_desc_notes stringlengths 4 3k ⌀ | lang stringclasses 5
values | prob_desc_input_from stringclasses 3
values | tags listlengths 0 11 | src_uid stringlengths 32 32 | prob_desc_input_spec stringlengths 28 2.37k ⌀ | difficulty int64 -1 3.5k ⌀ | prob_desc_output_spec stringlengths 17 1.47k ⌀ | prob_desc_output_to stringclasses 3
values | hidden_unit_tests stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PASSED | d054b4e7dd5a6941c5bbdc499311183b | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
static {
try {
System.setIn(new FileInputStream("input.txt"));
System.setOut(new PrintStream(new FileOutputStream("output.txt")));
} catch (Exception e) {}
}
void solve() {
int n = in.nextInt();
int[] x = new ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 563c3aff4440fdc596c2cab749a165d8 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.lang.Math.ceil;
import static java.util.Arrays.sort;
public class C {
static int mod = 1000000007;
public static void main(String[] args) throws Exception {
int test = ri();
while (test-- > ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 24c280a0e8b0f08e80fd7e442195bc28 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | //some updates in import stuff
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import java.util.*;
import java.io.*;
import java.math.*;
public class Main{
static int mod = (int) (Math.pow(10, 9)+7);
static final int dx[] = { -1, 0, 1, 0 }, dy[... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 2afbc0bca1bfc280e4b5b130721191e7 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class CodeForces {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int tt = fs.nextInt();
while(tt-- > 0) {
int n = fs.nextInt();
int[] x = new int[n];
int[] ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 7edb2dfccefdab644487258759741938 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Solution {
// // static int ans=0;
// static int[] nodeColors;
// static boolean[] visi... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 881f0ccf86947f8c3edb7ef996634064 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | d076a89be308e24af0ac09bd916eb85c | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.stream.Collectors;
public class EasternExhibition {
public static void main(String[] args) throws IOException {
try (BufferedReader in = new BufferedReader(new Inp... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 3150592a4dc30b8e77fa711d2463ae69 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | /*
_oo0oo_
o8888888o
88" . "88
(| -_- |)
0\ = /0
___/`---'\___
.' \\| |// '.
/ \\||| : |||// \
/ _||||| -:- |||||- \
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | a344cf7f5775152f8de7e878a9107382 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static long mod = 1000000007;
static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
public static void main(String[] args) throws IOException {
FastReader sc = new FastReader();
int t = sc.nextInt();
while( t-- >... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | eb8c3de7b05f30641be43d9624e4c5b9 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class File{
static Scanner sc=new Scanner(System.in);
static long find(ArrayList<Integer> x){
Collections.sort(x);
return (long)(x.get(x.size()/2) - x.get((x.size()-1)/2) + 1);
}
static void solve(){
int n=sc.nextInt();
ArrayList<I... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | e58c6a31754f5744a322204bb663320f | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main{
static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader(){
br = new BufferedReader(new InputStreamReader(System.in));
}
String next(){
whi... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 6076562ef1d349d0ba3ea9f825f6007f | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class easternExhibition {
public static void main(String[] args) {
// Scanner sc = new Scanner(System.in);
FastReader sc = new FastReader();
int t = sc.nextInt();
for(int o = 0 ; ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 343339ff3e1ec868e055d8355294bf74 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | // \(≧▽≦)/
import java.io.*;
import java.util.*;
public class tank {
static final FastScanner fs = new FastScanner();
//static PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) {
int t = fs.nextInt();
while(t-- > 0) {
run_c... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 154d7bb8cafc7337a4fc6752395e2fcd | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
public class EasternExhibiton {
public static void main(String[] args) throws IOException {
BufferedReader read = new Buffere... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | f2f67c10c652e07ffaea879f5f238e5a | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class B1486 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb =... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 59e936cc2773cb205df2914ea9120563 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.IOException;
import java.util.Random;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
i... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | aa58b19a424a81a02f67de7df14a326a | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.List;
import java.util.Arrays;
import java.math.BigInteger;
public class Solution {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int numRounds = Integer.parseInt(scan.nextLine(... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 2ab3a7ac42b92c79d9a1534c0f2f4873 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | /* package codechef; // don't place package name! */
import java.math.*;
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 B_Eastern_Exhibition
{
FastReader s;
public static void main (String[] args) th... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | c9a125b3b3f321a6ee7638e9c768a93f | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.PrintWriter;
import java.util.*;
public class Practice {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int t = sc.nextInt();
while (t-->0){
int n = sc.nextInt();
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 9224078db28591f19bd9dee36975c176 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | //package easternexhibition;
import java.util.*;
import java.io.*;
public class easternexhibition {
public static void main(String[] args) throws IOException {
BufferedReader fin = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(fin.readLine());
StringBuilder fout = new ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | a6f2cf6d768036d4d7c649ba0b152eb2 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class B {
public static void main(String args[])throws IOException{
FastReader sc = new FastReader();
PrintWriter out = new PrintWriter(System.out);
int t = sc.nextInt();
while(t-- > 0){
int n = sc.nextInt();
int x[] = new int[n];
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | ad9da14e2ed6a56f5b37bd5473d5480d | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.util.*;
import java.io.*;
public class Main {
static BufferedReader rd = new BufferedReader(new InputStreamReader(System.in));
static BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(System.out));
static StringTokenizer tok;
public static void main(String[] args) throws Exception {
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | cc2d972e6b1e1f96ec9bcdf01d43c86b | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
public class Training {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
for (int i = 0; i < t; i++) {
int n = in.nextInt();
long [] x = new long [n];
long [] y = new long [n]... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 2df5eb70b92e317b3199a4b8b665de9e | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class EasternExhibition {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 59038227a3b8f8c1823f2c9a72d118b1 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | /*
Codeforces
Problem 1486B
*/
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
public class EasternExhibition {
public static void main(String[] args) throws IOException {
FastIO in = new FastIO(System.in);
int t = in.nextInt();... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | aa720868d93adbfd7dc4dd309cad0ead | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
public class Round_2{
static Scanner sc = new Scanner(System.in);
static void solve() {
int n = sc.nextInt();
ArrayList<Long> x = new ArrayList<>();
ArrayList<Long> y = new ArrayList<>();
for(int i=0;i<n;i++) {
x.add(sc.nextLong());
y.add(sc.nextLong());
}
// Sy... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | fdae124a8467a7f01e45631c420a5be6 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Locale;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
try (BufferedInputStream in = new BufferedInputStre... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 74a6eede0756d5f2ca155c89ea1caf38 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.lang.*;
import java.lang.reflect.Array;
import java.util.*;
import java.io.*;
public class Main {
static FastScanner in = new FastScanner();
static void solve() {
int n = in.nextInt();
long[] x = new long[n], y = new long[n];
for (int i = 0; i < n; ++i) {
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 2aa49ea8b6e52863a7ca89a5a27e9e3b | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static final int M = 1000000007;
static FastReader in = new FastReader();
// static PrintWriter out = new PrintWriter(System.out);
// static Scanner in = new Scanner(System.in);
// File file = new File("input.txt");
// Scanner in = new Scanner(file);... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | dafb8793eb5be22c50a3b15a2b2f357e | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class solve{
public static Reader sc = new Reader();
//public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException{
//BufferedReader br = new BufferedReader(new FileRe... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 229fd05a2633e35a146592a72e3b1480 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.Scanner;
import java.util.Arrays;
//Thanks be to Lord and Mary
public class sol {
static Scanner in = new Scanner(System.in);
static void solve() {
int a= in.nextInt();
long[] x = new long[a];
long[] y = new long[a];
for(int i = 0;i< a;i++ ) {
x[i] = in.nextInt();
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | bd3cc0c812b23521a9b010af0c67114f | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.util.*;
import java.io.*;
public class two {
public static void main(String[] args) throws IOException, FileNotFoundException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//BufferedReader in = new BufferedReader(new FileReader("two"));
int t = Integer.pars... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | bcabec93f80d32d19005ac634e43ccf7 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
import java.util.Collections;
public class div2_703_B implements Runnable
{
public void run()
{
InputReader sc = new InputReader(System.in);
PrintWriter out = new PrintWriter(System.out);
int t = sc.nextInt();
while(t-- > 0)
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 1491d1b746ac19afed9a83febda62e52 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Solution {
public static int countMedian(int n, int[] arr) {
if (n % 2 == 1) {
return 1;
} else {
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | b1ed5775f745c175748ae08d4c71657d | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
static class DisjointUnionSets {
int[] rank, parent;
int n;
// Constructor
public DisjointUnionSets(int n)
{
ran... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | c580ab60dad1569b233862d850e60312 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
private static final boolean N_CASE = true;
private void solve() {
int n = sc.nextInt();
List<Integer> x = new ArrayList<>();
List<Integer> y = new ArrayList<>();
for (int i = 0; i < n; i++) {
x.... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 6d2f4df8840ffbe12fc49b7c80335c4e | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
private static final boolean N_CASE = true;
private void solve() {
int n = sc.nextInt();
int[] x = new int[n];
int[] y = new int[n];
Map<Integer, Integer> cx = new HashMap<>();
Map<Integer, Integer> ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 7e5c1aa28d9a564a3d02e7b9ae40c190 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
public class Cf {
public static void main(String [] args){
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int j=1;j<=t;j++){
int n=sc.nextInt();
ArrayList<Integer> a=new ArrayList<Integer>();
ArrayList<Integer> b=new ArrayList<Integer>();
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 830f46827c406f12c0873944acfeab71 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
@SuppressWarnings("unchecked")
public class EasternExhibition implements Runnable {
void solve() throws IOException {
int t = read.intNext();
while( t--> 0){
int n = read.intNext();
int[] x = iArr(n);
int[] y = iArr(n);
for(i... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | f73d916af748c3a285045ffa6cfcf272 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.lang.*;
/* ******************** _/\_Siya pati Ram Chandra ki Jai_/\_ ****************** */
public class JaiShreeRam{
static Scanner in=new Scanner();
public static void main(String[] args... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 130ac1773eaca1a109b39577739610bb | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class abc
{
public static long solve(ArrayList<Integer>ar)
{
Collections.sort(ar);
return ar.get((ar.size()+2)/2-1)-ar.get((ar.size()+1)/2-1)+1;
}
public static void main(String ard[])throws IOException
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 3781a73105f948878b40de1d728853aa | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class Solver {
public static void main(String[] args) {
FastReader in = new FastReader();
int t = in.nextInt();
while (t-- > 0) {
solve(in);
}
}
public static void solve(FastReader i... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 8888731ed2002dd2698a784b381d8e1b | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
import static java.lang.System.in;
import static java.lang.System.out;
public class Main {
public static void main(String[] args){
FastReader... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 3ff53564fa88141a7635169eb965e4d8 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.io.*;
import java.util.Arrays;
public class codeforces {
public static void main(String[] args)throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t=Integer.parseInt(br.readLine());
while(t--!=0) {
int n=Integer.... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 293333d91546a0f952b1df49dff065c9 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | //Implemented By Aman Kotiyal Date:-17-Feb-2021 Time:-5:50:00 pm
import java.io.*;
import java.util.*;
public class ques3
{
public static void main(String[] args)throws Exception{ new ques3().run();}
long mod=1000000000+7;
void solve() throws Exception
{
for(int ii=ni();ii>0;ii--)
{
int n=n... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 3d07a771e54daf069054d9d2d2ccf6bd | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
public class Main implements Runnable {
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private Spa... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 8acc16dc9e75c3361ea4d7ff2ef856ec | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class B{
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 3ebb024d0f559060469d7ccca3cc3e1b | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.Arrays;
import java.util.Scanner;
public class EasternExibition {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
int[] x = new int[n];
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 5667f30d3f0d484b731cb5aa6378e195 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class sol{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
long t=scan.nextLong();
while(t-->0){
int n=scan.nextInt();
long[] x=new long[n];
long[] y=new long[n];
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 5548713c1280072faa8bba86735b8b55 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | // package eround101;
import java.util.*;
import java.io.*;
import java.lang.*;
import java.util.StringTokenizer;
public class C101 {
static HritikScanner sc = new HritikScanner();
static PrintWriter pw = new PrintWriter(System.out, true);
final static int MOD = (int) (1e9 + 7);
static in... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 7fd9f69f741c6c495ca2d153379a0bf0 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | //package credit;
import java.io.*;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main{
static boolean v[];
static int ans[];
int size[];
static int count=0;
static int... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | e8aa82029e592c8e8d6437585e0ec4ec | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class main {
static FastScanner sc;
static PrintWriter pw;
static void pn(Object o){pw.println(o);}
static void p(Object o){pw.print(o);}
public static void main(String[] args) {
// Scanner sc = new Scanner(System.in);
sc = new FastSca... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 51250cfa9752ba9f18092afd10c020b1 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class EasternExhibition {
static class FastScanner
{
BufferedReader br;
StringTokenizer st;
public FastScanner()
{
br = ne... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | c07fb37738307497741fa51f1c9b029e | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class EasternExhibition {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | b7d84fc378936484ab75a330435757ef | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int t = fs.nextInt();
// Scanner sc = new Scanner(System.in);
for (int tt = 1; tt <= t; tt++) {
int n = fs.nextIn... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | e8299db5fbb9fb89ad8fc24fbae6859f | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | // Working program with FastReader
import java.io.BufferedReader;
import java.io.CharArrayReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public Fast... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 43beda098540487a0c7516f6f312ab9b | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import javax.swing.event.ListDataEvent;
import javax.swing.plaf.FontUIResource;
import java.lang.reflect.Array;
import java.util.*;
import java.lang.*;
import java.io.*;
public class Codechef {
public static void main(String[] args) throws java.lang.Exception {
out = new PrintWriter(new BufferedOu... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 672ec1f92b04d4d74d1abef30e0b98a4 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args) throws IOException
{
FastScanner f = new FastScanner();
int t=1;
t=f.nextInt();
PrintWriter out=new PrintWriter(System.out);
int mod=1000000007;
while(t>0) {
t--;
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | b558a3cd3c3735192a50391990d9ce61 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class B_Eastern_Exhibition {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int T = fs.nextInt();
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 3da3442812420f4bfa97a8b01225f172 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
/**
* Created on: Feb 18, 2021
* Questions: https://codeforces.com/contest/1486/problem/B
*/
public class EasternExhibition {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 529ec7a14a789d8a9de90b20c7b3f94c | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;
import static java.util.Collections.*;
import static java.util.Arrays.*;
public class B<Array, Target> {
public static int swap(int... args) {
return args[0];
} static ArrayList<Integer> pr... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 1ad796358e362d30d02e7c9fad742493 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | /*input
6
3
0 0
2 0
1 2
4
1 0
0 2
2 3
3 1
4
0 0
0 1
1 0
1 1
2
0 0
1 1
2
0 0
2 0
2
0 0
0 0
*/
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
{
static PrintWriter out;
static int MOD = 1000000007;
static FastReader scan;
/*-------- I/O using shor... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | f7736537500a20573365bcdc85a1fd91 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
//@author->.....future_me......//
//..............Learning.........//
/*Compete against yourself*/
import java.util.*;
import java.io.*;
import java.lang.*;
public class B {
static FastReader sc = new FastReader();
static PrintWriter out = new PrintWriter(System.out);
public static void main(Stri... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 11 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 760643b51acd4cc6c5e354fe458475b2 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static FastScanner sc = new FastScanner(System.in);
static PrintWriter pw = new PrintWriter(System.out);
static StringBuilder sb = new StringBuilder();
public static void main(String[] args) throws Exception {
//solveA();
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 9e6143bf1cff7c2d6dfa5e7107583170 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class cf2{
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public Fast... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | c2cf865d0c130366e129a38047b0e135 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
im... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 944ff608df3ee808319ed54f806d51d4 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class B {
public static void main(String[] args) {
FastScanner in = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int t = in.nextInt();
while(t-->0) {
int n = in.nextInt();
long x[] = new lo... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 28fc3903ba2251931082491ed4950a86 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class forces{
public static void main(String[] args){
Scanner scn = new Scanner(System.in);
int t = scn.nextInt();
while(t-- > 0){
solve(scn);
}
}
public static void solve(Scanner scn){
int n = scn.ne... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | c542441fd0303dc954b08d4700fde83c | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.util.*;
import java.io.*;
public class Main {
static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
static int n;
public static void main(String[] args) throws Exception {
int t = Integer... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | c7527e6bd1477892c04c79ae405b3400 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;
import static java.lang.Double.parseDouble;
import static java.lang.Integer.compare;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.System.in;
public class Main {
priv... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 5358b96cb5bc0847d099ec1d4c030dc1 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main2 {
public Main2() throws Fi... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | d2f89d31ad215420f0c69884bd6921fe | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
import java.awt.*;
public class B
{
BufferedReader in;
PrintWriter ob;
StringTokenizer st;
public static void main(String[] args) throws IOException {
new B().run();
}
void run() throws IOException {
in=new BufferedReader(new ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | a3a2663dfe3456312f34c4893643fab7 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public final class Solution {
static PrintWriter out = new PrintWriter(System.out);
static FastReader in = new FastReader();
static long mod = (long) 1e9 + 7;
static Pair[] moves = new Pair[]{new Pair(-1, 0), new Pair(1, 0), new Pair(0, -1), new Pair(0, ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | b153befb0903363448e6c8597d8e5426 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import com.sun.org.apache.regexp.internal.RE;
import java.util.*;
public class Main {
static Scanner scan = new Scanner(System.in);
public static void slove(){
int n = scan.nextInt();
int[] X = new int[n];
int[] Y = new int[n];
int idx = 0;
for(int i=0;i<n;... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 5d1720e89b0ca8c4f58e115e11c08c8a | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.lang.reflect.Array;
import java.text.DecimalFormat;
import java.util.*;
import java.io.*;
public class Equal {
static class pair implements Comparable<pair> {
int x;
int y;
public pair(int u, int v) {
this.x = u;
this.y = v;
}
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | b42fff0229f9bb8bfbf7229cfc23f959 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Collecti... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 42fd830cd89e2b7dd6d2207bd6ac6d70 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
import java.lang.*;
public class Main {
public static void main(String[] args) {
new Main();
}
public Main() {
submit();
}
public void submit() {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt(... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 6851aca278fceaeeaba65ba715063f3d | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | /*
Goal: Become better in CP!
Key: Consistency and Discipline
Desire: SDE @ Google USA
Motto: Do what i Love <=> Love what i do
If you don't use your brain 100%, it deteriorates gradually
*/
import java.util.*;
import java.io.*;
import java.math.*;
public class A {
static StringBuffer str=n... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 11a10b8c0c305f8feefda1ca7cfc4842 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import javax.sql.rowset.spi.SyncResolver;
import java.io.*;
import java.nio.channels.NonReadableChannelException;
import java.text.DateFormatSymbols;
public class Solution {
static int a[];
static FastScanner fs = null;
public static void main(String[] args) {
fs ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 5bdd41bee347220faa680f6b59f53164 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class B {
public static void main(String[] args) {
FastReader in = new FastReader();
PrintWriter out = new PrintWriter(System.out);
int T = in.nextInt();
for(int ttt = 1; ttt <= T; ttt++) {
int n = in.nextInt();
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 6011c4f41597ef91d766c9b7a883671c | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.*;
import java.util.*;
public class B {
public static void main(String[] args) {
FastReader in = new FastReader();
PrintWriter out = new PrintWriter(System.out);
int T = in.nextInt();
for(int ttt = 1; ttt <= T; ttt++) {
int n = in.nextInt();
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | c1c59c09ec4b2ab435ed556e44c7cdef | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class B1486{
static FastScanner fs = null;
public static void main(String[] args) {
fs = new FastScanner();
int t = fs.nextInt();
while(t-->0){
int n = fs.nextInt();
int a[] = new int[n];
int b[] = new int[n];
for(int i=0;i<n;i++){
a[i] = ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 8c0fa7dd6d1c0dca1289c178b057bca0 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class CF1486_D2_B {
public static void main(String[] args) {
FastScanner scanner = new FastScanner();
int t = scanner.nextInt();
for (int i = 0; i < t; i++) {
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 1f10e66069e06f3e90ec9d9c2b84f593 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class Main{
static class FastScanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringT... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | b0dabbdcc25f01f1d779be0c93b24f9c | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
public class Solutions {
// static ArrayList<ArrayList<Integer>>list=new ArrayList<ArrayList<Integer>>();
static FastScanner scr=new FastScanner();
static PrintStream out=new PrintStream(System.out);
public stat... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | f0e47b733d5fb65881d93150b62be221 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class pre459
{
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br =... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 8a2a4c4dc8c323bb816009e1ff23e064 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.util.*;
public class EasternExhibition {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0) {
int n=sc.nextInt();
int[]arr=new int[n];
int[]narr=new int[n];
for(int i=0;i<n;i++) {
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 86392b893a67f9a5ed6bf707d1ab3a0a | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class B {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int t = sc.nextInt();
while(t-- != 0) {
int n = sc.nextInt();
int[] ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 9ad6bb94753c3604122aebd7b053b6d9 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class B {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int t = sc.nextInt();
while(t-- != 0) {
int n = sc.nextInt();
int[] ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | ae44dd7ed5f31a1a5b194808ee8baea0 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
/**
* Coder: SumitRaut
* Date: 27-02-2021 14:23
*/
public class Main {
public static void main(String[] args) throws IOException... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 23715007bd753d30bf4a5d8641bc38d8 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;
public class CodeForcesB {
static class FastReader
{
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | f90ffc0d27efb26d94b155e9d14b53b4 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
FastOutput out = new FastOutput(System.out);
for(int T = sc.nextInt(); T > 0; --T) {
int n = sc.nextInt();
int[] x = new int[n], y = new int... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 5f52f570a65a365cd35275fad641f939 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Scanner;
public class Round703B {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scn = new Scanner(System.in);
int T = scn.nextInt();... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 13cefb4bc3e4cbdbe43787bf65e10cda | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class B1486 {
public static void main(String[] args) throws Exception {
int t = i();
for (int i=0; i<t; i++) {
int n = i();
long[][] coords = new long[2][n];
for (int j=0; j<n; j++) {
coords[0][j] = l(); coords[1][j] = l();
}
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 9fa7948721f7aba7c6d674318a82d756 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.util.Scanner;
import java.io.*;
import javax.lang.model.util.ElementScanner6;
import static java.lang.System.out;
import java.util.Stack;
import java.util.Queue;
import java.util.LinkedList;
public class B1486
{
static int mod=(int)(1e9+7);
static long MOD=(long)(1e... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | abd4b24c97d86511534640a772d6269a | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
public class Eastern_Exibition {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 532fbc175cc51dacc8d7b63df4d7f7c4 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.util.Arrays;
import java.util.Scanner;
public class B703b {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0){
int n = sc.nextInt();
int[] x = new int[n];
int[] y = new int[n];
for(int i=0; i<n; i++){
x[i] = ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 972de9e8671a345b227599d8b49e082a | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
public class pcarp{
static int max_value;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextI... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 3d2868762f5b169ddc04541d1eb58a78 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;
//I give up
public class Main {
public static void main(String[] args) {
// System.in ... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output | |
PASSED | 0900c5155977cbf3d5bb853199521832 | train_110.jsonl | 1613658900 | You and your friends live in $$$n$$$ houses. Each house is located on a 2D plane, in a point with integer coordinates. There might be different houses located in the same point. The mayor of the city is asking you for places for the building of the Eastern exhibition. You have to find the number of places (points with ... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
/**
*
* @Har_Har_Mahadev
*/
public class B {
private static long INF = 2000000000000000000L, M = 1000000007, MM = 998244353;
private static int N = 0;
public static void process() throws IOException {
int n = sc.nextInt();
long x[]... | Java | ["6\n3\n0 0\n2 0\n1 2\n4\n1 0\n0 2\n2 3\n3 1\n4\n0 0\n0 1\n1 0\n1 1\n2\n0 0\n1 1\n2\n0 0\n2 0\n2\n0 0\n0 0"] | 1 second | ["1\n4\n4\n4\n3\n1"] | NoteHere are the images for the example test cases. Blue dots stand for the houses, green — possible positions for the exhibition.First test case.Second test case. Third test case. Fourth test case. Fifth test case. Sixth test case. Here both houses are located at $$$(0, 0)$$$. | Java 8 | standard input | [
"binary search",
"geometry",
"shortest paths",
"sortings"
] | e0a1dc397838852957d0e15ec98d5efe | First line contains a single integer $$$t$$$ $$$(1 \leq t \leq 1000)$$$ — the number of test cases. The first line of each test case contains a single integer $$$n$$$ $$$(1 \leq n \leq 1000)$$$. Next $$$n$$$ lines describe the positions of the houses $$$(x_i, y_i)$$$ $$$(0 \leq x_i, y_i \leq 10^9)$$$. It's guaranteed t... | 1,500 | For each test case output a single integer - the number of different positions for the exhibition. The exhibition can be built in the same point as some house. | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.