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 | bd82e7bd316a49a24700ed15bc8c433e | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Prior... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | faacd0d03241a7cf5d3e3bb4f515433f | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
public class Solution {
static MyScanner str = new MyScanner();
// static Scanner str = new Scanner(System.in);
public static void main(String[] args) t... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 70018783314388d2d0bea4c786507b93 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
public class Solution {
// static MyScanner str = new MyScanner();
static Scanner str = new Scanner(System.in);
public static void main(String[] args) t... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 90dd4fc6bca46778aea1a3fc6dea0016 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
public class Solution {
// static MyScanner str = new MyScanner();
static Scanner str = new Scanner(System.in);
public static void main(String[] args) t... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 4ffe29132b663110c41fc0b5716c1c53 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | /*############################################################################################################
########################################## >>>> Diaa12360 <<<< ###############################################
########################################### Just Nothing ###################################... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 23e11b0e95f5902a33a60c0ea786e3b5 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | /*############################################################################################################
########################################## >>>> Diaa12360 <<<< ###############################################
########################################### Just Nothing ###################################... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | bf2ef8ed407384f88a051e163d62b3e1 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | /* || श्री राम समर्थ ||
|| जय जय रघुवीर समर्थ ||
*/
import java.io.*;
import java.util.*;
import static java.util.Arrays.sort;
public class CodeforcesTemp {
static Reader scan = new Reader();
static FastPrinter out ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 67b9dc4f39f91fe8af4f7f8b4d6e60d2 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | /* || श्री राम समर्थ ||
|| जय जय रघुवीर समर्थ ||
*/
import java.io.*;
import java.util.*;
import static java.util.Arrays.sort;
public class CodeforcesTemp {
static Reader scan = new Reader();
static FastPrinter out ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 9fb17332e3553609a2114031ed1879f9 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class MainG {
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStream... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 27250c6455528d1d1ab5266885505b4f | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | // package faltu;
import java.util.*;
import java.util.Map.Entry;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Print... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | a24d07b3871ecfc2ffda6e5990eb5188 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
// Mahakal
// Remainder: Agar ni ban raha to demotivate ni hona. Yehi chance hai sikhne ka.
import java.util.*;
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.Strin... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 7661ecfa4f4642462944388cbb3f93bc | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
// Mahakal
// Remainder: Agar ni ban raha to demotivate ni hona. Yehi chance hai sikhne ka.
import java.util.*;
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringT... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 8103fed6cf21fff856a2bf326fe59af8 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main{
//
static class MyScanner {
BufferedReader br;
StringTokenizer st;
public MyScanner() {
br = new BufferedReader(new InputStream... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 4f279b2a3d751619cac8b5b120caf041 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class CF_div4_G {
static FastReader sc;
static void solve() {
StringBuilder res = new StringBuilder();
int n = sc.nextInt();
int[] arr = new int[n];
int xor = 0;
for (int i = 0; i < n - 3; i++) {
arr[i... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | fa30ba0cb47cada9ec07742ba7a0c1ab | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class CF_div4_G {
static FastReader sc;
static void solve() {
StringBuilder res = new StringBuilder();
int n = sc.nextInt();
int[] arr = new int[n];
int c = 1;
for (int i = 0; i < n; i++) {
if (i % 2 =... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 2ad186a93abbbb440a859238de3a7ed0 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
public class CF1
{
static FastReader sc=new FastReader();
// static long dp[][];
// static boolean v[][][];
// static int mod=998244353;;
// static int mod=1000000007;
static long oset[];
static int oset_p;
static long... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 91432bd85fd0412fd3c77aa248c66e41 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Main {
static class Node {
int depth;
int num;
boolean used;
Node left, right;
public Node() {
this.depth = 0;
this.used = false;... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | b0dc480992a3f591c744048933888025 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
public class cfContest1722 {
public static boolean isset(int n,
int k) {
k += 1;
if ((n & (1 << (k - 1))) > 0) {
return true;
} else {
return false;
}
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 3cbb80ad20571b60b26c74fafa389dad | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class codeforces1722G {
public static void main(String[] args) throws Exception {
FastScanner in = new FastScanner();
PrintWriter pw = new PrintWriter(System.out);
int numCases = in.nextInt();
while (numCases-->0)
{
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 6360db7efd300f8cbb014b936f985ee8 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
public class p5
{
BufferedReader br;
StringTokenizer st;
BufferedWriter bw;
public static void main(String[] args)throws Exception
{
new p5().run();
}
void run()throws IOException
{
br = new BufferedReader(new InputStreamReader(System.in));
bw=new Bu... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | a0ad24c44771301d77f2c9f04e7cc33c | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;
public class Main {
// static int [] arr;
// static boolean prime[] = new boolean[1000];
// static int l;
// static String s; static StringBuilder sb;
// static HashSet<L> hs;
// static HashSet<Long> hs = ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 46ae92dd18b71d25b5d18b60f66fa381 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class HarHarShambhu{
static Scanner in=new Scanner();
static long systemTime;
static long mod = 1000000007;
//static ArrayList<ArrayList<Integer>> adj;
static int seive[]=new int[1000001];
sta... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 199e3415e58fe085c4eda4026a216b7a | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static Scanner sc;
static PrintWriter pw;
public static void main(String[] args) throws IOException {
sc = new Scanner(System.in);
pw = new PrintWriter(System.out);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
i... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 94bb8903273386d2f24f81585ec56fd2 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static Scanner sc;
static PrintWriter pw;
public static void main(String[] args) throws IOException {
sc = new Scanner(System.in);
pw = new PrintWriter(System.out);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
i... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 6779fbc8352141ec2c7e416dd8d7b488 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
static int N = 1010;
public static void main(String[] args) throws IOException {
FastScanner f = new FastScanner();
PrintWriter w = new PrintWriter(System.out);
int T = f.nextInt();
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | fe6e89f2d0af72432b039ba015b692ac | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | /*
I am dead inside
Do you like NCT, sKz, BTS?
5 4 3 2 1 Moonwalk
Imma knock it down like domino
Is this what you want? Is this what you want?
Let's ttalkbocky about that :()
*/
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class x1722G
{
static final int INF = Integer... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 0605a16f3bf62e9ba910a250fceb2d77 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.Closeable;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.time.Clock;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.BiFunction... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 9aeca60c21a385ea699276955c08f828 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class EvenOddXOR {
public static void main(String[] args) throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
PrintWri... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 1e5b5abf503b7ec9cfe4ed09c2c44c82 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.Scanner;
public class _EvenOddXOR_ {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
while (t > 0) {
solve(scanner);
t--;
if(t>1) {
System.out.println... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 6d25283211ce691e3a167f60c617c302 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class Solution{
static Scanner sc;
static PrintWriter pw;
public static void solve(int n) {
long xor1=0;
long xor2=0;
for(int i=0;i<n-2;i++) {
xor1^=i;
xor2^=i+1;
}
if(xor1!=0) {
for(int i=0;i<n-2;i++)
pw.print(i+" ");
lo... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 75eca8ceb852b06dc0685b533853a6e9 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
public class CodeForces {
/*-------------------------------------------EDITING CODE STARTS HERE-------------------------------------------*/
public static void solve(int tCase) throws IOException {
int n = sc.nextInt();
List<Integer> left = new ArrayList<>()... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | c8ae6fdb825ffa843cc8349819aeaa8e | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
public class Sort {
static BufferedReader bf;
static PrintWriter out;
static Scanner sc;
static StringTokenizer st;
static long mod = (long)(1e9+7);
static long mod2 = 998244353;
static long[]fact = new long[200005];
static long[]invFact = new long[200005];
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 29575549a20412c5a5487e1437fc0a8b | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.util.spi.CalendarDataProvider;
import javax.imageio.metadata.IIOInvalidTreeException;
import java.lang.*;
import java.sql.Array;
// import java.lang.invoke.ConstantBootstraps;
// import java.math.BigInteger;
// import java.beans.IndexedPropertyChangeEvent;
import java.io.*;
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 720a7979c565df06a9d7f2407291fcd2 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | //package contest.CodeforcesRound817;
import java.io.*;
import java.util.*;
public class G1712 {
InputStream is;
FastWriter out;
String INPUT = "";
//提交时注意需要注释掉首行package
//尽量用对象Arrays.sort(new Long[]{})
//int 最大值2**31-1,2147483647;
//尽量使用long类型,避免int计算的数据溢出
//String尽量不要用... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 1b6da7211c343d0192d59ab128f32c34 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
static PrintWriter pw = new PrintWriter(System.out);
public static void main(String[] args) throws IOException, InterruptedException {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 99919914d4e1acc869f603016e1a75e0 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class A {
static Scanner sc;
static PrintWriter pw;
public static void main(String[] args) throws Exception {
pw = new PrintWriter(System.out);
sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
if (n % ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 7766f3cc6ade0262e88e09eef8339af4 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.PrintStream;
import java.util.Scanner;
public class G {
public static final Scanner in = new Scanner(System.in);
public static final PrintStream out = System.out;
public static void main(String[] args) {
int t = in.nextInt();
while (t-- > 0) {
int n = i... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | d45bd091226120b4964b3e952e218b23 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.concurrent.ConcurrentHashMap;
/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
static final int INF=Integer.MAX_VALUE;
static final long LINF=Long.MAX_VALUE;
static FastRead... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 22da488925a89180066494dd6249ca9d | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.Scanner;
import java.util.List;
import java.util.LinkedList;
public class G1722{
public static void main(String[] args){
int maxNum = 1;
for(int i=0; i<30; i++){
maxNum = maxNum<<1;
}
//System.out.println(maxNum);
Scanner sc = new Scanner(System.in);
int t = sc.n... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 162a0a4cde7f44e3f1214154f0a99623 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.Scanner;
public class G1722 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int T = in.nextInt();
for (int t=0; t<T; t++) {
int N = in.nextInt();
int[] A = new int[N];
int xor = 0;
f... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 826ce7c72c04d795fa5588b71d26b34c | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
// res.append("Case #"+(p+1)+": "+hh+" \n");
////***************************************************************************
/* public class E_Gardener_and_Tree implements Runnable{
public static void main(String[] args) throws Exception {
new Thr... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 8bb3ed3ab5f1d4e2f88bc3c11a60befd | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | //package com.example.lib;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import j... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 032254a2168944d61464d8fd23f7802f | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.Scanner;
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();
int xor = 0;
for (int j = 1; j < n - 2; j++)... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 9be7ea8cf197fc102f4f2a0037e7378d | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.Scanner;
public class G {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
int xor = 0;
int[] ans = new int[n];
ans[n-2] = (1... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 2766dcd2dc78d7e9967a59984e6eec01 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.security.cert.X509CRL;
import java.util.*;
import java.lang.*;
import java.util.stream.Collector;
import java.util.stream.Co... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 907aa57374eae0217d71666a5003a294 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | //package kg.my_algorithms.Codeforces;
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedWriter output = new BufferedWriter(new OutputStreamWriter(System.out));
FastReader fr = new FastReader();
String... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | bab612b7e0079fdd921b7447e6750754 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.StringTokenizer;
public class G {
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | a443ba21d01b9094bb2bca4a4a2e01d7 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | //package codeForces;
import java.util.Scanner;
import java.util.stream.IntStream;
public class G_1722 {
static Scanner sc = new Scanner(System.in);
static void solve() {
int n = Integer.parseInt(sc.next());
int temp = 0;
for (int i = 3; i <= n; i++) {
temp ^= i;
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | ad9c3a3f0fa6b5c728dec2b67c15fe63 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
public static void main (String[] args) throws Exception {
//code
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int t=Integer.parseInt(br.readLine());
while(t-->0)
{
int ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | e0fe0d4f358e07b839c528e68d5e3df9 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static FastReader sc=new FastReader();
static PrintWriter out=new PrintWriter(System.out);
static int dx[]={0,0,-1,1,-1,-1,1,1},dy[]={-1,1,0,0,-1,1,-1,1};
static final double pi=3.1415926536;
static long mod=1000000007;
// static long mod=9982... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 1e20924c6ecd6ce5ef3992de0d8945cd | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.util.Scanner;
public class Main {
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 case1=0,case2=0;
for(int j=0;j<n-2;j++) {
case1^=j;
case2^=(j+1);
}
if(case1!=0) {
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | b829f0db39b78620ee4496eb6bdfd402 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
public static void main(String[] args){
MyScanner scanner = new MyScanner();
int numOfTests = scanner.nextInt();
for(int t =... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | c15edc6bf7d551a535231991aa907b45 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int n = Inte... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 6c6fea65b8ba12f2fa56da3228dba8ff | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | //package codeforces.round817div4;
import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class G {
static InputReader in;
static PrintWriter out;
public static void main(String[] args) {
//initReaderPrinter(true);
initReaderPrinter(false);
sol... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | ca06d772c785820d4eda07cc9ba361db | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
// Alphabet size (# of symbols)
public static class Pair implements Comparable < Pair > {
int d;
int i;
Pair(int i, int d) {
this.d = d;
this.i = i;
System.out.println("TEst");
}
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 307048d3be3c3f9882cad6f359550c28 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
public class A {
public static long gcd(long a, long b) {
return b == 0 ? a : gcd(b, a % b);
}
public static void print(int[] a) {
for (int i = 0; i < a.length; i++) {
System.out.print(a[i] + " ");
}
System.out.println();
}
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 830d6df0c501426fe22e70ea103de3bf | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 97575be0f0a6e4e54fe83f698b49c786 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.HashSet;
import java.util.Random;
public class Main {
static InputReader sc;
public static void main(String[] args) throws Exception {
sc=new InputReader(System.in);
Random random=new Random();
int T=sc.nextInt();
while(T-->0)... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 6294cdf13fc0ffcfd275490fad3931cb | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
public class Solution {
static Solution2 admin = new Solution2();
public static void main(String[] args) {
admin.start();
}
}
class Solution2 {
//---------------------------------INPUT READER-----------------------------------------//
pub... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 7a7fe31e40f239880687ec9c8f67a4b1 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class TaskG {
public static void main(String[] args) {
FastReader reader = new FastReader();
int tt = reader.nextInt();
// int tt = 1;
for (; tt > 0; ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 992694e9233837bd61e24021ce36570a | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
Reader in = new Reader();
PrintWriter out = new PrintWriter(System.out);
int T = in.nextInt();
for (int t = 0; t < T; t++) {
int N = in.... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 8 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | ad342c7632c3c25796971789bc0b7b7a | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class G {
static class Scan {
private byte[] buf=new byte[1024];
private int index;
private InputStream in;
private int total;
public Scan()
{
in=System.in;
}
public int scan()throws ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | c0c2656cf1877c127bfbbfcd39196d32 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class G {
static class Scan {
private byte[] buf=new byte[1024];
private int index;
private InputStream in;
private int total;
public Scan()
{
in=System.in;
}
public int scan()throws ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | ddf048ef2e9e8bafe6be0360a73d4a4b | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class E {
static class Scan {
private byte[] buf=new byte[1024];
private int index;
private InputStream in;
private int total;
public Scan()
{
in=System.in;
}
public int scan()throws ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 67f6c7775d3fc457d3906d20cdbc628f | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | //package com.rajan.codeforces.contests.contest817;
import java.io.*;
public class ProblemG {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 4b241a6dcea1090196c2a4165eabb279 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int g = Integer.parseInt(bf.readLine());
while (g-- > 0) {
int a=Integer.parseI... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 4d81d78db26c1d4aa7fa6463c1464016 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.util.*;
public class abc
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc =new Scanner(System.in);
int n1=sc.nextInt();
while(n1-->0){
int n=sc.nextInt();
int[]arr=new int[n];
for(int i=0;i<n;i... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 0e6872ec042ecfdbd6a8d4a85202e689 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.io.*;
import java.math.*;
import java.util.*;
// @author : Dinosparton
public class test {
static class Pair{
long x;
int y;
Pair(long x,int y){
this.x = x;
this.y = y;
}
}
static class Compare {
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | d01e317c802b06f6ec7f0cc142c3a302 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
private static final void solve() throws IOException {
int n = ni();
var a = new int[n];
for (int i = 1; i < n; i++)
a[0] ^= a[i] = i;
a[0] ^= 1 << 20;
a[1] ^= 1 << 20;
a[0] ^= 1 << 21;
a[2... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 27b42341ef531d3f07f08ad0ad792664 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 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();
long[] a=new lo... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | f636eec9b9523d059cc366415ac4e729 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
//import org.graalvm.compiler.core.common.Fields.ObjectTransformer;
import java.math.*;
import java.math.BigInteger;
public final class A
{
static PrintWriter out = new PrintWriter(System.out);
static StringBuilder ans=new StringBuilder();
static FastReader... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 0e549562881636ce9aa7f1b154107922 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Collections;
/* Name of the class has to be "Main" only if the class is public. */
public class G
{
public static void main (String[] args) throws Exception
{
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 3248dee2d1f7f750ce3454c89edf95dc | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | /*
KEEP CALM AND जय श्री राम
* A B C D are easy just dont give up , you can do it!
* FIRST AND VERY IMP -> READ AND UNDERSTAND THE QUESTION VERY CAREFULLY.
* WARNING -> DON'T CODE BULLSHIT , ALWAYS CHECK THE LOGIC ON MULTIPLE TESTCASES AND EDGECASES BEFORE.
* SECOND -> TRY TO FIND RELEVENT PATTERN SMARTLY.
* WARNI... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 855f1697feed9a98cf8838383fa17066 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class G {
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
String ne... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | d052521314d50d097f869d26ca28480a | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.Scanner;
public class Even_Odd1772G {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
getArr(n);
}
}
static void getArr(int n) {
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | b715faa28ba8813f833d6c8fe4b2cfe3 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class a {
public static void main(String args[]) throws IOException {
FastScanner in = new FastScanner(System.in);
int t = in.nextInt();
for ( ; t > 0; t--) {
int n = in.nextInt();
long[] vals = new long[n];
if (n == 3) {
System.out.println(1 ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 85e2d7edcca1c93d0b9c4c0d3b2377ba | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
public class Solution{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0){
int n = sc.nextInt();
long a[] = new long[n];
for(int i=0;i<n-3;i++){
a... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 15bad345f7177d08c98d908a7524e54c | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
public class EvenOddXOR {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int inputs = in.nextInt();
for(int i = 0; i<inputs; i++){
int input = in.nextInt();
boolean even = true;
if(input==3){
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | b9d674bac6385b72b3fa5436aa94edd9 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.Scanner;
public class Main {
static Scanner in=new Scanner(System.in);
public static void solve()
{
int n=in.nextInt();
int mod=(n-3)%4;
if(mod==0)
for(int i=1;i<=n;i++)
{
System.out.print(i+(i==n?"\n":" "));
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | b7bfdf15a6d01edbae381f408779bf2f | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | // package c1722;
//
// Codeforces Round #817 (Div. 4) 2022-08-30 07:50
// G. Even-Odd XOR
// https://codeforces.com/contest/1722/problem/G
// time limit per test 1 second; memory limit per test 256 megabytes
// public class Pseudo for 'Source should satisfy regex [^{}]*public\s+(final)?\s*class\s+(\w+).*'
//
// Given... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 97365e9eedfd9bbd70a947bd807eafcd | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | // package c1722;
//
// Codeforces Round #817 (Div. 4) 2022-08-30 07:50
// G. Even-Odd XOR
// https://codeforces.com/contest/1722/problem/G
// time limit per test 1 second; memory limit per test 256 megabytes
// public class Pseudo for 'Source should satisfy regex [^{}]*public\s+(final)?\s*class\s+(\w+).*'
//
// Given... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 6131ad202856d0408394bcc11f36736f | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | // package c1722;
//
// Codeforces Round #817 (Div. 4) 2022-08-30 07:50
// G. Even-Odd XOR
// https://codeforces.com/contest/1722/problem/G
// time limit per test 1 second; memory limit per test 256 megabytes
// public class Pseudo for 'Source should satisfy regex [^{}]*public\s+(final)?\s*class\s+(\w+).*'
//
// Given... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 896477a0ff72a0c76bf3f5dae8c9a13c | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
public class Test {
static long mod = 1000000007;
static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
public static void main(String[] args) throws IOException {
FastReader sc = new FastReader();
int t = sc.nextInt();
while( t-- ... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | c7db00325fcb167037a9baf1c209e997 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 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 G_Even_Odd_XOR {
static long mod = Long.MAX_VALUE;
public static void main(String[] args) {
OutputStream outputStr... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | a347945a2ea0411ce5bd809a090c5e8c | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.util.*;
import java.io.*;
public class Main{
static class pair{
int x ;int y ;
pair(int x ,int y )
{
this.x=x;
this.y =y;
}
}
static class FastReader{
BufferedReader br;
StringTokenizer st;
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | b231e6bbc5ca1a5e8225e051269d4cc3 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.util.*;
import java.io.*;
public class Main{
static class pair{
int x ;int y ;
pair(int x ,int y )
{
this.x=x;
this.y =y;
}
}
static class FastReader{
BufferedReader br;
StringTokenizer st;
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 4f43f250df9812204fab1c62cc6ed733 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Stack;
public class aaaaaa {
static Scanner sc;
public static void solve() {
int n = sc.nextInt();
int [] arr = new int[n];
if((n&1) == 1){
for(int i=1, j=1; i<n; i... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 166b3a6e092158e9d30d7143706cbc25 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
//4
public class Main {
public static void main(String arg[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.i... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 93ed55a41a75729abc662f4f6fab5006 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.io.*;
import java.math.BigDecimal;
import java.util.*;
public class Main{
static int[][] v = {{2, 1, 3, 0},
{2,0,4,5,3},
{4,1,2,12,3,8},
{2,1,3}};
static BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw = ne... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 1a6fc2b5934cedc9280bb03dd8720135 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
// 17-05 //
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class D {
public static void main(String[] args) {
Scanner sc = new Scanner();
int t = sc.nextInt();
PrintWriter out =... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 3bb68d0da4378a49d5c1c3390a9d1347 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.Scanner;
public class pb7 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0){
int n = sc.nextInt();
int start = 2;
if (n % 4 == 1){
System.out.... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | de17c5e0551a9f29af99839a64709c55 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
public class EvenOddXor {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedRe... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 3ed1de3f15e46de44428dbf25691deae | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.*;
import java.util.*;
public class G {
static PrintWriter out;
static Kioken sc;
static boolean checkOnlineJudge = System.getProperty("ONLINE_JUDGE") == null;
public static void main(String[] args) throws FileNotFoundException {
if (checkOnlineJudge) {
out... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | a8015595b3f75d3f9c54c5899bd100e2 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
public class G {
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 res[] = new int[n];
int odd=0;
int even=0;
/* if... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | c569380f1ff281b6e1986c42f0a7c6e5 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes |
import java.util.*;
import java.lang.*;
import java.io.*;
public class New {
public static void main (String[] args) throws java.lang.Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(System.out);
int testCases = Integer.parseInt(... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 748d72b7d3322dd40741b6aa89463fcc | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
static InputStream is;
static PrintWriter out;
static String INPUT = "";
static final int ima = Integer.MAX_VALUE, imi = Integer.MIN_VALUE;
static final long lma = Long.MAX_VALUE, lmi = Long... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 3581a3bf496aa881d809fe5e92f60592 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | //Some of the methods are copied from GeeksforGeeks Website
import java.util.*;
import java.lang.*;
import java.io.*;
@SuppressWarnings("unchecked")
public class Main
{
//static Scanner sc=new Scanner(System.in);
//static Reader sc=new Reader();
static FastReader sc=new FastReader(System.in);
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 0091808b035dbb6e2871247f9f9e1fe3 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 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;... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 213c1dcd3df30f3f04ff5ccb372fbf9b | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.util.*;
import java.text.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
FastReader sc = new FastReader();
PrintWriter writer = new PrintWriter(System.out);
int t = sc.nextInt();
while(t-->0) {
... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output | |
PASSED | 5c248f9a5e7fa175731c40a416528910 | train_109.jsonl | 1661871000 | Given an integer $$$n$$$, find any array $$$a$$$ of $$$n$$$ distinct nonnegative integers less than $$$2^{31}$$$ such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.PrintWriter;
public class New {
public static void main(String args[]) {
FastScanner fs = new FastScanner();
PrintWriter out = new PrintWriter(System.ou... | Java | ["7\n8\n3\n4\n5\n6\n7\n9"] | 1 second | ["4 2 1 5 0 6 7 3\n2 1 3\n2 1 3 0\n2 0 4 5 3\n4 1 2 12 3 8\n1 2 3 4 5 6 7\n8 2 3 7 4 0 5 6 9"] | NoteIn the first test case the XOR on odd indices is $$$4 \oplus 1 \oplus 0 \oplus 7 = 2$$$ and the XOR on even indices is $$$2 \oplus 5 \oplus 6 \oplus 3= 2$$$. | Java 11 | standard input | [
"bitmasks",
"constructive algorithms",
"greedy"
] | 52bd5dc6b92b2af5aebd387553ef4076 | The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 629$$$) — the number of test cases. Then $$$t$$$ lines follow, each containing a single integer $$$n$$$ $$$(3 \leq n \leq 2\cdot10^5)$$$ — the length of the array. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\... | 1,500 | For each test case, output one line containing $$$n$$$ distinct integers that satisfy the conditions. If there are multiple answers, you can output any of them. | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.