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 | b5c642a13b0dc429963b689b755188bb | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.StringTokenizer;
public class B {
static class Fast {
BufferedReader br;
StringTokenizer st;
public Fast() {
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 3e38f858a4c35b8b954aaf826334babb | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.Scanner;
/**
*
* @author Acer
*/
public class FortuneTelling_B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
while(T-- > 0){
long n = sc.nextLong();
long x = sc.nextLong();
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 22f94e005d086dbfaac7b8d11759f3c3 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes |
import java.util.*;
public class practice{
public static void main(String[] args) {
Scanner sca = new Scanner(System.in);
long[] a = new long[100005];
int t = sca.nextInt();
while (t-- > 0) {
int n = sca.nextInt();
long x = sca.nextLong();
lon... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | b8ba9433b1eb61a65b296602f39f635c | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.beans.DesignMode;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
impo... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | cd7aa2ee12ac145b9a5c73d319af7508 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
public class Solution {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int i = 0; i < t; i++){
Long n = sc.nextLong(), x = sc.nextLong(), y = sc.nextLong();
long sum= 0;
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 9cf3e810b2fd3b70b32278ffdc45563b | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static void main(String args[])
{
FastReader input=new FastReader();
PrintWriter out=new PrintWriter(System.out);
int T=input.nextInt();
while(T-->0)
{
int n=input.nextInt();
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | ec40227ec86f24ac881481502581dbc2 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import static java.lang.Math.*;
import java.util.*;
import java.io.*;
import java.math.*;
public class temp {
// Let's Go!! ------------->
static FastScanner sc;
static PrintWriter out;
public static void main(String[] args) {
sc = new FastScanner();
out = new PrintWriter(System.out);
int t... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | e916c83cc2c49cf52c051c7ecde3725e | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
import java.io.*;
// BEFORE 31ST MARCH 2022 !!
//MAX RATING EVER ACHIEVED-1622(LETS SEE WHEN WILL I GET TO CHANGE THIS)
////***************************************************************************
/* public class E_Gardener_and_Tree implements Runnable{
public static void ma... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 47462606d0180f90aa528df550d495f1 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
public class Contest_yandexA{
static final int MAXN = (int)1e6;
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
/*int n = input.nextInt();
int k = input.nextInt();
k = k%4;
int[] a = new int[n];
for(int i = 0;i<n;i++){
a[i] = input.nextIn... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 7a93b4177d5a4713c51756f7a216f9ff | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
import java.util.StringTokenizer;
public class Main {
static FastReader fr;
static int arrForIn... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 6df4dc0dda52583dc70adb6bc860674f | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.BigInteger;
import java.util.Locale;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
//Arrays
// Find the sum of all elemenmts in an array for t test cases
Scanner sc = new Scanner(System.... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 2672c9983111c9a83fe4cb93c7e1ffd7 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import ... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 3f26751433efddd21671e5ff00cb54dc | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import static java.lang.System.out;
/**
* @author shardul_rajhans
*/
public class Main {
/**
* FastReader class to read input fr... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | b861b07187ef1b098ac7c0b44eff424d | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
import java.io.*;
//import java.math.BigInteger;
public class code{
public static class Pair{
int a;
int b;
Pair(int i,int j){
a=i;
b=j;
}
}
public static int GCD(int a, int b)
{
if (b == 0)
return a;
return GCD(b, a % b);
}... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | b5bfb9714c30c9cc2212d1f100e4a247 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import j... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 9ce4fd5e34dcda7c05190a829a6b3313 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 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;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
//import com.sun.tools.j... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 5519e31ee54b8eb90fe39dd539a91a26 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | /*
Rating: 1367
Date: 06-02-2022
Time: 20-16-12
Author: Kartik Papney
Linkedin: https://www.linkedin.com/in/kartik-papney-4951161a6/
Leetcode: https://leetcode.com/kartikpapney/
Codechef: https://www.codechef.com/users/kartikpapney
*/
import java.util.*;
import java.io.BufferedRe... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 7646708ca3433a4e47aa67b4cc6bf1b8 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 4fe9976e41b5dc986b4c23fde057e7ea | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.Scanner;
public class B1634 {
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 X = in.nextInt();
long Y = in.nextLong();
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 2ab9f3a31fdcf9298a4c29f956d7224b | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | //package kg.my_algorithms.Codeforces;
/*
If you can't Calculate, then Stimulate
*/
/*
1) Physical Strength
2) Mental Strength
3) Emotional Strength
*/
import java.util.*;
import java.io.*;
public class Solution {
private static final FastReader fr = new FastReader();... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 5817bab2513bf9068423e8c40685a3af | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes |
import java.util.Scanner;
/**
* @author linjinping 11104660
* @date 2022/9/14 20:31
*/
public class FortuneTelling {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int testCases = Integer.parseInt(scanner.nextLine());
for (int i = 0; i < testCases; i++) {
l... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 6daf8d097890fbf8846e691615e0a3b0 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class FortuneTelling {
public static void main(String[] args) throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
PrintW... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 8bddc8374b90f8809fb8d12f379eb804 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | //created by toufique on 04/08/2022
import java.io.*;
import java.util.*;
public class FortuneTelling {
public static void main(String[] args) {
PrintWriter pw = new PrintWriter(System.out);
Scanner in = new Scanner(System.in);
int t = in.nextInt();
for (int tt = 0; tt ... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | fd03aadb65523d5da4f7158c3839d4f8 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.Scanner;
public class B1634 {
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 X = in.nextInt();
long Y = in.nextLong();
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 2983b3d8e6b00a05da66d91b653973b0 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
import java.io.*;
import java.lang.Math;
public class Main {
public class MainSolution extends MainSolutionT {
// global vars
public void init(int tests_count){}
public class TestCase extends TestCaseT
{
public Object solve()
{
int n =... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | a3395f870b0c68b8333da89809eb883c | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main{
static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader(){
br=new BufferedReader(new InputStreamReader(System.in));
}
String next(){
while(st==null || !st.ha... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | cc12a96db9b73fb874879486a35f96b2 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.*;
import java.util.*;
public class Sum {
static BufferedReader bf;
static PrintWriter out;
static Scanner sc;
static StringTokenizer st;
public static void main (String[] args)throws IOException {
bf = new BufferedReader(new InputStreamReader(System.in));
out = new PrintW... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 744f2a621a4c15eb7456912bc853acdb | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
public class Solution{
static Scanner sc = new Scanner(System.in);
public static void main(String args[]){
int t = sc.nextInt();
while(t-- > 0){
int n = sc.nextInt(), x = sc.nextInt();
int y = (int)(sc.nextLong() % 2);
int cnt = 0;
for(int i = 0; i < n; i++){
int ele ... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | f8dc0795d4dfb26fc7f0829931014943 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes |
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 6c69a73453ca2f8a2e892ef911a58eba | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes |
import java.io.*;
import java.util.*;
public final class Main {
//int 2e9 - long 9e18
static PrintWriter out = new PrintWriter(System.out);
static FastReader in = new FastReader();
static Pair[] moves = new Pair[]{new Pair(-1, 0), new Pair(0, 1), new Pair(1, 0), new Pair(0, -1)};
static... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 313156a6f61a795b2e0cef48049950e6 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
static AReader scan = new AReader();
static int MOD = (int)1e9+7;
static void slove() {
int n = scan.nextInt();
int x = scan.nextInt();
long y =... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | a35b8af5cf9bc3689771784132f509f1 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
public class Solution{
static Scanner sc = new Scanner(System.in);
public static void main(String args[]){
int t = sc.nextInt();
while(t-- > 0){
int n = sc.nextInt(), x = sc.nextInt();
int y = (int)(sc.nextLong() % 2);
int cnt = 0;
for(int i = 0; i < n; i++){
int ele ... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 7e8670409dd9f7c463409feb64026781 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes |
import java.util.Scanner;
public class Sol {
static Scanner in = new Scanner(System.in);
public static void A () {
int t = in.nextInt();
while (t-- != 0) {
int n = in.nextInt();
int k = in.nextInt();
String s = in.next();
int r = n - 1; int l = ... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 4e0c166e6383d6acd821c106434d595a | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class B {
static PrintWriter pw = new PrintWriter(System.out);
static FastReader fr = new FastReader();
public static void main(String[] args) {
int t = fr.nextInt();
while (t-- > 0) {
sol... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 22641abfa03a33075c8fd3917b681a38 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes |
import java.util.Scanner;
public class Fortune {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
long x = sc.nextLong();
long y = sc.nextLong();
int o... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 413a411e65e1ba9618c7526ac867ff48 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.*;
import java.util.*;
public class B1634 { //
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
in... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 3f3091204a006f59c9ef4948265861a4 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | /*#####################################################
################ >>>> Diaa12360 <<<< ##################
################ Just Nothing ##################
############ If You Need it, Fight For IT; ############
####################.-. 1 5 9 2 .-.####################
###################################... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | c2244952a1f46795d726e69865f04b27 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
public class B {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt();
long x=sc.nextLong();
long y=sc.nextLong();
long s=0;
fo... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 74d8548615134bbaa728275003531c1e | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
public static class Pair implements Comparable < Pair > {
int d;
int i;
Pair(int d, int i) {
this.d = d;
this.i = i;
}
public int compareTo(Pair o) {
return this.d - o.d;
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 3b413ee710167775b29f542a9dd614de | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class B_Fortune_Telling
{
static int M = 1_000_000_007;
static final PrintWriter out =new PrintWriter(System.out);
static final FastReader fs = new FastReader();
static boolean prime[];
public static void main (Stri... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 7e1630bb47fec3a4ca6a4cadb5d42d89 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | /*
Challenge 1: Newbie to CM in 1year (Dec 2021 - Nov 2022) 🔥 5* Codechef
Challenge 2: CM to IM in 1 year (Dec 2022 - Nov 2023) 🔥🔥 6* Codechef
Challenge 3: IM to GM in 1 year (Dec 2023 - Nov 2024) 🔥🔥🔥 7* Codechef
Goal: Become better in CP!
Key: Consistency and Discipline
Desire: SDE @ Goog... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 90be4d35c80e793113121e832c4222e8 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Random;
import java.ut... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 4637b3f26d3549a27430c3d85b859708 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
import java.io.*;
public class C{
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReade... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | b473a637603b8e939a95df503c7480b2 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
boolean[] res = new boolean[t];
sc.nextLine();
for (int i = 0; i < t; i++) {
String[] m = sc.nextLine().spli... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | a530ef700e62bb7bd97a3ed5f474ed6b | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 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++) {
solve(sc);
}
}
static void solve(Scanner sc) {
int n = sc.nextInt... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 50b2558d47e78185f1993a303cf3bfd1 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class codeforces{
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public FastR... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 79d99efd083c67130f5289df442b18ed | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class AACFCC {
public static long mod = (long) Math.pow(10, 9) + 7;
public static long mod2 = 998244353;
public static int oo = 0;
public static ArrayList<Integer> pri... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | e77abe4ff57a811e93bc8d95841ded13 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Random;
import java.util.Stack;
import java.util.StringTokenizer;
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | cb066c4f5092f394de9a0d7f8fc7b7ea | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class CF1 {
public static void main(String[] args) {
FastScanner sc=new FastScanner();
int T=sc.nextInt();
// int T=1;
for (int tt=0; tt<T; tt++){
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 8dd9f50426e16a9ac5bd9c2dba5d611f | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Pranay
*/
pu... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 1307f9d86fe312940ccd3ea407c011bd | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
import java.io.*;
public class Fortune_Telling
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int test=sc.nextInt();
while(test>0)
{
int n=sc.nextInt();
long a=sc.nextLong();
long b=a+3;
long y=sc.nextLong();
long sum=0;
long ... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | e69001f8bc33be19f3b07bce86a7f013 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n, x;
long y;
int T;
T = scanner.nextInt();
while (T -- > 0) {
n = scanner.nextInt();
... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 338f721c8e460435edbe06953f5f1562 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.*;
import java.util.*;
public class main{
public static void main(String[] args)throws Exception{
Scanner scn=new Scanner(System.in);
long t=scn.nextLong();
while(t-->0){
int n=scn.nextInt();
long x=scn.nextLong();
lon... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 8d6e614ea9a043ea2f6dbf804a625ee7 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes |
import java.util.*;
import java.io.*;
/**
* CF1634B Fortune Telling
*/
public class Main {
static Reader rd = new Reader();
public static void main(String[] args) {
int tt = rd.nextInt();
while (tt-- > 0) {
new Solution().solve();
}
}
static class... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | ee9298e47c6878dfd71ea89e0b049ca7 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class HelloWorld {
public static void main(String []args) throws java.io.IOException {
BufferedReader scan = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(scan.readLine());
while(t-... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | a255696198fc4715ea9a0d903f509daa | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes |
import java.util.*;
import javax.management.Query;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0) {
int n=sc.nextInt();
long... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | e684d7a296ac32a806c0714284908f49 | train_108.jsonl | 1644158100 | Haha, try to solve this, SelectorUnlimited!— antontrygubO_oYour friends Alice and Bob practice fortune telling.Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and perfor... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
public class FortuneTelling{
public static PrintWriter pw = new PrintWriter(System.out);
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw = new ... | Java | ["4\n\n1 7 9\n\n2\n\n2 0 2\n\n1 3\n\n4 0 1\n\n1 2 3 4\n\n2 1000000000 3000000000\n\n1000000000 1000000000"] | 1 second | ["Alice\nAlice\nBob\nAlice"] | NoteIn the first test case, Alice could get $$$9$$$ using the following operations: $$$7 + 2 = 9$$$.In the second test case, Alice could get $$$2$$$ using this operations: $$$(0 + 1) \oplus 3 = 2$$$.In the third test case, Bob started with $$$x+3 = 0+3=3$$$ and could get $$$1$$$ this way: $$$(((3 + 1) + 2) \oplus 3) \o... | Java 8 | standard input | [
"bitmasks",
"math"
] | d17752513405fc68d838e9b3792c7bef | On the first line of the input, you are given one number $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following $$$2 \cdot t$$$ lines contain test cases. The first line of each test case contains three numbers $$$n$$$, $$$x$$$, $$$y$$$ ($$$1 \le n \le 10^5$$$, $$$0 \le x \le 10^9$$$, $$$0 \le y \le ... | 1,400 | For each test case, print the name of the friend who could get the number $$$y$$$: "Alice" or "Bob". | standard output | |
PASSED | 618cf135c54af100ccbdb1d6705953e3 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class E {
public static FastScanner s = new FastScanner();
public static PrintWriter out = new PrintWriter(System.out);
public static void main(Stri... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 11 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | 5bcaa087531ffded07bcd5b3dfb94376 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.util.*;
import java.util.Map.Entry;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Arrays;
import java.util.Random;
import java.io.FileWriter;
import java.io.PrintWriter;
/*... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 11 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | bc954e400d2c8c90c0b0edc8828ace0c | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.util.*;
import java.util.Map.Entry;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.Arrays;
import java.util.Random;
import java.io.FileWriter;
import java.io.PrintWriter;
/*... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 11 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | 516b69511beb8beed7132c526746439f | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.io.*;
import java.util.*;
public class e {
public static void main(String[] args) throws Exception {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(System.out);
int arrays = Integer.parseInt(in.readLine());
... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 11 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | 63322390607b428d5a94031bcf44151b | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.util.*;
import java.io.*;
public class FairShare {
public static void main(String[] args) throws IOException {
Reader in = new Reader();
PrintWriter out = new PrintWriter(System.out);
int N = in.nextInt();
int[][] mat = new int[N][];
for (int i =... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 11 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | bf34fd2346cebff374ba8a38b407d760 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class E{
static void ex() {
System.out.println("NO");
System.exit(0);
}
static class Pair implements Comparable<Pair>{
int i, j; // a[i][j] kinda indexing
public Pair(int a, int b) {
i=a;
j=b;
}
publi... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 11 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | def58ff2be2c03fe38eb1a5e55bb6837 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.io.*;
import java.util.*;
public class CF1634E extends PrintWriter {
CF1634E() { super(System.out); }
Scanner sc = new Scanner(System.in);
public static void main(String[] $) {
CF1634E o = new CF1634E(); o.main(); o.flush();
}
static final long N = 200000;
int[][] aa;
byte[][] cc;
int[] ii;
Has... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 11 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | b4ee6e6680fec91593ec0e2945b2c374 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.io.*;
import java.util.*;
/*
polyakoff
*/
public class Main {
static FastReader in;
static PrintWriter out;
static Random rand = new Random();
static final int oo = (int) 2e9 + 10;
static final long OO = (long) 2e18 + 10;
static final int MOD = 998244353;
static... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 11 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | bf495365a29b00fa5fd9b9b60b3bb0e8 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.TreeSet;
import java.io.BufferedReader;
import java.io.InputStream;
/**
* B... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 11 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | bc4e1d9515fe2898a3da29b7d0ffc7de | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.util.*;
import java.io.*;
public class E1643 {
static ArrayList<int[]>[] adjList;
// static LinkedList<Integer> tour;
static boolean[] vis;
static int[] ptr;
static void eulerTour(int u) {
// System.out.println(u);
vis[u] = true;
for (; ptr[u] < ad... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 8 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | 214634159d516c7bc54dfa1cdd1e2209 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws FileNotFoundException {
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
InputReader in = new InputReader(System.in);
int m = in.nextInt();
Tre... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 8 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | ad95d7867a0dfc7bc3a9d7235b6125a3 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | //make sure to make new file!
import java.io.*;
import java.util.*;
//tutorial
public class E770{
public static ArrayList<ArrayList<Edge>> adj;
public static void main(String[] args)throws IOException{
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
PrintWrit... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 8 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | 360460b56a410691971c288296020789 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 8 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | 13a95a6139d890fcb537e60251428914 | train_108.jsonl | 1644158100 | Even a cat has things it can do that AI cannot.— Fei-Fei LiYou are given $$$m$$$ arrays of positive integers. Each array is of even length.You need to split all these integers into two equal multisets $$$L$$$ and $$$R$$$, that is, each element of each array should go into one of two multisets (but not both). Additional... | 256 megabytes | /*
Setting up my ambitions
Check 'em one at a time, yeah, I made it
Now it's time for ignition
I'm the start, heat it up
They follow, burning up a chain reaction, oh-oh-oh
Go fire it up, oh, oh, no
Assemble the crowd now, now
Line 'em up on the ground
No leaving anyone behind
*/
import java.util.*;
import ... | Java | ["3\n2\n1 2\n4\n1 2 3 3\n6\n1 1 2 2 3 3"] | 1.5 seconds | ["YES\nRL\nLRLR\nRLLRRL"] | NoteIn the first array, we add the first element to $$$R$$$ and the second to $$$L$$$. Now $$$L = \{2\}$$$, and $$$R = \{1\}$$$.In the second array, we add the first and third elements to $$$L$$$ and the rest to $$$R$$$. Now $$$L = \{1, 2, 3\}$$$ and $$$R = \{1, 2, 3\}$$$.In the third array, we add elements 2, 3, and 6... | Java 8 | standard input | [
"constructive algorithms",
"data structures",
"dfs and similar",
"graph matchings",
"graphs"
] | 14d16cfc20da1320ae844dd73b68cc3c | The first line contains an integer $$$m$$$ ($$$1 \le m \le 10 ^ 5$$$) — the number of arrays. The next $$$2 \cdot m$$$ lines contain descriptions of the arrays. For each array, the first line contains an even integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10 ^ 5$$$) — the length of the array. The second line consists of $$$n$... | 2,400 | If the answer exists, print "YES", and then print $$$m$$$ lines. On each line, for each element, print the letter "L" or "R" (capitalized, without spaces), depending on which multiset the element should go into. If there is no answer, print "NO" on the only line. | standard output | |
PASSED | 27e0a2637a9e984bb09fc92d9eda6749 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes |
/*
TASK: template
LANG: JAVA
*/
import java.io.*;
import java.lang.*;
import java.util.*;
public class B1644 {
public static void main(String[] args) throws IOException{
StringBuffer ans = new StringBuffer();
StringTokenizer st;
BufferedReader f = new BufferedReader(new Inp... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 7fbd30340958bf17ba218a6905bfa23d | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 44a5e15b3a5dca55d19991135b4a3e95 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.*;
import java.util.HashMap;
import java.util.HashSet;
public class test {
public static void main(String[] args) throws IOException{
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
BufferedWriter out=new BufferedWriter(new OutputStreamWriter(System... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | c615970cf440ae1c7e2557ca0912f9f9 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes |
import java.util.*;
import java.io.*;
import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.sqrt;
import static java.lang.Math.floor;
public class topcoder {
public static class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | f33f1a3a36b226d48c9b3ba870f07cd7 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
static class Pair {
int a,b;
public Pair(int a,int b){
this.a = a;
this.b =b;
}
}
public static void main(String[] args) {
MyScanner sc = new MyScanner();
out = new Pri... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | f2c791cb24d7a1de3e2f4bd21357243a | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* Referred other people, original mine time exceed
*
*/
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader bf = new BufferedReader(new InputStreamReader(S... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | db79d0a04147edf5841787644acf9fa2 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes |
import java.io.*;
import java.util.*;
import java.lang.*;
public class StringInput {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader(InputStream in) {
br = new BufferedReader(
new InputStreamRead... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | e9846bf7955248e2df775d72c16b84d9 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.util.Scanner;
public class B_Anti_Fibonacci_Permutation {
static Scanner in = new Scanner(System.in);
static int testCases, n;
static void solve() {
for (int i = 1; i <= n; i++) {
System.out.print(i+" ");
for (int j = n; j > 0; j--) {
... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 243b9e66dfe74e60812702a158d30df2 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.lang.*;
import java.io.InputStreamReader;
import static java.lang.Math.*;
import static java.lang.System.out;
import java.util.*;
import java.io.File;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.math.BigInteger;
pu... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 21266304ad0b25a1c64c6eda144b363b | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0)
{
int n = sc.nextInt();
ArrayList<Integer> list = new ArrayList<>();
for (int i=1; i<=n; i++)
{
... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 68fc963e14a75965b7e900dee888e336 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | //package com.competetive.upSolve;
// Working program using Reader Class
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
//Static Imports
import static java.lang.System.out;... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 8bf7d4a55130acf223cb6ba2d2e7abfd | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.*;
public class AntiFibonacciPermutation {
public static void main(String[] args) throws IOException {
BufferedReader br = new Buffe... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | b07a81f11a837931add5db3d18cb90bc | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.util.*;
public class antifibn
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
int n=sc.nextInt();
int ar[]=new int[n];int k=n;
for(int i=0;i<n;i++)
... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | d50e669dcd5fd8bc313637e56f94442b | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.*;
import java.util.StringTokenizer;
public class CF {
//-----------PrintWriter for faster output---------------------------------
public static PrintWriter out;
//-----------MyScanner class for faster input----------
public static class MyScanner {
BufferedReader br;
... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | bb7d8965865bbc703db7dd5814074a6c | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | /*package whatever //do not write package name here */
import java.util.*;
public class GFG {
public static void main (String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int o=0;o<t;o++){
//lllll
int n=sc.nextInt();
int[] arr=new int[n];
for(int i=0;... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 42e88a3ac31f0387a98137b170146356 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | /*package whatever //do not write package name here */
import java.util.*;
public class GFG {
public static void main (String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int o=0;o<t;o++){
int n=sc.nextInt();
int[] arr=new int[n];
for(int i=0;i<n;i++) arr[i]... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | fdde2c43297e62d4540d3537d5730dc3 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | /*package whatever //do not write package name here */
import java.util.*;
public class GFG {
public static void main (String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int o=0;o<t;o++){
int n=sc.nextInt();
int[] nums=new int[n];
for(int i=0;i<n;i++) nums[... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 71a5b429679c05955265cd39a7b7d18a | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | // package com.company;
import java.util.Collections;
import java.util.Scanner;
public class test {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
while(t-->0){
int n = scanner.nextInt();
int[... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 879a27cedf077c2f3d433aaa45320ac9 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.*;
import java.lang.*;
import java.util.*;
public class MyClass {
static void recur(ArrayList<Integer> path_arr, HashSet<Integer> hs,
int n, ArrayList<ArrayList<Integer>> out) {
if(path_arr.size() == n) {
// for(int i = 0; i < path_arr.s... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 7df02ae9b47396453b6cbd87bd5892b8 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes |
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Pupil
{
static FastReader sc = new FastReader();
public static void main (String[] args) throws java.lang.Exception
{
// your code... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | e157844acf40133e66ca84e1ddbfd3f6 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes |
import java.util.Arrays;
import java.util.Scanner;
public class Problem1644B {
public static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
int tc = scanner.nextInt();
while (tc-->0){
int n = scanner.nextInt();
int [] arra... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 00ae57556b0749c73c28640397dd1a43 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.util.*;
public class CF1644B {
static void solve(int[] arr, int index, int value, boolean[] visited, ArrayL... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | c0f9288d3992386d89d829f0f716f51e | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
PrintWriter out = new PrintWriter(S... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 5364a2738fc793335fc1613b2572272a | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | /* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class index
{
public static void main (String[] args)
{
FastScanner sc = new FastScanner();
PrintWriter ou... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | f9eb3a4d1de9702669713e7fe0e00795 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
//--------------------------INPUT READER---------------------------------//
static class fs {
public BufferedReader br;
StringTokenizer st = new StringTokenizer("");
public fs() { this(System.in); }
public fs(I... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 4d807534b3d4e906b2c82f011dc04151 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes |
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
public class B {
/**
* Template
*
* @author William Fiset, william.alexandre.fiset@gmail.com
*
*/
static InputReader in = new InputReader(System.... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | a8060e5d866059a9622327026417a356 | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static int gcd(int a, int b) {
if (a < 0 || b < 0) { //求最大公因数
return -1; // 数学上不考虑负数的约数
}
if (b == 0) {
return a;
}
return a % b == 0 ? b : gcd(b, a % b);
}
public... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | 0c1e0701d460c1123531e1e8a7ed696a | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.*;
import java.util.*;
public class Rextester {
FastScanner in;
PrintWriter out;
void solve(){
//write your code here
int t=in.nextInt();
while(t-->0){
int n=in.nextInt();
for(int i=1;i<=n;i++){
System.out.print(i+"... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output | |
PASSED | f1dfcaf132057cb7b38f81744f4335cc | train_108.jsonl | 1645540500 | Let's call a permutation $$$p$$$ of length $$$n$$$ anti-Fibonacci if the condition $$$p_{i-2} + p_{i-1} \ne p_i$$$ holds for all $$$i$$$ ($$$3 \le i \le n$$$). Recall that the permutation is the array of length $$$n$$$ which contains each integer from $$$1$$$ to $$$n$$$ exactly once.Your task is for a given number $$$n... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
FastScanner scanner = new FastScanner();
int t =... | Java | ["2\n\n4\n\n3"] | 2 seconds | ["4 1 3 2\n1 2 4 3\n3 4 1 2\n2 4 1 3\n3 2 1\n1 3 2\n3 1 2"] | null | Java 8 | standard input | [
"brute force",
"constructive algorithms",
"implementation"
] | 85f0621e6cd7fa233cdee8269310f141 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 48$$$) — the number of test cases. The single line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 50$$$). | 800 | For each test case, print $$$n$$$ lines. Each line should contain an anti-Fibonacci permutation of length $$$n$$$. In each test case, you cannot print any permutation more than once. If there are multiple answers, print any of them. It can be shown that it is always possible to find $$$n$$$ different anti-Fibonacci per... | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.