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
fab7fd23951252ccc3f41471114e632c
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
/* package codechef; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ public class Codechef { public static void main (String[] args) throws IOException { BufferedReader f=new BufferedReader(n...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
aca4b1ee79f63eb35b2f3d428eb26af3
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class a { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); for (int ci = 0; ci < t; ci++) { long a = in.nextLong(); long b = in.nextLong(); long c = in.nextLong(); long ax = Math.abs(a - 1); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
610225ca3f077d35f01e17d469c53efb
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class SolutionA{ static int twoElevators(int a,int b,int c){ int counta=a-1; int countb=Math.abs(b-c)+(c-1); //java.lang.Math if(counta<countb) return 1; if(counta>countb) return 2; return 3; } public static void...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
345accdde12e0969022bc6c3cc2c6753
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class ProbB { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long t = sc.nextLong(); while(t-->0) { long a = sc.nextLong(); long b = sc.nextLong(); long c = sc.nextLong(); //long x = a-1; long y = Math.abs(c-b)+c; ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
2742998fb497fd744b59e90e371fda75
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
// package codeforce; import java.util.*; import java.net.*; import java.util.stream.Collectors; import java.util.stream.IntStream; import java.io.*; public class A { static class Node { int id1; int id2; Node(int v1, int w1){ this.id1= v1; this.id2=w1; } Node(){} ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
2625a5feb68bb85dae631c0e29fe5742
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Arrays; import java.util.List; import java.util.Scanner; import java.util.stream.Collectors; public class quesA { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for(int i=0;i<t;i++) { int a = sc.nextInt();//input.get(0); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
f35bf3eb5dae97e937a9b65ee61ed03a
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class TwoElevators { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-- > 0 ) { int a = (sc.nextInt()); int b = (sc.nextInt()); int c = (sc.nextInt());...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
975273517aedea29917e927b27e8e5f8
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
/***** ---> :) Vijender Srivastava (: <--- *****/ import java.util.*; import java.lang.*; import java.io.*; public class Main { static FastReader sc =new FastReader(); static PrintWriter out=new PrintWriter(System.out); static long mod=(long)32768; static StringB...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
d1db25e7093b08b2d25f7568a7a1f04f
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.*; public class A { public static void main(String[] args) { FastScanner fs = new FastScanner(); PrintWriter out = new PrintWriter(System.out); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
7e578a623b69323a100c62a742f5b02b
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.*; public class A { public static void main(String[] args) { FastScanner fs = new FastScanner(); PrintWriter out = new PrintWriter(System.out); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
4c3a23a35d117df5a6ac2de0a5c3c063
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.*; import java.math.*; public class A { static StringBuilder sb; static dsu dsu; static long fact[]; static long mo...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
a3ab6b2c5db2fc9321be29699c6425ac
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Ex3 { public static void main(String[] args) { Scanner in = new Scanner(System.in); int x = in.nextInt(); for(int i = 0; i < x; i++) { int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
23dcf1d7bafbb03550b89dba9cb70496
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Football { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-->0){ int a =sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); in...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
af4e16b5e7cebd07af9c92af03697894
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Two_Elevators { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-- > 0) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == 1 || (Math.abs(c - b) + (c - 1)) > a - 1) ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
b48de39f677677a71ebdeac60e6c7b7b
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Main { public static void main(String args[]){ Scanner sc=new Scanner(System.in); int a=sc.nextInt(); while(a-->0) { int b=sc.nextInt(); int c=sc.nextInt(); int d=sc.nextInt(); int r=b-1; int e=Math.abs(d-c)+Math.abs(d...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
f226347b6ebac905b0af69b5a94c9157
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class QuesA { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t=sc.nextInt(); while(t-- > 0){ int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); int s2; ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
3e424c08cb9864cb1122eb31f4638654
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import javax.print.DocFlavor; import java.io.*; import java.math.BigInteger; import java.util.*; public class A { static FastScanner scan = new FastScanner(); static Scanner scanner = new Scanner(System.in); public static void main(String[] args) { int T = scan.nextInt(); for(int i ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
a9cb0a1dd2b69fa6623e25c802579bc2
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; import java.lang.*; import java.io.*; public class Main { public static void main (String[] args) throws java.lang.Exception { // your code goes here Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t>0){ int a=sc.nextInt(); int b=sc.nextInt(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
6966a2a6197653f756cc958454056d1a
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); BufferedOutputStream os = new BufferedOutputStream(System.out); int n = Integer.parseI...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
ad0e208ae51f5de4684562d04065c727
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; import java.io.*; public class Competitive { static BufferedReader rd = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { int t = getInt(); while(t-- > 0){ String[] s = rd.readLine().split(" "); int a= to...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
ab98a3df0e6c0885ceec90b354121be3
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.math.BigInteger; import java.util.*; public class Main { static FastReader scan = new FastReader(); static PrintWriter sout = new PrintWriter(System.out); public static void main(String[] args) { int n = scan.nextInt(); while (n-->0) ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
82830dde2692db0ca56726b93519030c
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class cf1 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-->0){ int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); System.ou...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
132e68f27e7ba4f8bb33323c1a55bd2d
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.StringTokenizer; public class Main { static long ans = 0; public static void main(String[] args) throws IOException{ // TODO Auto-generated method stub BufferedReade...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
af75ecc495aac77fb6addd67b52a321e
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; import java.util.Collections; /* Name of the class has to be "Main" only if the class is public. */ public class A { public static void main (String[] args) throws Exception { ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
0c884bb71b4828ae244df0513e962081
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.*; //[row][column] public class cf_arhiv { public static void main(String[] args) { FastScanner scan = new FastScanner(); int n = scan.nextInt(); for (int i = 0; i < n; i++) { int a = scan.nextInt(); int b= scan.nextInt();...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
0a1844d5a1fc3cd48fd1201b0ce02d31
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class yuhi { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-->0) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int first = a-1; int second = c>b ? (2*(c-b))+(b-1) : (b-...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
0cca1d56c348f8d9df48d788818a4eb2
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
/* package codechef; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; /* Name of the class has to be "Main" only if the class is public. */ public class Codec...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
50d41c2a4d3d46004348fc810051ee03
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; import java.lang.*; import java.io.*; public class temp3 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for(int i = 0; i<t; i++) { int[] a = new int[3]; a[0] = sc.nextInt(); a[1] = sc.nextInt(); a[2] = sc.nextInt(); int a1...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
2740a2689f61842d313bb90294af4d3f
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.*; public class cf { public static long gcd(long a, long b) { if (b == 0) { return a; } return gcd(b, a % b); } public static boolean isok(long x, long h, long k) { long sum = 0; if (h > k) { ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
235e0a48b25a8c863323dc73493dd0f2
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int testcase = input.nextInt(); for (int i = 0; i < testcase; i++) { int a = input.nextInt(); int b = input.nextInt(); int c = i...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
c7b19a4a58ff7f1072ed659fa3bef4d9
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; import java.io.*; import static java.lang.Math.*; public class Main { public static void main(String[] args) { new MainClass().execute(); } } class MainClass extends PrintWriter { MainClass() { super(System.out, true); } boolean cases = true; // Solution void ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
50e1908dfe607f0835a7d1d0d8a4f4fe
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int t = scanner.nextInt(); while (t>0){ int a=scanner.nextInt(), b= scanner.nextInt() , c=scanner.nextInt(); int cnt_1 = a -...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
2ba0913b7fa1b8e950e45914d4172746
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.*; public class cf { static long[] p; public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out)); in...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
58ce82a6b0496f5c2092b8b71c7628df
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int N = in.nextInt(); while(N-- > 0){ int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(); long t = (Math.abs(b - c)) + c; ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
dc650fc7569848d2e6f451a362688d4e
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Two_Elevators { public static void main(String[] args) { Scanner Scan = new Scanner(System.in); //System.out.println("Test Cases :"); int t = Scan.nextInt(); int t1=0; while(t1<t) { t1++; //System.out.println("Enter a :"); long a = Scan.nextLong(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
6e1c3934ba2f33eaabf4afbfa1260705
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.Arrays; public class Lift { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int numberOfSets = Integer.parseInt(br.readLine()); for (int nos = 0; nos < numberOfSets; nos++) { i...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
25099a48e3bb902640643e65fc5e6deb
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
//ღ(¯`◕‿◕´¯) ♫ ♪ ♫ YuSuF ♫ ♪ ♫ (¯`◕‿◕´¯)ღ import java.util.*; public class Two_Elevators { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); while (t-- > 0) { int a = in.nextInt(); int b = in.nextInt()...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
54f0f24bf2777199bceb6183c955807e
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class A_Two_Elevators { public static void main(String[]args) { Scanner x=new Scanner (System.in); int t=x.nextInt(); while(t-->0) { int a=x.nextInt(); int b=x.nextInt(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
1f9730894cd116e97ebba03ed997bcc2
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class A { public static int solve(int a, int b, int c) { int time1 = Math.abs(a - 1); int time2 = Math.abs(b - c) + Math.abs(c - 1); if (time1 == time2) { return 3; } else if (time1 > time2) { return 2...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
a62bf247cd646625a7c6e11828fc14f1
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class question { ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
e4ead2ed1f8e17fb9d9c4d47ad28d846
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
//============================================================================ //Everyone has a different way of thinking, so God Created us // Hope You Respect My Way..,Thank You ): // Author : Murad // Name : Codeforces.cpp & Atcoder.cpp // Description : Problem name //============================...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
efb091b51ed490a99564d7191366eacc
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for(int i = 0 ; i < t ;i++){ int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
0462699af0a83ed349664287a4b875a7
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.*; public class Elevators{ static int helper(int a, int b, int c){ int ans1 = Math.abs(a-1); int ans2 = Math.abs(c-b) + Math.abs(c-1); if(ans1 < ans2){ return 1; }else if(ans2 < ans1){ return 2; } ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
c0b1e89f6ab723623924693408c6ebb3
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; public class Main { static void out(int a,int b,int c) { int c1=0; int c2=0; c1=a-1; //System.out.println("c1="+c1); if(b>c) { c2=b-c; c2=c2+c-1; //System.out.println("c2="+c2);...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
858b3e57077adc1963e1ce8e0814a8ad
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; import java.lang.*; import java.io.*; public class sorting { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t>0) { int first=sc.nextInt(); int second=sc.nextInt();...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
977bd3634564c1c13def36b3afe04b65
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { int count = scanner.nextInt(); int[][] input = getInput(count, scanner); for (int i = 0; i < count; i++) { in...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
5c0966d33c2f0504bd6ccff20fead5ce
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Sulution { static List<String> res=new ArrayList<>(); public static void main(String[] args) { Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while (t-->0) { int a=sc.nextInt(); int b=sc.nextInt(); int...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
f09ea3959f0818164cfa09029760fcf0
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.*; public class Codeforces { final static int mod = 1000000007; final static String yes = "YES"; final static String no = "NO"; public static void main(String[] args) throws Exception { FastReader sc = new FastReader(); int t = sc.nextInt();...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
d786a4dff68f7d567a95e0aa1ea657fa
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int t = input.nextInt(); float summa = 0; for (int i = 0; i < t; i++) { int a = input.nextInt(); int b = input.nextInt(); i...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
db5ffd32fd9f9ee14a2ab7833828f649
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class TwoElevators { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = new Scanner(System.in); int n = scan.nextInt(); for (int i= 0; i<n;i++) { int a = scan.nextInt(); int b= scan.nextInt(); int c= scan.nextInt(); fa...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
d08138dbbec0b09027dda8a6cdffa4d4
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int t=sc.nextInt(); for(int i=0;i<t;i++){ int k=0; int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); if(a==1){ k=1; } else{ int p=...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
dabd5aa662e774f2e37173e1e8951e87
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class r820{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-->0) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int t1 = Math.abs(a-1); int t2 = Math.abs(c-b)+Math.ab...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 11
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
e95c7ca077378e2a989635acd686364c
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class lesson1 { public static void main(String[] args) { Scanner input = new Scanner(System.in); int t = input.nextInt(); while( t != 0 ){ int a = input.nextInt(); int b = input.nextInt(); int c = input.nextInt(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
493b733824f2a7dffd01d3ab154d450b
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class CF_Elevator { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int w = sc.nextInt(); while(w-- > 0) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int cal1=a-1; int cal2=0; if(c>b...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
993d06bfedee1178637b172142bc53ef
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.BufferedReader; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; import static java.lang.Math.*; public class TwoElevators implements Closeable { private In...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
0208970ca8aeabf636a485b6fc165ece
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; import java.lang.*; import java.io.*; public class Codechef { public static void main (String[] args) throws java.lang.Exception { // your code goes here try { Scanner s = new Scanner(System.in); int t= s.nextInt(); for(int i=0; i<=t; i++){ int a = s.nextInt();...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
efc0a811d3e0484db8004f30419079f1
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Codeforces { public static void main(String[] args) { Scanner in = new Scanner (System.in); long t=in.nextLong(); while(t>0) { int a [ ] = new int [ 3 ]; int c1=0 , c2=0 ; ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
cf24d563ed623fc17754a16dfc1fa3fa
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Arrays; import java.util.Scanner; public class App { public static void main(String[] args) { // test the structures here int t = 0; Scanner scanner = new Scanner(System.in); t = scanner.nextInt(); for (int i = 0; i < t; i++) { int ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
c5cdb0fe8352be1662e6e1167e25ca14
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); in.nextLine(); String[] chisla; for (int i = 0; i < t; i++){ String s = in.nextLine(); chisla = s.split(" ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
676fe6f4f32048c1b96fe74f4ab2032b
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt();in.nextLine(); String[] chisla; for (int i = 0; i < t; i++){ String s = in.nextLine(); chisla = s.split(" "...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
bc693405587f91ec6c94b4a99eb58fa6
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); String[] chisla = new String[t]; String a = in.nextLine(); for (int i = 0; i < t; i++){ String s = in.nextLine...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
580ed0a39dad79eb4ff034c40e90919e
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.*; public class Codechef { public static void main(String[] args)throws java.lang.Exception { FastReader input=new FastReader(); int testcases=input.nextInt(); while(testcases-->0){ int a=input.nextInt(); int b=input.nextInt(); int c=input.nextInt(); int t...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
919355443d0634c0265dba61e5fde6a2
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class TwoElevators { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int t=sc.nextInt(); for(int i=0;i<t;i++) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
eec72f80927d1244bd5472a794555fde
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; import java.lang.Math; public class TwoElevators { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int testCases = scanner.nextInt(); for(int i = 0; i < testCases; i++){ int currentFloor1st = scanner.nextInt...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
e8e2d1fcec187dc2e0ea124c7818c26e
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; import java.lang.Math; public class Main { public static int TEST_CASES = 3; private static int[] datas; public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int testCases = scanner.nextInt(); datas = new int[testCa...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
5b684dbf0ddf9efe27245f78644e6141
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class TwoElevator { // 8:30pm public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-->0){ int a = sc.nextInt(); int b = sc.nextInt(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
09cf7fbce89abe4568f49e2f562d98ea
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); for(int i=0;i<n;i++){ int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); int diff=a-1; ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
a1a2a882a2e49b6dfd42b9f5ad5e64bd
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); for (int i = 0; i < t; i++) { int...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
aaac7c14161ab21b9f9c8690f37f93ab
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class elevator { public static void main(String[] args) { Scanner s = new Scanner(System.in); int tc = s.nextInt(); while(tc-->0){ int a = s.nextInt(); int b =s.nextInt(); int c = s.nextInt(); b = Mat...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
211d91429bec3d303a4013195ce50c56
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Div3 { public static void main(String[] args) { Scanner input = new Scanner(System.in); int a = input.nextInt(); for (int i = 0; i < a; i++) { int first = input.nextInt(); int second = input.nextInt(); int s...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
a0e8a3f1b17b0075f536c7db583963ba
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Lift { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t-->0){ int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); int h=Math.abs(c-...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
88692f4b3b540d610196468290364f91
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; import java.lang.*; public class cp1 { public static void main(String[] args) { //write your code here Scanner sc = new Scanner(System.in); int t=sc.nextInt(); for (int tt = 0; tt < t; tt++) { int a=sc.nextInt(); int b...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
720a3169213414e30d69daa0e0a92923
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
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 a,b,c; a=sc.nextInt(); b=sc.nextInt(); c=sc.n...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
4fa31bd8a9543acc849d1ea984120356
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class A_contest1 { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { // TODO Auto-generated method stub int t = sc.nextInt(); int a, b, c, a1, b1; while (t>0) { a = sc.nextInt(); b = sc.nextInt(); c = sc.n...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
39d7973c3af3fc8186cfc0fb7246f2e2
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class decelaration { public static void main (String[] args) throws java.lang.Exception { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while (t-- > 0){ int a = sc.nextInt(); int b = sc.nextInt(); int ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
fee8f276e1e418ea72a8527067d7a38b
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class rough { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-->0) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
5373c9c277ca90d90291cc1ded85803e
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class rough { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t-->0) { int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int t1...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
8ee57cf7d11f54b0130bd56dd82a65b5
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class syntax { public static void main(String[] args) { // Java syntax: // Variables: boolean(true/false), int(an integer), double(fractional number), char(a character), String(a sequence of characters). // User's input: "java.util.Scanner" at the start of the code to i...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
ef7a34a12febfde50096bba8b0ae567c
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
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 Main { public static void main (String[] args) throws java.lang.Exception { ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
cc16fdd08dda3e177b2a60b3aafdce37
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; import java.math.*; public class Solution { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t-->0) { int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
7644ba8161fffc9a3797942c87464886
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[]args) { Scanner sc=new Scanner(System.in); long n1,n2; int n=sc.nextInt(); for(int i=1;i<=n;i++) { long a=sc.nextLong(); long b=sc.nextLong(); long c=sc.nextLong(); n1=Math.abs(b-c)+Math.abs(c-1); n2=Math.abs(a...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
331afcb5872f3e17c37b969037f999c7
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class q1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while (t-- > 0) { int a=sc.nextInt(); int b=sc.nextInt(); int c=sc.nextInt(); int t1=0; ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
27f66844e1e87df7d34df208b9d8d411
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.*; import static java.lang.Math.*; import static java.lang.System.*; public class TwoElevators implements Runnable { private final void process() throws IOException { // InputReader input = new InputReader(new FileReader(System.getenv("INPUT"))); // Print...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
80632fef1a1243b36d9ae6bcf96007b0
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class elevator { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t-->0) { int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(); if(a==1) { ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
a4008188475c7a9a2cacf00ac77864b0
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.DataInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.Scanner; import java.util.StringTokenizer; public class main2 { static class Reader { final private int BUFFER_SIZE = 1 << 16; private DataInput...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
bc615a80dfb37fae716b7603973db836
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
//package com.company; import java.util.*; public class Codeforces { static int gcd(int a,int b){ if (a == 0){ return b; } return gcd(b % a,a); } static int lcm(int a,int b){ return ((a * b)/gcd(a,b)); } public static void main(String[] arg...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
4bc26629ba9650418de31ecd4b1d4da6
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public final class CF{ public static void main(String[] args) { Scanner s = new Scanner(System.in); int t = s.nextInt(); while(t != 0) { int a = s.nextInt(); int b = s.nextInt(); int c = s.nextInt(); ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
11355cdf9818f0b702f8cb9aec17b201
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; import java.util.*; import java.util.stream.Collectors; import java.util.stream.IntStream; import static java.lang.System.*; import static java.lang.System.out; import static java.lang.Ma...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
716468ba8a5cbd0d8ee00c78a7d9346f
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); for (int i = 1; i <= t; i++) { int a=in.nextInt(),b=in.nextInt(),c=in.nextInt(); if(a<Math.abs(c-b)+c) System.out.println(...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
feca03a547400ad5e5e4fd1fe7fc9d26
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
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.hasMoreToken...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
09e7b3ae1d830b89d7d16f14d2529f05
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
// ronin import java.io.*; import java.util.*; public class A { public void solve(int a, int b, int c, PrintWriter out) { int res = a - (Math.abs(c - b) + c); int ans = 3; if (res > 0) { ans = 2; } if (res < 0) { ans = 1; } ...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
bdeffd93413993076d15e254e1326e8e
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.io.*; import java.util.*; public class Solution { public static int sol(int a, int b, int c) { int res = a - (Math.abs(c - b) + c); if (res>0) { return 2; } if (res<0) { return 1; } return 3; } static class...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
cabc3816bc1c95a98ba2cc5cea996a5e
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.lang.*; import java.util.*; public class Elevators { public static void main(String[] args) { Scanner in = new Scanner(System.in); int t = in.nextInt(); int a,b,c; while(t-->0) { a = in.nextInt(); b = in.nextInt(); c = in.next...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
a3dd8f0760eb372f112e7f2297a7ca69
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int num = scanner.nextInt(); List<List<Integer>> list = new ArrayList<>(); for (int i = 0; i...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
6a10bba3bc561234fba15484a936c7e6
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class Te2 { void elevator(int[]a1) { int[]ar=a1.clone(); int x=1; int a= ar[0]; int b= ar[1]; int c= ar[2]; if(b>c) { if((a-x)<((b-c)+(c-x))) { System.out.println("1"); } else if((a-x)>((b-c)+(c-x))) { System.out.println("2"...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
7b9766ec477676f8cf30728569795e16
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Two_Elevator { static Scanner sc = new Scanner(System.in); public static int solve(int[] arr){ int a = arr[0]; int b = arr[1]; int c = arr[2]; if(a == 1) return a; int count1 = a - 1; int count2 = 0; if(b...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
e30010b2aa6f3f3320e72dea361af32d
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.*; public class practice { public static void main(String[] args) { Scanner get = new Scanner(System.in); int a = get.nextInt(); for(int b=1;b<=a;b++) { long x = get.nextLong(); long y = get.nextLong(); long z = get.nextLong()...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
018820ed90f7ebf771085b0d82135109
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
// A. Two Elevators import java.util.Scanner; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String args[]){ Scanner scanner = new Scanner(System.in); int numTimes = scanner.nextInt(); // Will contain Lists of abc List<...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
938a283188bf527e1c23647de85efdc3
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
256 megabytes
import java.util.Scanner; public class Ab { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int t = sc.nextInt(); while (t-- > 0) { solve(); } } private static void solve() { int a = sc.nextInt(); i...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output
PASSED
eeb651c9dbb04b2807745c76caaa9191
train_110.jsonl
1662993300
Vlad went into his appartment house entrance, now he is on the $$$1$$$-th floor. He was going to call the elevator to go up to his apartment.There are only two elevators in his house. Vlad knows for sure that: the first elevator is currently on the floor $$$a$$$ (it is currently motionless), the second elevator is lo...
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 == n...
Java
["3\n\n1 2 3\n\n3 1 2\n\n3 2 1"]
1 second
["1\n3\n2"]
NoteIn the first test case of the example, the first elevator is already on the floor of $$$1$$$.In the second test case of the example, when called, the elevators would move as follows: At the time of the call, the first elevator is on the floor of $$$3$$$, and the second one is on the floor of $$$1$$$, but is alread...
Java 17
standard input
[ "math" ]
aca2346553f9e7b6e944ca2c74bb0b3d
The first line of the input contains the only $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. This is followed by $$$t$$$ lines, three integers each $$$a$$$, $$$b$$$ and $$$c$$$ ($$$1 \le a, b, c \le 10^8$$$, $$$b \ne c$$$) — floor numbers described in the statement.
800
Output $$$t$$$ numbers, each of which is the answer to the corresponding test case. As an answer, output: $$$1$$$, if it is better to call the first elevator; $$$2$$$, if it is better to call the second one; $$$3$$$, if it doesn't matter which elevator to call (both elevators will arrive in the same time).
standard output