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 | 7eed6f6720c14bcaedf3786158fe25fc | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
import java.io.*;
public class B
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-- > 0) {
int n = sc.nextInt();
String s = sc.next();
String res = "";
for(int i = n - 1; i >... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | e2bde0170fca6d9490c522b5ce44da8b | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes |
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class FileHandler {
BigInteger fib(int n){
BigInteger a = new BigInteger("1");
BigInteger b = new BigInteger("1");
BigInteger s = new BigInteger("2");
if(n == 1 || n == 2)
return ... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 4298462244d051a27b9e0b7c1fa823a9 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes |
import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
for (int p = 0; p < N; p++) {
int n=sc.nextInt();
char[] ch=sc.next().toCharArray();
StringBuilder sb... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | a6bc948aaa6c7490ead4ff4ef2319fb0 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | /*
Author:-crazy_coder-
*/
import java.io.*;
import java.util.*;
public class cp{
static int ans=0;
static BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
static PrintWriter pw=new PrintWriter(System.out);
public static v... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 6fe6111c597352f3b16a5e3ba907c8ce | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
public class examplee {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
ArrayList<String> array = new ArrayList<>();
int q = in.nextInt();
char[] abs = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o'... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | ca5cd80b0e581ab2e00c8fa6025ee33c | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int t = scn.nextInt();
for(int i = 0; i < t; i++){
int n = scn.nextInt();
scn.nextLine();
String str = scn.nextLine();
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 1f6eb7e6c95898821e6b78f80a2a2f12 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;
public class CodeF
{
public static void main(String[] args)throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int t=Integer.parseInt(br.readLi... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | ddf510daf63d71f587377f758f24b22c | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
import java.io.*;
public class B {
public static void main(String[] args) throws IOException {
Reader sc = new Reader();
PrintWriter out = new PrintWriter(System.out);
int t = sc.nextInt();
while(t-- > 0) {
int n = sc.nextInt();
ch... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 0e933f4d4e1bb8a6ac6db4370c312365 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner read = new Scanner(System.in);
int test = read.nextInt();
while(test-- > 0){
int n = read.nex... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | c437d2d59cbe8e8d68007047668adfd5 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
public class Solution {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int i= 0; i< t; i++){
int n = sc.nextInt();
String st = sc.next();
String res = findAnswer(st);
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 50d9fcf1115144ae067a225025318043 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
public class testImp {
static void fun2(String str) {
String res = "";
//System.out.println("-> " + str);
for(int i = 0; i < str.length(); i++) {
if(str.charAt(i) == '0') continue;
if(i == str.length() - 3 && str.charAt(i + 2) == '0') {
res += (char)(I... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | c74acd1f3a6e1ead99c9391638d788d1 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
public class testImp {
static void fun1(int a, int b, int c) {
int ab = Math.abs(b - c) + Math.abs(c - 1);
int bc = Math.abs(a - 1);
int ans = 3;
if (ab < bc) ans = 2;
if (bc < ab) ans = 1;
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 114fc2798287ab335230199ba8799f8b | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.ArrayDeque;
import java.util.Scanner;
public class code {
public static void main(String[] args) {
ArrayDeque<Integer> st = new ArrayDeque<>();
String str;
int t, n;
Scanner sc = new Scanner(System.in);
StringBuilder ans = new StringBuilder();
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | c81a4c694e8f1e81cde0c28bb04a42be | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
import java.util.stream.Collectors;
public class CDF5polyCarp {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
char[] alpha = "abcdefghijklmnopqrstuvwxyz".toCharArray();
while(t>0) {
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | e3c95afedaeeff77b28df7c4e15fe525 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
new Thread(null, () -> new Main().run(), "1", 1 << 23).start();
}
private void run() {
FastReader scan = new FastReader();
PrintWriter out = new PrintWriter(System.out);
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 56f219112d78f59e5c7a212d00d332e8 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class B_Decode_String {
public static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader(){
br = new BufferedReade... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 0dee3e8aab3966957adbacb41c0060b9 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes |
import java.io.*;
import java.util.*;
public class Main {
static Deque<Character> q = new LinkedList<>();
public static void main(String[] args) throws IOException {
Reader read = new Reader();
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
int t = read.... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 94c5b5650362f4fe3d8ceabcb186539a | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
public class MyClass {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int t = scn.nextInt();
while(t-- > 0){
int n = scn.nextInt();
String str = scn.next();
String res = "";
for(int i=n-1;i>=0;i--){
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | dd9cf2df3aecb21ffd5b6de2c6c3c100 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes |
import java.util.ArrayList;
import java.util.Scanner;
public class Contest {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t;
t = sc.nextInt();
String result[] = new String[t];
for (int i = 0; i < t; i++) {
int ... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 2fe6e1582aad03d69bc1b52364ca0349 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes |
import java.util.*;
public class Main {
static Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
// Your code here
long t= scan.nextLong();
while(t>0){
int n= scan.nextInt();
String s= scan.next();
StringBuilder sb=new Strin... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 8ae9dd38939e287de52426efc10564fd | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | //created by Toufique on 12/09/2022
import java.io.*;
import java.util.*;
public class Div3_820B {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int t = in.nextInt();
for (int tt = 0; tt < t; ... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 332781e94297cc76928baa53a30780ca | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.io.*;
import java.util.*;
public class p1
{
BufferedReader br;
StringTokenizer st;
BufferedWriter bw;
public static void main(String[] args)throws Exception
{
new p1().run();
}
void run()throws IOException
{
br = new BufferedReader(new InputStreamReader(System.in));
bw=new Bu... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 7c12aa7cc708f7f8177d6a48a4d027ec | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
static boolean isfile = false;
static final String FileName = "input";
static PrintWriter out = new PrintWriter(System.out);
static FastReader fr = new FastReader();
static int OO = (int) 1e9;
public static void main(String[] args) throws Fil... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 32a64d50e9310f7de3b244c84fc7516c | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.Scanner;
public class Test2 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int q=sc.nextInt();
while (q-->0){
int n=sc.nextInt();
String s=sc.next();
int i=n-1;
StringBuilder sb=new Str... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | b07826c98502764a21326b142f974f1b | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes |
//Gaurav......
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;
import java.io.*;
import java.util.*;
import java.util.List;
import java.util.stream.Collectors;
import... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 0780b689d8d70e7608127e80e098f6ef | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 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 n = sc.nextInt();
String s = sc.next();
StringBuilder str = new StringBuilder();
for(int j=n-1;j>=... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | e95a6a4f7e657f7ac1416548c0000837 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
int n=sc.nextInt();
String s=sc.next();
StringBuffer sb=new StringBuffer();
for(int i=s.length()-1;i>=0;){
if(s.charAt(i)!='0') {
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | d382d36f5e3057202744032161f9f783 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 09f23a1cb451a0c3b1f1fa1daa041a1f | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | //package com.company;
import java.io.*;
import java.util.*;
public class Cf_0 {
private static class FastReader {
InputStream is;
private byte[] inbuf = new byte[1024];
private int lenbuf = 0, ptrbuf = 0;
public FastReader(InputStream is) {
this.is = is;
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 3d8b1c3df3e849eae6a018bf262de128 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
import java.io.*;
public class B1729 {
static FastScanner sc = new FastScanner();
public static void main(String[] args) {
int T = sc.nextInt();
while (T-- > 0) {
solve();
}
}
public static void solve() {
int n = sc.nextInt();
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 9b20b68409a782c1b8461669c7a58fbe | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.Scanner;
public class Decode {
public static void main(String arg[])
{
Scanner scan=new Scanner(System.in);
int t=scan.nextInt();
for(int i=0;i<t;i++)
{
int l=scan.nextInt();
String str=scan.next();
int j=l-1;
String str1="";
while(j>=0)
{
if(str.charAt(j)=... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 20536b4048cc7e30b0bba407a5da2d61 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | //package com.company;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.stream.IntStream;
import java.math.*;
public class Scanner {
static boolean[] x;
StringTokenizer st;
BufferedReader br;
public Scanner(... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | a6284a9950dc4d4d9723310ea836b2a8 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 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();
scanner.nextLine();
while (t-- != 0) {
int n = scanner.nextInt();
scanner.nextLine();
S... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | e17c64133042d74b74a5a8215d8e1155 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes |
import java.util.Scanner;
public class ProblemB {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int test = 0; test < t; test++) {
int n = sc.nextInt();
String s = sc.next();
int j =... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 72809be377b8668808111cf6f6413d92 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes |
//https://codeforces.com/contest/1729/problem/B
import java.util.Scanner;
public class DecodeString {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
while (t-- > 0) {
int n = scan.nextInt();
String... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 83e514756ce86f6bd95f72e68da4b779 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.Scanner;
public class Decode {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
for (int i = 0; i < t; i++) {
int l = in.nextInt();
l--;
in.nextLine();
String code = in.nextLi... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | c6e4eb100845050ae15afb6df96271b8 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.io.*;
import java.util.*;
/*
*/
public class B{
static FastReader sc=null;
public static void main(String[] args) {
sc=new FastReader();
int t=sc.nextInt();
for(int tt=0;tt<t;tt++) {
int n=sc.nextInt();
char a[]=sc.next().toCharArray();
String ans="";
for(... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 69f79417e09a243fb6557730177a0c7d | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
public class coding{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int test = sc.nextInt();
while(test>0){
int n = sc.nextInt();
sc.nextLine();
String s = sc.nextLine();
String ans = "";
for(int i=s.length()-1;i>=0;i--){... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | d13b6e8a6f729d10aab94416b2704e5c | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
public static void main(String[] args) throws IOException {
OutputStreamWriter osr = new OutputStreamWriter(System.out);
PrintWriter out = new PrintWriter(osr);
FastReader fr = new FastReader();
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 7bdb5ad70261f4c6bd4d2a78e248db45 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.Scanner;
public class test290 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t=in.nextInt();
for(int j=0;j<t;j++) {
int n=in.nextInt();
char[] a=in.next().toCharArray();
String s="";
for(int i=n-1;i>=0;i--) {
if(a[i]=='0') {
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | db7fa12fa1b12dbcfef175d6d61c2fc0 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | // 48 to 57
import java.util.*;
public class A1729
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
int q = sc.nextInt();
for(int qq=0;qq<q;qq++)
{
String s = "";
int n = sc.nextInt();
String t = sc.next();
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 202bb00eb168f5cd637a548ea88ff749 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.io.*;
import java.util.*;
public class Skeleton {
public Skeleton() {
// TODO Auto-generated constructor stub
}
static class FastReader {
public BufferedReader br;
public StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 462b5ee45b031a52794b80bf0e8d411c | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.util.Scanner;
public class decodeString800 {
public static void main(String[] args) throws Exception
{
Scanner sc = new Scanner(System.in);
int inp = sc.nextInt();
while(inp-->0)
{
int n = sc.nextInt();
String str = sc.next();
... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | b3354d829df8806cae51e5eafae03b94 | train_110.jsonl | 1662993300 | Polycarp has a string $$$s$$$ consisting of lowercase Latin letters.He encodes it using the following algorithm.He goes through the letters of the string $$$s$$$ from left to right and for each letter Polycarp considers its number in the alphabet: if the letter number is single-digit number (less than $$$10$$$), then ... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class B_Decode_String {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
in... | Java | ["9\n\n6\n\n315045\n\n4\n\n1100\n\n7\n\n1213121\n\n6\n\n120120\n\n18\n\n315045615018035190\n\n7\n\n1111110\n\n7\n\n1111100\n\n5\n\n11111\n\n4\n\n2606"] | 1 second | ["code\naj\nabacaba\nll\ncodeforces\naaaak\naaaaj\naaaaa\nzf"] | NoteThe first test case is explained above.In the second test case, the answer is aj. Indeed, the number of the letter a is equal to $$$1$$$, so 1 will be appended to the code. The number of the letter j is $$$10$$$, so 100 will be appended to the code. The resulting code is 1100.There are no zeros in the third test ca... | Java 8 | standard input | [
"greedy",
"strings"
] | 43081557fe2fbac39dd9b72b137b8fb0 | The first line of the input contains an integer $$$q$$$ ($$$1 \le q \le 10^4$$$) — the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of the given code. The second line of the ... | 800 | For each test case output the required string $$$s$$$ — the string that gives string $$$t$$$ as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. | standard output | |
PASSED | 10b333f92f2af0541f6aecb1a2c29faa | 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 Experts {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
long t=input.nextLong();
while(t>=1){
long a=input.nextLong();
long b=input.nextLong();
long c=input.nextLong();
if(a==1){
System.out.pr... | 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 | b76f33b847781066728d894394b40c90 | 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 file{
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 | a28182ab29820edff268cb3f1a5cb77f | 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.System.*;
import static java.util.Arrays.*;
public class Main {
private final static FastScanner in = new FastScanner();
private final static String endl = "\n";
private static BufferedReader br;
public static void main( String[] ... | 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 | e416cf4dca821b02662ed76237c6ba1d | 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 Solve {
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 | d1b3016938ccc404a3f3143f23f70035 | 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 testCase = in.nextInt();
// while (testCase--!=0){
//
// }
for (int i = 0; i <testCase ; i++) {
//First Elevator
... | 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 | e2bee12f0561eda5e6600e9cd5ac3b6e | 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;
/**
* Accomplished using the EduTools plugin by JetBrains https://plugins.jetbrains.com/plugin/10081-edutools
*
* To modify the template, go to Preferences -> Editor -> File and Code Templates -> Other
*/
public class Main {
public static void main(String[] args) {
// Write your... | 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 | b626ad10fa4d969caeb4cf50c900bcf5 | 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 code {
static long TIME_START, TIME_END;
public static class Task {
public void solve(Scanner sc, PrintWriter pw) throws IOException {
//code here...
int t=sc.nextInt();
for(int i=0;i<t;i++){
int a=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 | 9050a800cfaf64eae75d629f8cc19978 | 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 jin=new Scanner(System.in);
int t=jin.nextInt();
while(t-->0){
int a=jin.nextInt();
int b=jin.nextInt();
int c=jin.nextInt();
int diffa=Math.abs(a-1);
int diff... | 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 | 5038510e5ecd0ce53054c53376a3e15d | 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 jin=new Scanner(System.in);
int t=jin.nextInt();
while(t-->0){
int a=jin.nextInt();
int b=jin.nextInt();
int c=jin.nextInt();
int diffa=Math.abs(a-1);
int di... | 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 | b1d045a5f70845e026b74d7d9f6a0ece | 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 className1{
public static void main(String args[]) {
Scanner scanner=new Scanner(System.in);
int numInputs=scanner.nextInt();
scanner.nextLine();
while(numInputs-->0) {
String line=scanner.nextLine();
String[] bits=line.split(" ");
int[] num... | 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 | c5193a6837db25f1bec6849b574696be | 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 cff {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
for (int i = 0; i < t; i++) {
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nex... | 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 | ed88a5c709f3b2bbec861c97a4f8cebc | 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 Codeforces {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
for (int i = 0; i < n; i++) {
int a = in.nextInt() - 1;
int b = in.nextInt();
int c = in.nextI... | 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 | 00e32e369617058730f74b12019dd354 | 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.*;
public class Median {
public static void main(String[] args) {
FastReader sc = new FastReader();
int t = sc.nextInt();
while(t-- != 0) {
int a = 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 | f74ede8ee57d59591d93fef8d14151ce | 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.*;
public class Median {
public static void main(String[] args) {
FastReader sc = new FastReader();
int t = sc.nextInt();
while(t-- != 0) {
int a = 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 | d2820c37f0b8940b210e195ece32537b | 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 scn = new Scanner(System.in);
int count = scn.nextInt();
for (int i = 0; i < count; i++) {
int a = scn.nextInt();
int b = scn.nextInt();
int c = scn.ne... | 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 | 0b49fa32fd0d851cac36901d03cef917 | 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 testCase = scanner.nextInt();
int time = 0;
int temi = 0;
int[] d = new int[3];
int[] results = new int[testCase];
for (int i = 0; i < testCase; 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 | b292711ed320e96302d843971241e2aa | 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 ProbE {
static int T;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(System.out);
StringTokenizer st = new StringTokenizer(br.read... | 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 | c83fa4b1f1db9a0fc4b126561eadc1e8 | 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.IOException;
public class Solution {
static class Reader {
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public Reader() {
... | 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 | 6aec94629d808d6090dd3890f37eda0b | 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 Solution {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
while (t-- > 0) {
int a = s.nextInt(), b = s.nextInt(), c = s.nextInt();
char ans = '0';
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 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 | 16faa3bef6e7ebf9022d7b0ce8ecc472 | 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 Solution {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
StringBuilder ans = new StringBuilder();
while (t-- > 0) {
int a = s.nextInt(), b = s.nextInt(), 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 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 | ad569291e0f8d23dfffe39f7f1537ab3 | 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.IOException;
public class Solution {
static class Reader {
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public Reader() {
... | 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 | 30d632aa1c892b2587793a2c6517febc | 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 n=sc.nextInt();
int t1;
int t2=0;
for(int i=0;i<n;i++){
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 | 6446996b7a5c91b81b69f4a5079799e0 | 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 leet {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
for (int k = 0; k <n; k++) {
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 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 | 6b9c64c856a40a6944cf7a4b981e7f03 | 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.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class Main {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new Buf... | 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 | 3f4ae7178d58a3259245b2afda425103 | 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.Scanner;
public class TwoElevators {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int test = input.nextInt();
while (test-- > 0){
int a = input.nextInt(),b = input.nextInt(),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 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 | 864a64d887ca85c31a80911f4c311740 | 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 void main(String[] args) {
Scanner in = new Scanner(System.in);
int caseNum = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc.
for (int t = 1; t <= caseNum; ++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 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 | 35d8cf5a4a24393c6db0b1e831a9db00 | 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 Atask {
public static void main(String[] args) {
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();
... | 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 | f9e4f0081a22d5dba2a8a0e0eeae7996 | 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 | // Working program using Reader Class
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Scanner;
import java.util.StringTokenizer;
import javax.lang.model.util.ElementScanner6;
//====== +++++... | 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 | b73e276ca39acf13a6a4bbb819424e6a | 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 test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long t = sc.nextLong();
for (long i = 0; i < t; i++) {
long a = sc.nextLong();
a--;
long b = sc.nextLong();
long c = sc.nextLong();
long d = Math.abs(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 | ab31bfb8b416558dc052d611bf5f46a7 | 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 void main(String[] args) {
Scanner input = new Scanner(System.in);
double inp = input.nextDouble();
double arr[] = new double [3];
int j;
// ArrayList <Integer> arr = new ArrayList<>();
... | 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 | c270ba2146700195f412f129f04816ad | 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.*;
import java.util.*;
/*
author : Multi-Thread
*/
public class A {
//public class Main {
// static int INF = 998244353;
static int INF = (int) 1e9 + 7;
static int MAX = Integer.MAX_VALUE;
static int MIN = Integer.MIN_VALUE;
public static void main(String[] 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 | e2485a865b5526a51e4629ac16f754b8 | 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.lang.*;
import java.util.*;
import java.util.Collection;
import static java.lang.Math.*;
import java.math.BigInteger;
public class Main implements Runnable
{
static char[] arr;
public int maxSubArray(int[] arr, int n)
{
int local_max = 0;
int globa... | 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 | 7e349c5e3a84251ea59ecd5b1e957a8a | 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 | c80765c764ad79a1b1dd79ae599a71fd | 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 in = new Scanner(System.in);
int a, b, c, t;
t = in.nextInt();
int arr[] = new int[t];
for(int i = 0; i < t; i++){
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
if(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 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 | 7aa35368c8df67597e4c4356691fe1d9 | 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.... | 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 | 75abe88e13935d828c5555bfbaaaedc5 | 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 | // Working program with FastReader
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
import java.lang.*;
import java.util.stream.*;
import java.util.stream.Collectors;
public class Main... | 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 | 517ea635c57fc542e94780376ea9bc3a | 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.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;
public class A {
static FastScanner fs = new FastScanner();
public static void main(String[] args) {
// int tc = 1;
int tc... | Java | ["3\n\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 | 01c47c39ccfc6d002d32660b7518240c | 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 scr = new Scanner(System.in);
int t = Integer.parseInt(scr.nextLine());
while(t > 0) {
int a = scr.nextInt()-1;
int x = scr.nextInt();
int y = scr.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 | 4c51b0a28e6966e01e02ff2bcff02d7d | 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.text.SimpleDateFormat;
import java.time.LocalTime;
import java.util.*;
import static java.lang.Math.max;
public class CodeForces {
static int MOD = 100007;
public static void main(String[] args) throws java.lang.Exception {
//PlayOff();
/*Interview 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 | 5316cbda2f6a33521d620a13a9d31837 | 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 t = input.nextInt();
for (int i = 0; i < t; ++i) {
int a = input.nextInt();
int b = input.nextInt();
int c = input.... | 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 | 3b9a07bf62a1793d39f44789dfe71456 | 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;
/**
*
* @author Lenovo
*/
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int t = input.nextInt();
for (int tc = 0; tc < t; tc++) {
int a = input.nextInt();
int b = 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 | 1cea1dd2c0ba808124308ac006281e40 | 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 Himansu {
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)
System.out.println(a);
else {
... | 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 | 7bf0c2fd01f64d3e6ee326090265443f | 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 | // Working program with FastReader
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class StringTask {
static class FastReader {
BufferedReader br;
StringTokenizer st;
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 | 6f8c88460c25026235ada24eaada4e93 | 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 static java.lang.Math.abs;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
public class A {
private static final Scanner IN = new Scanner (System.in);
private static final OutputStream OS = System.out;
public static void main (final String[] args) ... | 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 | 8b7bdf620b604422cf94748e214ca3fa | 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 Codeforces {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int t = input.nextInt();
int[] arr = new int[t];
for (int i = 0; i < arr.length; i++) {
int a = input.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 | fb8e7794284ccc117eedb92a1b3db0c5 | 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.Arrays;
public class Acmp {
public static void main(String[] args) {
Scanner ai = new Scanner(System.in);
int a = ai.nextInt();
while(a-- > 0){
int[] arr = new int[3];
for(int i = 0; i < 3; i++){
arr[i] = ai.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 | 22b2803f16623ced974b7985dd948da5 | 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.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
public class questions {
public static void main(String[] args) {
solve();
}
static void solve()
{
Scanner sc = new Scanner(System.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 | 89e710b495d8c2fadb9ac360b12f3fe0 | 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 pariNa {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
StringBuilder finalAnswer=new StringBuilder();
//finalAnswer.append().append('\n');
int t=sc.nextInt();
outer:
while(t-->0){
long a=sc.nextLong();
long 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 | 2bd0168c04ec36e64446037eb50993e0 | 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.ne... | 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 | 799da91de9036af546efd28d367865d7 | 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 {
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,b,c;
a = sc.nextInt();
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 | 06b8fe81910db0b4e79ed23a5a2df7df | 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 Task1 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int testCount = Integer.parseInt(scanner.nextLine());
for (int i = 0; i < testCount; i++) {
String s = scanner.nextLine();
Stri... | 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 | d92f91c8284dc04949c62da6d8986285 | 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 question4 {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int t=sc.nextInt();
int a[]= new int[t];
int b[]= new int[t];
int c[]= new int[t];
for(int i=0; i<t; i++) {
a[i] = sc... | 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 | c1ecc2be793b7392719cd800c34db4b0 | 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) {
Scanner stdin = new Scanner(System.in);
int numCases = stdin.nextInt();
for (int i = 0; i < numCases; i++) {
int a = stdin.nextInt();
int b = stdin.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 | e2b66875e7a07f0153fd4d7a4d7a97e0 | 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);
int n = sc.nextInt();
sc.nextLine();
while(n>0) {
int a = sc.nextInt();
int b = 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 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 | 1dcd230900ebbd1108c838afdb5e836d | 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 final class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
sc.nextLine();
for( int i = 0; i < t; i++ ) {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int dif_b = 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 | 482cd4c66038cb0d47578d99bbec40e1 | 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) {
try {
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.