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 | f142abb550d2b591098200ffba9fce8f | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;//import static java.lang.System.out;
import static java.lang.System.out;
public class Main {
public static void main(String[] args) throws Exception {
int t = A.nextI... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 61cac5ceae31ae4bfcbf314d63e7fb98 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class LongestString {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
long cases = scanner.nextLong();
scanner.nextLine();
while (cases-- > 0){
int n = scanner.nextInt();
for(int i=2; i<=n... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | b56456bbd5e4b1c6322cde6230063285 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.IOException;
import java.math.BigInteger;
import java.util.*;
public class Solving {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
ArrayList<Long> primes = soe();
StringBuilder str=new StringBuilder();
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 6a7e44f14f87404a1e1e970312dc98a6 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
import javax.swing.plaf.synth.SynthOptionPaneUI;
import java.io.*;
public class ss {
static FastReader fr=new FastReader();
static final Random random=new Random();
static long mod=1000000007L;
static HashMap<String,In... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 6c62d3e6c1b8a0446b1f62e1b175c02b | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
import javax.swing.plaf.synth.SynthOptionPaneUI;
import java.io.*;
public class Solution {
static FastReader fr=new FastReader();
static final Random random=new Random();
static long mod=1000000007L;
static HashMap<String,Integer>map=new HashMap<>();
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 9d787e8961e3d1de33768b94e2d3b582 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Template {
private static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader()
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 9cfeb75c8cc84632d19209f7b18d4dda | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.sql.Array;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
public class CodeForces {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t= sc.nextInt();
while(t-->0){
int n= sc.nextInt();
int []arr=n... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | a3982fc9e9b182bf6123aea050d2ed1f | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
import java.io.*;
public class findArray {
static InputReader ir = new InputReader(System.in);
static PrintWriter pw = new PrintWriter(System.out);
public static void main(String[] args) {
int t = ir.nextInt();
for (int i = 0; i < t; i++) {
solve()... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 2944f67645156e90e267b1029388d938 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class findArray {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int noOfTests = sc.nextInt();
while(noOfTests-->0){
int n = sc.nextInt();
for (int k = 2; k <n+2; k++){
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | fa8a60aa4fbfe146d47dab082170861a | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.ArrayList;
import java.util.Scanner;
public class findArray {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int noOfTests = sc.nextInt();
ArrayList<Integer> a = new ArrayList<>();
int i, j;
boolean flag;
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 5b0d12183bb68fac2e1df35f7c890a40 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class aa{
public static void main(String[] args){
FastReader sc = new FastReader();
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt();
for(int i=2;i<=n+1;i++) {
System... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | e291413980b9453e54e1b159f0a86656 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class make {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t= sc.nextInt();
for(int i=0; i<t; i++){
int n = sc.nextInt();
int[] arr= new int[n];
int count=2;
arr[0]... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 581afb678115e845759578b3c189edfa | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class HelloWorld {
public static void main(String []args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int i = 0; i < t; i++){
int n = sc.nextInt();
for(int j = 2; j <= n + 1; j++){
System.out... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 28dfbc7c742ae8e1d1668e723235bbb8 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.*;
import java.util.*;
public class RoughW2 {
public static void main(String args[]) throws IOException {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int t = 1; t<=T; t++) {
int N = sc.nextInt();
for(int i = 2; i<=... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | e02f4e7b9eaaef6f9bb81027abde7929 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner go = new Scanner(System.in);
int t = go.nextInt();
while (t-->0){
int n = go.nextInt();
int[] a = new int[n];
for (int i = 0; i<n;i++){
a... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 6f7b5256da1c4ba8592c90d3dbcc1874 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes |
// * * * the goal is to be worlds best * * * //
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class A {
static class Pair implements Comparable<Pair>{
int a;
int b;
Pair(int a , int... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 40b99f534b66c6d6bc041a3e9cabb75e | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes |
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.Math.PI;
import static java.lang.Math.min;
import static java.lang.System.arraycopy;
import static java.lang.System.exit;
import static java.util.Arrays.copyOf;
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | bffb4686e64834e9df57efd287605fd4 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class sbr{
public static void main(String args[]){
Scanner s=new Scanner(System.in);
int t=s.nextInt();
while(t-->0){
int n=s.nextInt();
int count=2;
while(n-->0){
System.out.print(count+" ");
count++;
}
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 5c7a91b2ef210e80f24044d1ac7c646d | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class A {
public static void main(String[] args) throws Exception {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
boolean[] prime = new boolean[1000006];
int n = prime.length-1;
for(int i=0;i<=n;i++)
prime[i] ... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | d2396cac01d3f7fa8a9fc99f290a67fa | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
new Main().run();
}
void run() {
try (BufferedReader in = new BufferedReader(new InputStreamReader... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 38b365ac8479e9fac5bbccd6c8207b54 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
import java.lang.*;
public class Main
{
public static void main (String[] args) //throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt(),n;
while(t-- >0){
n=sc.nextInt();
int i=2;
for(;n>0;i++,n--)
System.out.print(i+" ");
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | c9fab20f5220df6a5c8f4a0b1ed3dce0 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt();
if(n==1){
System.out.print(1);
}
if(n>1){
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | c3839004f7066884dda8aef423541419 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < t; i++) {
int n = in.nextInt();
for (int j... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 2a602eb9760c221db030d184837a7254 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class Solution{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int i=0;i<t;i++)
{
int n=sc.nextInt();
for(int j=1;j<=n;j++)
{
System.out.... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 29addb49175504c59c53f10df512c8be | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class div2 {
public static void main(String[] args) throws IOException {
Reader sc=new Reader();
int t=sc.nextInt();
boolean prime[] = new boolean[1000001];
for (int i = 0; i < prime.length; i++)
prime[i] = true;
for... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 1fb4da5e8e691f329ec0c9f77188e0fe | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.*;
import java.util.StringTokenizer;
public class contest {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
PrintWriter out=new PrintWriter(System.out);
while(t-->0){
int n... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 9c18c2ddefd58e6e6f5a9e8963bde483 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | //package contests;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import static java.lang.System.out;
import java.util.* ;
import java.math.*;
import java.io.*;
public class javaTemplate {
public static final int M = 1000000007 ;
public static B... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | a1f980f1337c3b0d124f95d9e7cf3ea2 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Solution {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new Stri... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 62e12713e0990bd8819a3dbc7a8d5bc8 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | /*package whatever //do not write package name here */
import java.util.*;
public class GFG {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0){
int n = sc.nextInt();
if(n==1)
{
System.out.println(1);
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | cfaa6dfe2ee010d16ec71798971d5624 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes |
import java.util.*;
import java.io.*;
public class CF758A {
public static void main(String[] args) {
FastReader fastReader = new FastReader();
int t = fastReader.nextInt();//test cases count
while(t-->0) {
int n = fastReader.nextInt();
if(n==1) {
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 5b5fa56bc8d026187614a8792e27ad09 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.*;
import java.lang.*;
public class problemA{
public static void main(String[] args) throws Exception{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int t=Integer.parseInt(br.readLine());
StringBuilder sb=new StringBuilder();
while(t-->... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | c35ef93965f890b324d32dc3643787d4 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.*;
import java.util.*;
public class CF_748_1 {
public static void main(String[] args){
FastReader sc = new FastReader();
int t = sc.nextInt();
while(t-- > 0){
int n = sc.nextInt();
//int[] arr = new int [n];
for(int i = 2; i <= n+1;... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | d73c5d82ac5ffa485bc36bdf82dd2dd5 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class pr1{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int i=0;i<t;i++){
int n=sc.nextInt();
for(int j=2;j<=n+1;j++){
System.out.print(j+" ");
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 3946540494413e9908a50e7e3fe3e016 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
import java.io.*;
public class A_Find_Array{
public static void main(String[] args) throws Exception {
FastReader scan = new FastReader(System.in);
int testCases = scan.nextInt();
while(testCases-->0){
int size = scan.nextInt();
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 28fb485db786a6a55997253bee75fd83 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.io.*;
import java.util.*;
import java.text.DecimalFormat;
import java.math.*;
public class Main {
static int mod = 1000000007;
/***********... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | c1270b198cc14f1f88a1346b2e8782f1 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.*;
public class MyClass {
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){
String s="";
int n=Integer.parseInt(... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 4332721f093cd33577119f02dbabc62e | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | /* JAIKARA SHERAWAALI DA BOLO SACHE DARBAR KI JAI
HAR HAR MAHADEV JAI BHOLENAATH
Rohit Kumar
NIT JAMSHEDPUR
*/
import java.util.*;
import java.io.*;
public class Main
{
static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader(){
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 9f6ee508a9e09c371c6eec3e660b6aab | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes |
import java.util.*;
public class Codeforces {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
while(sc.hasNext()) {
int t = sc.nextInt();
while(t-->0) {
int n = sc.nextInt();
StringBuilder ss = new StringBuilder();
ss.append(n +" ");
long val = n+1;
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 9a0e26fd2141720128cdd14bac5f2ad1 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class MainT {
public static Scanner read = new Scanner(System.in);
public static void main(String[] args) {
int t = read.nextInt();
while (t-->0) {
solve();
}
}
private static void solve() {
int n = read.nextInt();
long s = 2;
for (int i = 0; i < n; ... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | b80258161c5feff740cb51941cabe8de | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*; import java.io.*; import java.math.*;
public class Main{
//見なくていいよ ここから------------------------------------------
static class InputIterator{
ArrayList<String> inputLine = new ArrayList<>(buf);
int index = 0; int max; String read;
InputIterator(){
BufferedReader br = new BufferedRe... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 3ac826e25576abf6a8259e63ec04ce06 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Gp {
static class FastReader {
BufferedReader br;
StringToke... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 662a484a3ca0811d2f129c04b7f70ff3 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | // HOPE
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 07238a315269a89bfe1b2a3bf88ce1a4 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;
import java.io.*;
public class Main {
// Graph
// prefix sums
//inputs
public static void main(String args[])throws Exception{
Input sc=new Input();
precalcul... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 614b30175c93e29b8a6ff45342b5f505 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import com.sun.security.jgss.GSSUtil;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
public class javacp{
static FastReader fs=new FastReader();
static class FastReader{
BufferedReader br;
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | a5e6a2d1084cf887ff310c518c625c04 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;
/**
*
* @author eslam
*/
public class JavaApplication916 {
static class FastReader {
BufferedR... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 7f645aeafc32730470554f3ff7e3e8f7 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes |
import java.io.*;
import java.math.*;
import java.util.*;
// @author : Dinosparton
public class test {
static class Pair{
long x;
long y;
Pair(long x,long y){
this.x = x;
this.y = y;
}
}
static class Duo{
int x;
String s;... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | c03ad76725203e79b6e1ee426bcc58b0 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
// ArrayList<Integer> al = new ArrayList<>();
// ArrayList<Pair<Integer, Integer>> al = new ArrayList<>();
// Set<Integer> set = new TreeSet<>();
// Pair<Integer, Integer> pair;
// Map<Integer, Integer> map = new HashMap<... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 741fd87b7b15d6d489e82e4fae004ea0 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class SolveJava{
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int ts = in.nextInt();
while(ts-- > 0){
int n = in.nextInt();
for(int i = 12 ; i < n+12 ; i++){
System.out.pri... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 7d61f6e040b9171515eb1fa96be8008e | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
import java.io.*;
public class A_Find_Array{
public static void main(String[] args) {
try {
FastReader in = new FastReader();
FastWriter out = new FastWriter();
int testCases = in.nextInt();
while(testCases-- > 0){
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | c398c86cbafaf34b3df64b93ef5bd1df | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
import java.lang.Math;
public class CF2609{
public static void main(String[] args) throws Exception{
Scanner scan = new Scanner(System.in);
int testCases = scan.nextInt();
while(testCases > 0){
int arrayLength = scan.nextInt();
for(int i=2; i<arrayLength+2; i++){
Sys... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | e9c9cdae145f6822f810b24f7a6b2e0d | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes |
import java.io.*;
import java.util.*;
public class Solution {
public static long gcd(long a,long b) {
if(a==0) return b;
return gcd(b%a,a);
}
public static long lcm(long a,long b) {
return (a*b)/gcd(a,b);
}
public static void main(String[] args) throws java.lang.Exception {
BufferedReade... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | d8927937670754f62a048e1be6523292 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.DataInputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
public class Main {
private static void run() throws IOException {
int n = in.nextInt();
for (int i = 0; i < n; i++) {
out.print(i + 2);
out... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 418726f72d690f47ede62fbf28f97623 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner in = new Scanner( Syste... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 936903a29b4b3359bc2704602c9d05df | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class Main {
static long gcd(long a,long b){
if ( b==0)
return a;
return gcd(b,a%b);
}
static long lcm(long a,long b){
return (a*b)/gcd(a,b);
}
static Scanner sc = new Scanner(System.in);
public static void main(Stri... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 4f422c7696649af6241d249ed5713f15 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner in = new Scanner(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(System.out);
int T = in.nextInt();
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 30914e5cf728c0fa24a21d460a7e23e9 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class FindArray {
public static void printArray(int n){
for (int i = 2; i <= n+1 ; i++) {
System.out.print(i + " ");
}
System.out.println();
}
public static void main(String[] args) {
Scanner input = new Scanner(System... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 3c75adf0d827622d3c37fbd2dbbacd3b | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class Main{
public static void main(String args[]){
Scanner cin = new Scanner(System.in);
int t = cin.nextInt();
for (int i = 1; i<= t; i++){
int n = cin.nextInt();
for (int j = 2; j<= n+1; j++){
System.out.print(j);
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | a063eb3034bd175ddbc4d2b439609af4 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.io.*;
import java.lang.*;
import java.util.*;
public class ComdeFormces {
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
// Reader.init(System.in);
FastReader sc=new FastReader();
BufferedWriter log = new BufferedWriter(new OutputStreamWriter(Sys... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | f9d0188d8248718c42a00958bff12707 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | //jiudge: 5571: 1648100913
import java.util.Scanner;
public class G {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
for(int i = 1; i <= N; i ++ ) {
int n = sc.nextInt();
int[] array = new int[n];
for(int j = 0; j < n; j ++ ) {
array[j] = j + ... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 45d6b20b6e8b7da1bf6df4157181a088 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | 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 A_Find_Array {
public static void main(String[] args) {
OutputStream outputStream = System.out;
PrintWriter ou... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 9de3c922d88ef9b1c823148ee4b287cb | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import java.io.*;
import java.util.*;
public class Solution {
static int mod=(int)1e9+7;
static long h[],add[];
public static void main(String[] args) {
Copied io = new Copied(System.in, ... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 277178a330ff51667a029688de601751 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int k = input.nextInt();
while (k-- != 0) {
int n = input.nextInt();
if (n == 1) System.out.println(1);
else {
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 898f9aee903e61c4d090ac6b720da364 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes |
import static java.lang.System.out;
import java.util.*;
public class JavaApplication16 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int T = s.nextInt();
while(T-- > 0){
int n = s.nextInt();
out.print(2 + " ");
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 9f91cbe0131f4bc5f225a47db03ab5cc | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class FindArray {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-- > 0) {
int size = sc.nextInt();
int n = 2;
for(int i = 0; i < size; i++) {
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 9ba8eda2c801ce1810991628a5238857 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class codeForce2 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
while(t>0) {
int n = s.nextInt();
int f = 2;
int s1 = 3;
int arr[] = new int[n];
if(n == 1) {
System.out.println('1');
}else... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 619571b1da47fbf3d0f1dae00a5e83fc | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | /* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Sca... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 72f756b245f455d1d68cde566505bb3a | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | //package com.shroom;
import java.util.*;
public class dec {
private static final Scanner in = new Scanner(System.in);
public static void main(String[] args) throws Exception {
//
int t = in.nextInt();
//
while (t-- > 0) {
int n = in.nextInt();
int[] arr =... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 11 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 06bd1fc50c0d912002ca39b9332fc00b | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class A1608 {
private static final Scanner input = new Scanner(System.in);
public static void main(String[] args) {
final int t = input.nextInt();
for (int i = 0; i < t; i++) {
final int n = input.nextInt();
System.out.println(solve(n));
... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 17 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 8867fa274fd63d2602a18d1e4149f0c3 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class Codeforces {
public static void main(String[] args) {
Scanner lta = new Scanner(System.in);
int t = lta.nextInt();
while (t-- > 0){
int n = lta.nextInt();
for (int i = n;i < n + n;i++){
System.out.print(i + ... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 17 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 4c03dc49ed9380cfd94aceee56c7a749 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
public class Codeforces {
public static void main(String[] args) {
Scanner lta = new Scanner(System.in);
int t = lta.nextInt();
while (t-- > 0){
int n = lta.nextInt();
for (int i = n;i < n + n;i++){
System.out.print(i + " ... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 17 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | c3582a9d3051c97248649245c0195926 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
public class main{
public static void main(String [] args){
Scanner in = new Scanner(System.in);
int nt, n, i;
nt = in.nextInt();
while(nt > 0){
n = in.nextInt();
i = 2;
while(n > 0){
System.out.print(i + " ");
i ++;
n --;
}
System.out.println(... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 17 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | d6ed8661a1fae8f4de0ba199e9010e31 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int tc = 0; tc < t; ++tc) {
int n = sc.nextInt();
System.... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 17 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | fe93f7a03a1e0bbeabbf2bd185c78ff0 | train_109.jsonl | 1639217100 | Given $$$n$$$, find any array $$$a_1, a_2, \ldots, a_n$$$ of integers such that all of the following conditions hold: $$$1 \le a_i \le 10^9$$$ for every $$$i$$$ from $$$1$$$ to $$$n$$$.$$$a_1 < a_2 < \ldots <a_n$$$For every $$$i$$$ from $$$2$$$ to $$$n$$$, $$$a_i$$$ isn't divisible by $$$a_{i-1}$$$It can be sh... | 256 megabytes | import java.util.*;
import java.util.function.*;
import java.io.*;
// you can compare with output.txt and expected out
public class Round758A {
MyPrintWriter out;
MyScanner in;
// final static long FIXED_RANDOM;
// static {
// FIXED_RANDOM = System.currentTimeMillis();
// }
final static String IMPO... | Java | ["3\n1\n2\n7"] | 1 second | ["1\n2 3\n111 1111 11111 111111 1111111 11111111 111111111"] | NoteIn the first test case, array $$$[1]$$$ satisfies all the conditions.In the second test case, array $$$[2, 3]$$$ satisfies all the conditions, as $$$2<3$$$ and $$$3$$$ is not divisible by $$$2$$$.In the third test case, array $$$[111, 1111, 11111, 111111, 1111111, 11111111, 111111111]$$$ satisfies all the condit... | Java 17 | standard input | [
"constructive algorithms",
"math"
] | 76bfced1345f871832957a65e2a660f8 | The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). Description of the test cases follows. The only line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 1000$$$). It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^4$$$. | 800 | For each test case print $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ — the array you found. If there are multiple arrays satisfying all the conditions, print any of them. | standard output | |
PASSED | 8c6ef1b9c452677fb50dd658c4a78427 | train_109.jsonl | 1639217100 | On an endless checkered sheet of paper, $$$n$$$ cells are chosen and colored in three colors, where $$$n$$$ is divisible by $$$3$$$. It turns out that there are exactly $$$\frac{n}{3}$$$ marked cells of each of three colors! Find the largest such $$$k$$$ that it's possible to choose $$$\frac{k}{3}$$$ cells of each colo... | 256 megabytes | import java.io.*;
import java.util.*;
public class Solution extends PrintWriter {
int[][] perm = new int[][] {{0,1,2},{0,2,1},{1,0,2},{1,2,0},{2,0,1},{2,1,0}};
void solve() {
n = sc.nextInt();
cells = new int[n][];
for(int i = 0; i < n; i++) {
cells[i] ... | Java | ["9\n2 3 1\n4 1 2\n2 1 3\n3 4 1\n5 3 2\n4 4 3\n2 4 1\n5 2 2\n3 5 3", "3\n1 1 1\n2 2 2\n3 3 3"] | 2 seconds | ["6", "3"] | NoteIn the first sample, it's possible to leave $$$6$$$ cells with indexes $$$1, 5, 6, 7, 8, 9$$$.In the second sample, it's possible to leave $$$3$$$ cells with indexes $$$1, 2, 3$$$. | Java 11 | standard input | [
"binary search",
"implementation",
"sortings"
] | 1e9e504e6a2a9cef8d9946aae512a388 | The first line of the input contains a single integer $$$n$$$ — the number of the marked cells ($$$3 \leq n \le 10^5$$$, $$$n$$$ is divisible by 3). The $$$i$$$-th of the following $$$n$$$ lines contains three integers $$$x_i$$$, $$$y_i$$$, $$$c_i$$$ ($$$|x_i|,|y_i| \leq 10^9$$$; $$$1 \leq c_i \leq 3$$$), where $$$(x_i... | 2,800 | Output a single integer $$$k$$$ — the largest number of cells you can leave. | standard output | |
PASSED | 2ee71d5d1254bf1d3177a5780e33c967 | train_109.jsonl | 1639217100 | On an endless checkered sheet of paper, $$$n$$$ cells are chosen and colored in three colors, where $$$n$$$ is divisible by $$$3$$$. It turns out that there are exactly $$$\frac{n}{3}$$$ marked cells of each of three colors! Find the largest such $$$k$$$ that it's possible to choose $$$\frac{k}{3}$$$ cells of each colo... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.StringTokeniz... | Java | ["9\n2 3 1\n4 1 2\n2 1 3\n3 4 1\n5 3 2\n4 4 3\n2 4 1\n5 2 2\n3 5 3", "3\n1 1 1\n2 2 2\n3 3 3"] | 2 seconds | ["6", "3"] | NoteIn the first sample, it's possible to leave $$$6$$$ cells with indexes $$$1, 5, 6, 7, 8, 9$$$.In the second sample, it's possible to leave $$$3$$$ cells with indexes $$$1, 2, 3$$$. | Java 11 | standard input | [
"binary search",
"implementation",
"sortings"
] | 1e9e504e6a2a9cef8d9946aae512a388 | The first line of the input contains a single integer $$$n$$$ — the number of the marked cells ($$$3 \leq n \le 10^5$$$, $$$n$$$ is divisible by 3). The $$$i$$$-th of the following $$$n$$$ lines contains three integers $$$x_i$$$, $$$y_i$$$, $$$c_i$$$ ($$$|x_i|,|y_i| \leq 10^9$$$; $$$1 \leq c_i \leq 3$$$), where $$$(x_i... | 2,800 | Output a single integer $$$k$$$ — the largest number of cells you can leave. | standard output | |
PASSED | 98d216b03d5d94c0754e1adb3d8dfad6 | train_109.jsonl | 1639217100 | On an endless checkered sheet of paper, $$$n$$$ cells are chosen and colored in three colors, where $$$n$$$ is divisible by $$$3$$$. It turns out that there are exactly $$$\frac{n}{3}$$$ marked cells of each of three colors! Find the largest such $$$k$$$ that it's possible to choose $$$\frac{k}{3}$$$ cells of each colo... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.StringTokeniz... | Java | ["9\n2 3 1\n4 1 2\n2 1 3\n3 4 1\n5 3 2\n4 4 3\n2 4 1\n5 2 2\n3 5 3", "3\n1 1 1\n2 2 2\n3 3 3"] | 2 seconds | ["6", "3"] | NoteIn the first sample, it's possible to leave $$$6$$$ cells with indexes $$$1, 5, 6, 7, 8, 9$$$.In the second sample, it's possible to leave $$$3$$$ cells with indexes $$$1, 2, 3$$$. | Java 11 | standard input | [
"binary search",
"implementation",
"sortings"
] | 1e9e504e6a2a9cef8d9946aae512a388 | The first line of the input contains a single integer $$$n$$$ — the number of the marked cells ($$$3 \leq n \le 10^5$$$, $$$n$$$ is divisible by 3). The $$$i$$$-th of the following $$$n$$$ lines contains three integers $$$x_i$$$, $$$y_i$$$, $$$c_i$$$ ($$$|x_i|,|y_i| \leq 10^9$$$; $$$1 \leq c_i \leq 3$$$), where $$$(x_i... | 2,800 | Output a single integer $$$k$$$ — the largest number of cells you can leave. | standard output | |
PASSED | 10fd891603ef0bc32b62c17a228f43cb | train_109.jsonl | 1639217100 | On an endless checkered sheet of paper, $$$n$$$ cells are chosen and colored in three colors, where $$$n$$$ is divisible by $$$3$$$. It turns out that there are exactly $$$\frac{n}{3}$$$ marked cells of each of three colors! Find the largest such $$$k$$$ that it's possible to choose $$$\frac{k}{3}$$$ cells of each colo... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper... | Java | ["9\n2 3 1\n4 1 2\n2 1 3\n3 4 1\n5 3 2\n4 4 3\n2 4 1\n5 2 2\n3 5 3", "3\n1 1 1\n2 2 2\n3 3 3"] | 2 seconds | ["6", "3"] | NoteIn the first sample, it's possible to leave $$$6$$$ cells with indexes $$$1, 5, 6, 7, 8, 9$$$.In the second sample, it's possible to leave $$$3$$$ cells with indexes $$$1, 2, 3$$$. | Java 8 | standard input | [
"binary search",
"implementation",
"sortings"
] | 1e9e504e6a2a9cef8d9946aae512a388 | The first line of the input contains a single integer $$$n$$$ — the number of the marked cells ($$$3 \leq n \le 10^5$$$, $$$n$$$ is divisible by 3). The $$$i$$$-th of the following $$$n$$$ lines contains three integers $$$x_i$$$, $$$y_i$$$, $$$c_i$$$ ($$$|x_i|,|y_i| \leq 10^9$$$; $$$1 \leq c_i \leq 3$$$), where $$$(x_i... | 2,800 | Output a single integer $$$k$$$ — the largest number of cells you can leave. | standard output | |
PASSED | c3629a0e13549979b6acd2904f0af950 | train_109.jsonl | 1639217100 | On an endless checkered sheet of paper, $$$n$$$ cells are chosen and colored in three colors, where $$$n$$$ is divisible by $$$3$$$. It turns out that there are exactly $$$\frac{n}{3}$$$ marked cells of each of three colors! Find the largest such $$$k$$$ that it's possible to choose $$$\frac{k}{3}$$$ cells of each colo... | 256 megabytes | import java.io.*;
import java.util.HashMap;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class E {
static long[][][][] cells;
static long[][] lims;
public static boolean check(int mid, int mask) {
if (mask == 7)
return true;
// ... | Java | ["9\n2 3 1\n4 1 2\n2 1 3\n3 4 1\n5 3 2\n4 4 3\n2 4 1\n5 2 2\n3 5 3", "3\n1 1 1\n2 2 2\n3 3 3"] | 2 seconds | ["6", "3"] | NoteIn the first sample, it's possible to leave $$$6$$$ cells with indexes $$$1, 5, 6, 7, 8, 9$$$.In the second sample, it's possible to leave $$$3$$$ cells with indexes $$$1, 2, 3$$$. | Java 8 | standard input | [
"binary search",
"implementation",
"sortings"
] | 1e9e504e6a2a9cef8d9946aae512a388 | The first line of the input contains a single integer $$$n$$$ — the number of the marked cells ($$$3 \leq n \le 10^5$$$, $$$n$$$ is divisible by 3). The $$$i$$$-th of the following $$$n$$$ lines contains three integers $$$x_i$$$, $$$y_i$$$, $$$c_i$$$ ($$$|x_i|,|y_i| \leq 10^9$$$; $$$1 \leq c_i \leq 3$$$), where $$$(x_i... | 2,800 | Output a single integer $$$k$$$ — the largest number of cells you can leave. | standard output | |
PASSED | 1df920d8ac29add164f9f7b93951ca14 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.io.*;
import java.util.*;
public class MainClass{
public static void main(String[] args) throws IOException{
if (System.getProperty("ONLINE_JUDGE") == null) {
PrintStream ps = new PrintStream(new File("output.txt"));
InputStream is = new FileInputStream("input.txt");
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | cdd400fa3fec527649575be779d22796 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;
public class A {
static FastScanner fs = new FastScanner();
public static void main(String[] args) {
// int tc = 1;
int tc... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | 2bc0f30cc7454637c03df4268066a24a | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | /*package whatever //do not write package name here */
import java.util.*;
import java.lang.*;
import java.io.*;
public class codeforces {
static Scanner sc=new Scanner(System.in);
static void solve(){
int n=sc.nextInt();
int[] arr=new int[n];
for(int i=0;i<n;i++){
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | dcef68d0f1623643c0c5fe268860dc9d | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
while(t-->0){
int n = s.nextInt();
int[] d = new int[n];
int[] a = new int[n];
for(in... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | 3082c42324be14937d8313889f352687 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | /*
⣿⣿⣿⣿⣿⣿⡷⣯⢿⣿⣷⣻⢯⣿⡽⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠸⣿⣿⣆⠹⣿⣿⢾⣟⣯⣿⣿⣿⣿⣿⣿⣽⣻⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣻⣽⡿⣿⣎⠙⣿⣞⣷⡌⢻⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⡄⠹⣿⣿⡆⠻⣿⣟⣯⡿⣽⡿⣿⣿⣿⣿⣽⡷⣯⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿⣿⡀⠹⣟⣾⣟⣆⠹⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡘⣿⣿⡄⠉⢿⣿⣽⡷⣿⣻⣿⣿⣿⣿⡝⣷⣯⢿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣯⢿⣾⢿⣿⡄⢄⠘⢿⣞⡿⣧⡈⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣧⠘⣿⣷⠈⣦⠙⢿⣽⣷⣻⣽⣿⣿⣿⣿⣌⢿⣯⢿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣯⣿⢿⣿⡆⢸⡷⡈⢻⡽⣷⡷⡄⠻⣽⣿⣿⡿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣏⢰⣯⢷... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | e1b83cb6be75936e2d481d4772615c1d | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes |
import java.util.ArrayList;
import java.util.Scanner;
public class ArrayRecovery {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
for (int i = 0; i < t; i++) {
int size = scanner.nextInt();
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | 4a977dd12046b2a44808e46c41f044dd | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | // package CODEFORCES;
import java.lang.reflect.Array;
import java.util.*;
public class ChienThan {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int t = sc.nextInt();
outer : for(int k=0;k<t;k++){
int n= sc.nextInt();
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | bc71d6465fc797a80989e2a34aae3d88 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.util.Scanner;
public class Restore {
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();
int[] d = new int[n];
for (int j = 0; j <... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | f9449e32066efe1dfb6a011618f30853 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class Robot3 {
public static void main(String[] args) {
Scanner ss = new Scanner(System.in);
int n = ss.nextInt();
outer: for (int i = 0; i <n ; i++) {
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | e04cbef19654f178d5f8ff5856feba65 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class Robot3 {
public static void main(String[] args) {
Scanner ss = new Scanner(System.in);
int n = ss.nextInt();
outer: for (int i = 0; i <n ; i++) {
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | ace09abbdec937dbef4106eafac8a2e0 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class Robot3 {
public static void main(String[] args) {
Scanner ss = new Scanner(System.in);
int n = ss.nextInt();
outer: for (int i = 0; i <n ; i++) {
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | c6c69af031a405b485a6519b4ce0da89 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.util.*;
import java.io.*;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.math.BigInteger;
public class Main{
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | 1ed422bb97edb65aef5ef497445d0334 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import com.sun.security.jgss.GSSUtil;
import com.sun.source.tree.ModuleTree;
import org.w3c.dom.ls.LSOutput;
import java.io.*;
import java.security.spec.RSAOtherPrimeInfo;
import java.sql.Array;
import java.util.*;
public class edu130 {
static class FastReader {
BufferedReader br;
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | bbf6b5220062a17694b3a0139492b003 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
public static Scanner obj = new Scanner(System.in);
public static PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) {
int len = obj.nextInt();
while (len-- != 0) {
int n=obj.nextInt();
int[] a=new int... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | 51fba63a09437c30a2b39dea190dfdb5 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.util.*;
public class ProblemA {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0){
int n = sc.nextInt();
int[] d = new int[n];
for(int i=0;i<n;i++){
d... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | 787a3b0c5487c4b29e04fdaeecd6467d | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.io.*;
import java.util.*;
public class cf {
public static long gcd(long a, long b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
public static boolean isok(long x, long h, long k) {
long sum = 0;
if (h > k) {
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | 23e65f4f720875e255614cf18c17e67e | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | /* package codechef; // don't place package name! */
import java.util.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public final class Solution
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner n1;
try {
n1 = new Scanner(ne... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | 3adf82f70500f462ad79f29c666970b9 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
{
static long mod = (int)1e9+7;
static PrintWriter out=new PrintWriter(new BufferedOutputStream(System.out));
public static void main (String[] args) throws java.lang.Exception
{
FastReader sc =new FastReader(... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | bb1080abfd131c69b0c9e94096f600ba | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | /******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run a... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | 66f8ce98d211e85c4d577228de319d63 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.util.Iterator;
import java.util.Scanner;
public class CF1739B {
abstract class ASolver<R> {
protected IResult<R> mresultCallBack;
protected R ans;
public void solve(Object... data) {
mresultCallBack = (IResult<R>)data[0];
}
public void getAnswer() {
mresultCallBack.resultC... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | a6a04ee4ff36f760b7797948764a9156 | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.util.*;
public class codeforces_solution{
public static void main(String []args){
try (var in = new Scanner(System.in)) {
int t = in.nextInt();
while(t-- > 0){
int n=in.nextInt();
int arr[]=new int[n];
for (int i = 0; i < n; i++) {
arr[i]=in.nextInt();
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output | |
PASSED | b98a5f8588c24a1833b869115c3a9e8d | train_109.jsonl | 1664462100 | For an array of non-negative integers $$$a$$$ of size $$$n$$$, we construct another array $$$d$$$ as follows: $$$d_1 = a_1$$$, $$$d_i = |a_i - a_{i - 1}|$$$ for $$$2 \le i \le n$$$.Your task is to restore the array $$$a$$$ from a given array $$$d$$$, or to report that there are multiple possible arrays. | 256 megabytes | import java.util.*;
public class A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(;t>0;t--) {
int n=sc.nextInt();
int[] a = new int[n];
for(int i=0;i<n;i++) a[i]=sc.nextInt();
... | Java | ["3\n\n4\n\n1 0 2 5\n\n3\n\n2 6 3\n\n5\n\n0 0 0 0 0"] | 2 seconds | ["1 1 3 8\n-1\n0 0 0 0 0"] | NoteIn the second example, there are two suitable arrays: $$$[2, 8, 5]$$$ and $$$[2, 8, 11]$$$. | Java 11 | standard input | [
"constructive algorithms",
"greedy",
"math"
] | f4b790bef9a6cbcd5d1f9235bcff7c8f | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The first line of each test case contains one integer $$$n$$$ ($$$1 \le n \le 100$$$) — the size of the arrays $$$a$$$ and $$$d$$$. The second line contains $$$n$$$ integers $$$d_1, d_2, \dots, d_n$$$ ($$$0 \le d_i \le ... | 1,100 | For each test case, print the elements of the array $$$a$$$, if there is only one possible array $$$a$$$. Otherwise, print $$$-1$$$. | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.