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 | d5daa818f71ed93ca18038d56f906f21 | train_000.jsonl | 1593873900 | This is an interactive problem.Anton and Harris are playing a game to decide which of them is the king of problemsetting.There are three piles of stones, initially containing $$$a$$$, $$$b$$$, and $$$c$$$ stones, where $$$a$$$, $$$b$$$, and $$$c$$$ are distinct positive integers. On each turn of the game, the following... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java... | Java | ["5 2 6\n\n\n3\n\n0"] | 1 second | ["First\n2\n\n3"] | NoteIn the sample input, the piles initially have $$$5$$$, $$$2$$$, and $$$6$$$ stones. Harris decides to go first and provides the number $$$2$$$ to Anton. Anton adds $$$2$$$ stones to the third pile, which results in $$$5$$$, $$$2$$$, and $$$8$$$.In the next turn, Harris chooses $$$3$$$. Note that Anton cannot add th... | Java 11 | standard input | [
"math",
"constructive algorithms",
"games",
"interactive"
] | 351c6fb0a9d1bbb29387c5b7ce8c7f28 | The first line of input contains three distinct positive integers $$$a$$$, $$$b$$$, and $$$c$$$ ($$$1 \le a, b, c \le 10^9$$$) — the initial number of stones in piles $$$1$$$, $$$2$$$, and $$$3$$$ respectively. | 2,600 | null | standard output | |
PASSED | 0ac9a251b47d2a96dddcf24ad71660eb | train_000.jsonl | 1593873900 | This is an interactive problem.Anton and Harris are playing a game to decide which of them is the king of problemsetting.There are three piles of stones, initially containing $$$a$$$, $$$b$$$, and $$$c$$$ stones, where $$$a$$$, $$$b$$$, and $$$c$$$ are distinct positive integers. On each turn of the game, the following... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
public class F {
public static void main(String[] args)throws IOException {
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
long a = sc.nextInt();
long b = sc.nextInt();
long c = sc.nextInt();
long query = 1000000... | Java | ["5 2 6\n\n\n3\n\n0"] | 1 second | ["First\n2\n\n3"] | NoteIn the sample input, the piles initially have $$$5$$$, $$$2$$$, and $$$6$$$ stones. Harris decides to go first and provides the number $$$2$$$ to Anton. Anton adds $$$2$$$ stones to the third pile, which results in $$$5$$$, $$$2$$$, and $$$8$$$.In the next turn, Harris chooses $$$3$$$. Note that Anton cannot add th... | Java 11 | standard input | [
"math",
"constructive algorithms",
"games",
"interactive"
] | 351c6fb0a9d1bbb29387c5b7ce8c7f28 | The first line of input contains three distinct positive integers $$$a$$$, $$$b$$$, and $$$c$$$ ($$$1 \le a, b, c \le 10^9$$$) — the initial number of stones in piles $$$1$$$, $$$2$$$, and $$$3$$$ respectively. | 2,600 | null | standard output | |
PASSED | 7134a43ea3e4045541741b0707e6e9f7 | train_000.jsonl | 1593873900 | This is an interactive problem.Anton and Harris are playing a game to decide which of them is the king of problemsetting.There are three piles of stones, initially containing $$$a$$$, $$$b$$$, and $$$c$$$ stones, where $$$a$$$, $$$b$$$, and $$$c$$$ are distinct positive integers. On each turn of the game, the following... | 256 megabytes | //package global9;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class F2 {
Scanner in;
PrintWriter out;
String INPUT = "";
void solve()
{
int n = 3;
long[] a = new long[n];
for(int i = 0;i < n;i++) {
a[i] = ni();
}
out.println("First");
out.flush();
l... | Java | ["5 2 6\n\n\n3\n\n0"] | 1 second | ["First\n2\n\n3"] | NoteIn the sample input, the piles initially have $$$5$$$, $$$2$$$, and $$$6$$$ stones. Harris decides to go first and provides the number $$$2$$$ to Anton. Anton adds $$$2$$$ stones to the third pile, which results in $$$5$$$, $$$2$$$, and $$$8$$$.In the next turn, Harris chooses $$$3$$$. Note that Anton cannot add th... | Java 11 | standard input | [
"math",
"constructive algorithms",
"games",
"interactive"
] | 351c6fb0a9d1bbb29387c5b7ce8c7f28 | The first line of input contains three distinct positive integers $$$a$$$, $$$b$$$, and $$$c$$$ ($$$1 \le a, b, c \le 10^9$$$) — the initial number of stones in piles $$$1$$$, $$$2$$$, and $$$3$$$ respectively. | 2,600 | null | standard output | |
PASSED | df84a1e067bcfca08c917db4531d4878 | train_000.jsonl | 1593873900 | This is an interactive problem.Anton and Harris are playing a game to decide which of them is the king of problemsetting.There are three piles of stones, initially containing $$$a$$$, $$$b$$$, and $$$c$$$ stones, where $$$a$$$, $$$b$$$, and $$$c$$$ are distinct positive integers. On each turn of the game, the following... | 256 megabytes |
import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
try{
PrintWriter out = new PrintWriter(System.out);
long[] a=new long[3];
for(int i=0;i<3;i++){
a[i]=in.nextInt();
... | Java | ["5 2 6\n\n\n3\n\n0"] | 1 second | ["First\n2\n\n3"] | NoteIn the sample input, the piles initially have $$$5$$$, $$$2$$$, and $$$6$$$ stones. Harris decides to go first and provides the number $$$2$$$ to Anton. Anton adds $$$2$$$ stones to the third pile, which results in $$$5$$$, $$$2$$$, and $$$8$$$.In the next turn, Harris chooses $$$3$$$. Note that Anton cannot add th... | Java 11 | standard input | [
"math",
"constructive algorithms",
"games",
"interactive"
] | 351c6fb0a9d1bbb29387c5b7ce8c7f28 | The first line of input contains three distinct positive integers $$$a$$$, $$$b$$$, and $$$c$$$ ($$$1 \le a, b, c \le 10^9$$$) — the initial number of stones in piles $$$1$$$, $$$2$$$, and $$$3$$$ respectively. | 2,600 | null | standard output | |
PASSED | f4357c657f57f07d7591b21676becf65 | train_000.jsonl | 1593873900 | This is an interactive problem.Anton and Harris are playing a game to decide which of them is the king of problemsetting.There are three piles of stones, initially containing $$$a$$$, $$$b$$$, and $$$c$$$ stones, where $$$a$$$, $$$b$$$, and $$$c$$$ are distinct positive integers. On each turn of the game, the following... | 256 megabytes | import java.io.*;
import java.text.*;
import java.util.*;
import java.math.*;
public class template {
public static void main(String[] args) throws Exception {
new template().run();
}
public void run() throws Exception {
FastScanner f = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
///
... | Java | ["5 2 6\n\n\n3\n\n0"] | 1 second | ["First\n2\n\n3"] | NoteIn the sample input, the piles initially have $$$5$$$, $$$2$$$, and $$$6$$$ stones. Harris decides to go first and provides the number $$$2$$$ to Anton. Anton adds $$$2$$$ stones to the third pile, which results in $$$5$$$, $$$2$$$, and $$$8$$$.In the next turn, Harris chooses $$$3$$$. Note that Anton cannot add th... | Java 11 | standard input | [
"math",
"constructive algorithms",
"games",
"interactive"
] | 351c6fb0a9d1bbb29387c5b7ce8c7f28 | The first line of input contains three distinct positive integers $$$a$$$, $$$b$$$, and $$$c$$$ ($$$1 \le a, b, c \le 10^9$$$) — the initial number of stones in piles $$$1$$$, $$$2$$$, and $$$3$$$ respectively. | 2,600 | null | standard output | |
PASSED | c8f43d2ea8d0b5802a65c8b6dcdd9144 | train_000.jsonl | 1593873900 | This is an interactive problem.Anton and Harris are playing a game to decide which of them is the king of problemsetting.There are three piles of stones, initially containing $$$a$$$, $$$b$$$, and $$$c$$$ stones, where $$$a$$$, $$$b$$$, and $$$c$$$ are distinct positive integers. On each turn of the game, the following... | 256 megabytes | import java.util.*;
public class Question6 {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
long[] arr = new long[3];
arr[0] = sc.nextLong();
arr[1] = sc.nextLong();
arr[2] = sc.nextLong();
long max = -1;long other = -1;
long maxi = 0;long min = -1;
if(arr[0] >=... | Java | ["5 2 6\n\n\n3\n\n0"] | 1 second | ["First\n2\n\n3"] | NoteIn the sample input, the piles initially have $$$5$$$, $$$2$$$, and $$$6$$$ stones. Harris decides to go first and provides the number $$$2$$$ to Anton. Anton adds $$$2$$$ stones to the third pile, which results in $$$5$$$, $$$2$$$, and $$$8$$$.In the next turn, Harris chooses $$$3$$$. Note that Anton cannot add th... | Java 11 | standard input | [
"math",
"constructive algorithms",
"games",
"interactive"
] | 351c6fb0a9d1bbb29387c5b7ce8c7f28 | The first line of input contains three distinct positive integers $$$a$$$, $$$b$$$, and $$$c$$$ ($$$1 \le a, b, c \le 10^9$$$) — the initial number of stones in piles $$$1$$$, $$$2$$$, and $$$3$$$ respectively. | 2,600 | null | standard output | |
PASSED | 2dabf5a4f2248b84360eeed60a28568d | train_000.jsonl | 1593873900 | This is an interactive problem.Anton and Harris are playing a game to decide which of them is the king of problemsetting.There are three piles of stones, initially containing $$$a$$$, $$$b$$$, and $$$c$$$ stones, where $$$a$$$, $$$b$$$, and $$$c$$$ are distinct positive integers. On each turn of the game, the following... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class... | Java | ["5 2 6\n\n\n3\n\n0"] | 1 second | ["First\n2\n\n3"] | NoteIn the sample input, the piles initially have $$$5$$$, $$$2$$$, and $$$6$$$ stones. Harris decides to go first and provides the number $$$2$$$ to Anton. Anton adds $$$2$$$ stones to the third pile, which results in $$$5$$$, $$$2$$$, and $$$8$$$.In the next turn, Harris chooses $$$3$$$. Note that Anton cannot add th... | Java 11 | standard input | [
"math",
"constructive algorithms",
"games",
"interactive"
] | 351c6fb0a9d1bbb29387c5b7ce8c7f28 | The first line of input contains three distinct positive integers $$$a$$$, $$$b$$$, and $$$c$$$ ($$$1 \le a, b, c \le 10^9$$$) — the initial number of stones in piles $$$1$$$, $$$2$$$, and $$$3$$$ respectively. | 2,600 | null | standard output | |
PASSED | 29a54382d71eb71fdb252ca56928c7ef | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.Scanner;
public class DoorsBreaking {
public static void main(String [] args)
{ Scanner s = new Scanner(System.in);
int n = s.nextInt();
int x = s.nextInt();
int y = s.nextInt();
int arr[] = new int[n];
for (int i = 0; i < n; i++) {// for reading array
arr[i] = s.nextInt();
}
i... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 8008936106188faa8455fb230b3b41d8 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader inp = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | ec1d1e1369de4f20dd689adc138f65e5 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
public class Main {
static class Data implements Comparable<Data> {
int data, index, color;
public Data(int d, int i) {
data = d;
index = i;
}
@Override
public int compareTo(Data o) {
if (this.data > o.data)
... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 95a6aae1d555864645ec8dd06f9fc332 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class DoorBreakAndRep {
public static void main(String args[]) throws IOException {
FastReader in = new FastReader();
OutputStream outputStream = System.out;
PrintWriter out = new PrintWriter(outputStream);
Task.solve... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 7f04fc600d7cd2be5e57f1e03cbc2c24 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.Scanner;
public class walls {
public static void main(String [] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x = sc.nextInt();
int y = sc.nextInt();
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = sc.nextInt();
}
int ans = 0;
if (x > y) {
... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 2bf626d1fced53dc46a065dbeacdd67a | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class DoorsBreakingAndRepairing {
public static void main(String [] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String [] params = br.readLine().trim().split... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | a828749f613939694147fb7683902ddf | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
import java.io.*;
import java.lang.*;
public class Solution
{
public static int findMinRec(int arr[], int i,
int sumCalculated,
int sumTotal)
{
if (i == 0)
return Math.abs((sumTotal-sumCalculated) -
sumCalculated);
return Math.min(findMinRec(arr... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 936fad4c35d4c67b89b20278a2ec55b0 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.Arrays;
import java.util.Scanner;
public class solving {
public static void main(String args[])
{
Scanner scan=new Scanner(System.in);
int n=scan.nextInt();
int destroy=scan.nextInt();
int make=scan.nextInt();
int ar[]=new int[n];
int once=0;
for(int i=0;i<n;i++)
{
ar[i]=scan.ne... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | f1e68c5526c3e9c45ca4846f54063637 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
import java.net.*;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class cf
{
public static void merge(int arr[], int l, int m, int r)
{
int n1 = m - l + 1;
int n2 = r - m;
int L[] = new int [n1];
... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 11007c840d0e7cfca722f82becefa4d2 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
import java.io.*;
public class P1102C {
private static void solve() {
int n = nextInt();
int x = nextInt();
int y = nextInt();
if (x > y) {
System.out.println(n);
return;
}
int cnt = 0;
for (int i = 0; i < n; i++) {
int a = nextInt();
if (a <... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | d64991e61398705e1b6ab3c080d648c4 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.Scanner;
public class CF1102C {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x = sc.nextInt();
int y = sc.nextInt();
if(x > y){
System.out.println(n);
} else {
int... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | a8f3986f2c38995d9310a45f1f8879d3 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class CF1102C {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x = sc.nextInt();
int y = sc.nextInt();
if(... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 58d67b128873b2e2a0b6fef1ca7fd7f0 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | //package doorbreaking;
import java.util.*;
public class DoorBreaking {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String line[] = input.nextLine().split(" ");
int n = Integer.parseInt(line[0]);
int x = Integer.parseInt(line[1]);
int y... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 434da88bcb18289721cdd3934ea5eba0 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.time.chrono.MinguoChronology;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.Queue;
import java.io.BufferedWriter;
import ... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 1bf6f2c66ebfe38dd5b30abe36fb0f37 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes |
import java.io.File;
import java.io.FileNotFoundException;
import java.util.*;
import javafx.util.Pair;
public class Main {
public static void main(String[] args) throws FileNotFoundException {
// File f = new File("input.txt");
Scanner input = new Scanner(System.in);
int n = inpu... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 0e28861b35843defc1d609a484726128 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
/*
*
*/
Scanner scan = new Scanner(System.in);
int t= scan.nextInt();
int x=scan.nextInt();
int y=scan.nextInt();
int[] arr= new int[t];
int less=0;
... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 25d16805efdba23d6be970bc7f2f2ef6 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.*;
import java.util.*;
public class vk18
{
public static void main(String[]st)
{
Scanner scan=new Scanner(System.in);
int n,i,x,y,count=0,m;
n=scan.nextInt();
x=scan.nextInt();
y=scan.nextInt();
for(i=0;i<n;i++)
{
m=scan.nextInt(... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | e91bccdc89979f016f4ca8a87a606195 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes |
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
/**
*
* @author ahmed.happa
*/
public class Test {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | ad14094162778c08911e5747853a9103 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
public class asd
{
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int start=s.nextInt();
int end=s.nextInt();int count=0;
Integer arr[]=new Integer[n];
for(int i=0;i<n;i++)
{ ... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 17a4a3389886100d14066128c895f1bf | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes |
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
i... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 11a4cc4dcddb140990fb13496c0be01c | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
public class b_prblm {
static int gcd(int a,int b){
if(b==0)
return a;
return gcd(b,a%b);
}
public static void main(String[] args){
Scanner scn = new Scanner(System.in);
int n=scn.nextInt();
int x=scn.nextInt();
int y=scn.nextInt();
ArrayList<Integer> al=new ArrayList<>();... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 485211c3a5008b2d486b6ca96fc45244 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.*;
import java.util.*;
public class Doors_Breaking_and_Repairing
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int x=sc.nextInt();
int y=sc.nextInt();
int arr[]=new int[n];
int count=0;
for(int i=0;i<n;i++)
{
arr[i]=sc.nextInt();
... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 61e2bef044ec069f4d1bc4cf93abb777 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
static int Answer;
static int N;
static int X;
static int Y;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | d2f70b0593134147e33c1d23ce14d5f2 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.*;
import java.util.*;
public class MainClass
{
public static void main(String args[])throws IOException
{
try
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String t_input[];
t_input=br.readLine().split(" ");
int n=Integer.parseI... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 4d66939a71fc95e48f95a7dc3de125c5 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) {
FastReader fs=new FastReader();
PrintWriter out=new PrintWriter(System.out);
int t=1;
//t=fs.nextInt();
for(int i=1;i<=t;i++) {
Main m=new Main();
m.solve(i... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | c1d9b2d25abc495a03c81ab92b7faeb0 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
static int upper_bound ( int arr [ ] , int start , int end , int x )
{
if ( start > end ) return start ;
i... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 4821a16d515b64378fa85ba953bfbedc | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
public class Test1 {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int n = in.nextInt(), x = in.nextInt(), y = in.nextInt(), cnt = 0;
for(int i = 0; i<n; i++) if(in.nextInt()<=x) cnt++;
if(x>y) System.out.println(n);
else Sy... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 8060db889eb17684799ea8bc9f0b9fd6 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new String... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 3b3b3ba508c882fabf6d524aef8da1a4 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Input... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | f04a72c4335feb90b09edf791ee1d6b4 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.Scanner;
public class Round530_C {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x = sc.nextInt();
int y = sc.nextInt();
int[] arr = new int[n];
int count_less = 0;
int count_same = 0;... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 9ad37d654e264c01ebe95d17bdfc87b6 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
import java.lang.*;
public class code{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int x=sc.nextInt();
int y=sc.nextInt();
int t=0;
int arr[]=new int[n];
for(int i=0;i<n;i++){
arr[i]=sc.nextInt();
}
if(x>y)System.out.println(n);
else... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 97f5ff621765827f41044d9be1c97646 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner sc=new Sc... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 78313166a3360ae60d8771aafc467834 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.*;
import java.util.*;
import java.lang.Math;
public class Main {
static class FastScanner {
BufferedReader br;
StringTokenizer st;
public FastScanner() {
try {
br = new BufferedReader(new InputStreamReader(System.in));
st = new S... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | abeeb2e42e471ed67fd08faebaa0190a | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.*;
import java.util.*;
public class C {
public static void main(String[] args) throws IOException {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int x = scn.nextInt(), y = scn.nextInt();
ArrayList<Integer> al = new ArrayList<>();
for (int i = 0; i < n; i++) {
int v = scn.... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | a91854b586d0dea7ba0b50eca4bf4016 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.*;
import java.util.*;
public class C {
public static void main(String[] args) throws IOException {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int x = scn.nextInt(), y = scn.nextInt();
int a[] = new int[n];
for (int i = 0; i < n; i++)
a[i] = scn.nextInt();
if (y < x) ... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 27c9d544c66a88f22e62630afae10ce4 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import static java.lang.Double.parseDouble;
import static java.lang.Integer.MAX_VALUE;
import static java.lang.Integer.max;
import static java.lang.Long.max;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Math.abs;
import static java.lang.Math.min;
import stati... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 07b2a4a8a69a4a11def726e25bc50c4d | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import static java.lang.Double.parseDouble;
import static java.lang.Integer.MAX_VALUE;
import static java.lang.Integer.max;
import static java.lang.Long.max;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Math.abs;
import static java.lang.Math.min;
import stati... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 0b27f9c84b95e4bca9a3ea43679ed823 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 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();
int x = sc.nextInt();
int y = sc.nextInt();
int[] d = new int[n];
for(int i= 0;i < n;i++){
d[i] = sc.nextInt();
}
int ans = 0;
if(x > y){
... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 146f53a71e6e4ec577ed8e5331eee56a | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
import java.util.StringTokenizer;
public class codee {
public static void main(String[] args) throws NumberFormatExcepti... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 4f9c236f9abd3f675b2f0af70da55074 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
import java.io.*;
public class C915 {
public static void main(String args[]) throws Exception{
Scanner sc = new Scanner(System.in);
//Reader sc = new Reader();
int n = sc.nextInt();
long x = sc.nextInt();
long y = sc.nextInt();
long a[] = new long[n];
for(int i=0;i<n;i++)
... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 812c38cc0e0853c455b6103f71aff8de | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner entrada = new Scanner(System.in);
int A = entrada.nextInt();
int B = entrada.nextInt();
int C = entrada.nextInt();
int[] array = new int[A];
Vector<Integer> list = new Vector<>();
for(int i = 0... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | a47fe066f9b2caea66c5f395c0122fcd | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | //package acm;
import java.util.*;
import java.io.*;
public class first {
static PrintWriter out;
public static void main(String[] args) throws IOException, InterruptedException {
out = new PrintWriter(System.out);
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x = sc.nextInt();
int y = s... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 590b7c0d96b9f51948fc7e0e8139e500 | train_000.jsonl | 1547044500 | You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik makes his move.There are $$$n$$$ doors, the $$$i$$$-th door initially has durability equal to $$$a_i$$$.During your move you... | 256 megabytes | import java.util.*;
public class qc{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int x=sc.nextInt();
int y=sc.nextInt();
int a[]=new int[n];
for(int i=0;i<n;i++){
a[i]=sc.nextInt();
}
Arrays.sort(a);
int r=0;
if(x>y)Syste... | Java | ["6 3 2\n2 3 1 3 4 2", "5 3 3\n1 2 4 2 3", "5 5 6\n1 2 6 10 3"] | 1 second | ["6", "2", "2"] | NoteClarifications about the optimal strategy will be ignored. | Java 8 | standard input | [
"games"
] | c173e2695562dfa1f603e6a925a2e1f3 | The first line of the input contains three integers $$$n$$$, $$$x$$$ and $$$y$$$ ($$$1 \le n \le 100$$$, $$$1 \le x, y \le 10^5$$$) — the number of doors, value $$$x$$$ and value $$$y$$$, respectively. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 10^5$$$), where $$... | 1,200 | Print one integer — the number of doors with durability equal to $$$0$$$ at the end of the game, if you and Slavik both play optimally. | standard output | |
PASSED | 1c48d3e0e044732deb6ae664eefd89a0 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.Scanner;
public class jucier {
public static void main(String[] args) {
Scanner u = new Scanner (System.in);
int num = u.nextInt();
int b = u.nextInt();
int d = u.nextInt();
int c = 0;
int total = 0;
int oranges[] = new int [num];
for (int i = 0; i < oranges.length; i++) {
oranges... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 35cfc9e152693fa164dd4c0319a8a59c | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes |
import java.util.Arrays;
import java.util.Scanner;
public class JavaApplication1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int b = input.nextInt();
int d = input.nextInt();
... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 0a8da9ecf616878e1ba0b8e3dd7da760 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes |
import java.util.Scanner;
public class Juicer {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n= s.nextInt();
int maxSize = s.nextInt();
int empty = s.nextInt();
int count = 0;
int result = 0;
for (int i = 0; i < n; i++) {
... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | c5444048f08daa09ed3fa8e29afb8193 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.Scanner;
public class Juicer {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n= s.nextInt();
int maxSize = s.nextInt();
int empty = s.nextInt();
int count = 0;
long result = 0l;
for (int i = 0; i < n; i++) {... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 95fec676732c75c8717727905976b62e | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.Scanner;
public class Juicer {
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
long nborange=sc.nextLong();
long maxsizeorange=sc.nextLong();
long limitwastesection=sc.nextLong();
if((nborange==maxsizeorange) && (maxsizeorange==limitwastesection) && (... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 238b35ea50718cfeb7b11887df109408 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes |
import java.util.Scanner;
public class CF709_D2_A
{
public static void main(String[] args)
{
Scanner scanner = new Scanner( System.in );
int iN = scanner.nextInt();
int iB = scanner.nextInt();
int iD = scanner.nextInt();
long iTotal = 0;
int count = 0;
for( int i = 1; i <= iN; i++ )
{
long i... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 5fa7563a5709c41996c24eecf6bfeafc | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.*;
public class Ex21 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner console= new Scanner (System.in);
int num = console.nextInt();
int size = console.nextInt();
int waste1 = console.nextInt();
int[] orange = new int[num];
for (int i = 0 ; i < num ... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | c436be140a4ea87bf74cb9b6844f58e0 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.*;
/**
* @(#)juicer.java
*
*
* @author
* @version 1.00 2016/9/8
*/
public class juicer {
public static void main(String[] args) {
Scanner kbd = new Scanner (System.in);
int emp = 0;
int sum = 0;
int n = kbd.nextInt();
int[] list = new int[n];
int b = kb... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 9f3c8acd858c975e09d63ff10639cc05 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.Scanner;
public class CF709_D2_A {
public static void main(String[] args) {
// time reading 4 min
// think 5 min
// implement time 4 min
// debug 1 min
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int b = scanner.nextI... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 68ec3182c72ecca64ea18d48b7b231a2 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.Scanner;
public class Juicer {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int maxSize = scanner.nextInt();
int wasteSize = scanner.nextInt();
int[] sizes = new int[n];
for (int i =... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 490ae4e043f31b96a3df31c75dbec70e | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.Arrays;
import java.util.Scanner;
public class MyClass {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int b = sc.nextInt();
int d = sc.nextInt();
int sum=0;
int c =0;
for (int i = 0; i < n... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | b36060a2e4498cd79114c77ba5ad7406 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 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();
int b = sc.nextInt();
int d = sc.nextInt();
int waste = 0;
int sum = 0;
for (int i=0; i<n; i++){
i... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | d20e720e36f3201a499904bdcde59b2b | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 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();
int b = sc.nextInt();
int d = sc.nextInt();
int sum=0,counter=0;
for (int i = 0; i < n; i++) {
int ... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 6d487b4613b90e3db47c2e7df60082bf | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class A709 {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStre... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 0e65468c49fa21184e4eac0f2630ecbb | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.*;
public class test {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
int numberOfOrange = keyboard.nextInt();
int maxSize = keyboard.nextInt();
int dmaxcondition = keyboard.nextInt();
int orangeSize = 0;
int sum = 0;
int answer = 0;
for (int ... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 19dc89e7da7071e82b00f7995e2cc9f8 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.Scanner;
public class Juicer {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int b = scan.nextInt();
int d = scan.nextInt();
long sum = 0;
int ans = 0;
for (int i = 0 ;i < n ; i++) {
int o = scan.nextInt();
if (o <=... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 15c44d21e9419b637227231675a7ea7c | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.*;
public class Just_test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
int n ,b ,d ,sum=0,c=0 ;
n=in.nextInt();
b=in.nextInt();
d=in.nextInt();
int arr[]=new int[n];
... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 1a2c02a06eb5e3d6c6d668972c5cb00e | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Input... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 5d01ba187a9f4dc96b4888d35792b630 | train_000.jsonl | 1472056500 | Kolya is going to make fresh orange juice. He has n oranges of sizes a1, a2, ..., an. Kolya will put them in the juicer in the fixed order, starting with orange of size a1, then orange of size a2 and so on. To be put in the juicer the orange must have size not exceeding b, so if Kolya sees an orange that is strictly gr... | 256 megabytes | import java.util.Scanner;
public class submission {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int b = sc.nextInt();
int d = sc.nextInt();
int sum=0;
int i=0,times=0;
while(i<n){
int input = sc.nextInt();
if(input<=b){
sum+=input;
i... | Java | ["2 7 10\n5 6", "1 5 10\n7", "3 10 10\n5 7 7", "1 1 1\n1"] | 1 second | ["1", "0", "1", "0"] | NoteIn the first sample, Kolya will squeeze the juice from two oranges and empty the waste section afterwards.In the second sample, the orange won't fit in the juicer so Kolya will have no juice at all. | Java 8 | standard input | [
"implementation"
] | 06e9649963715e56d97297c6104fbc00 | The first line of the input contains three integers n, b and d (1 ≤ n ≤ 100 000, 1 ≤ b ≤ d ≤ 1 000 000) — the number of oranges, the maximum size of the orange that fits in the juicer and the value d, which determines the condition when the waste section should be emptied. The second line contains n integers a1, a2, ..... | 900 | Print one integer — the number of times Kolya will have to empty the waste section. | standard output | |
PASSED | 17ceed3e13413d0dc1bb4636bb44629d | train_000.jsonl | 1571754900 | The only difference between easy and hard versions is the maximum value of $$$n$$$.You are given a positive integer number $$$n$$$. You really love good numbers so you want to find the smallest good number greater than or equal to $$$n$$$.The positive integer is called good if it can be represented as a sum of distinct... | 256 megabytes | import java.io.*;
import java.util.*;
public class C
{
public static void main(String[] args)throws IOException
{
BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
StringBuffer sb=new StringBuffer();
int test=Integer.parseInt(ob.readLine());
while(test-->0)
{
long n=Long.pa... | Java | ["7\n1\n2\n6\n13\n14\n3620\n10000"] | 1 second | ["1\n3\n9\n13\n27\n6561\n19683"] | null | Java 8 | standard input | [
"binary search",
"meet-in-the-middle",
"greedy",
"math"
] | 5953b898995a82edfbd42b6c0f7138af | The first line of the input contains one integer $$$q$$$ ($$$1 \le q \le 500$$$) — the number of queries. Then $$$q$$$ queries follow. The only line of the query contains one integer $$$n$$$ ($$$1 \le n \le 10^4$$$). | 1,500 | For each query, print such smallest integer $$$m$$$ (where $$$n \le m$$$) that $$$m$$$ is a good number. | standard output | |
PASSED | 316203ed7e7c379135e3d9deab5ae123 | train_000.jsonl | 1571754900 | The only difference between easy and hard versions is the maximum value of $$$n$$$.You are given a positive integer number $$$n$$$. You really love good numbers so you want to find the smallest good number greater than or equal to $$$n$$$.The positive integer is called good if it can be represented as a sum of distinct... | 256 megabytes | import java.util.*;
import javax.imageio.ImageIO;
import javax.xml.bind.DatatypeConverter;
import java.awt.image.BufferedImage;
import java.io.*;
import java.math.BigInteger;
public class template {
public static void main(String[] args) throws Exception {
FastScanner sc = new FastScanner();
PrintWriter pw = new... | Java | ["7\n1\n2\n6\n13\n14\n3620\n10000"] | 1 second | ["1\n3\n9\n13\n27\n6561\n19683"] | null | Java 8 | standard input | [
"binary search",
"meet-in-the-middle",
"greedy",
"math"
] | 5953b898995a82edfbd42b6c0f7138af | The first line of the input contains one integer $$$q$$$ ($$$1 \le q \le 500$$$) — the number of queries. Then $$$q$$$ queries follow. The only line of the query contains one integer $$$n$$$ ($$$1 \le n \le 10^4$$$). | 1,500 | For each query, print such smallest integer $$$m$$$ (where $$$n \le m$$$) that $$$m$$$ is a good number. | standard output | |
PASSED | a7c9bc6a18d234679aeab4fa52997ac6 | train_000.jsonl | 1571754900 | The only difference between easy and hard versions is the maximum value of $$$n$$$.You are given a positive integer number $$$n$$$. You really love good numbers so you want to find the smallest good number greater than or equal to $$$n$$$.The positive integer is called good if it can be represented as a sum of distinct... | 256 megabytes | import java.util.Scanner;
import java.util.stream.IntStream;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int q = sc.nextInt();
for (int tc = 0; tc < q; tc++) {
long n = sc.nextLong();
System.out.println(solve(n));
}
sc.close();
}
static long ... | Java | ["7\n1\n2\n6\n13\n14\n3620\n10000"] | 1 second | ["1\n3\n9\n13\n27\n6561\n19683"] | null | Java 8 | standard input | [
"binary search",
"meet-in-the-middle",
"greedy",
"math"
] | 5953b898995a82edfbd42b6c0f7138af | The first line of the input contains one integer $$$q$$$ ($$$1 \le q \le 500$$$) — the number of queries. Then $$$q$$$ queries follow. The only line of the query contains one integer $$$n$$$ ($$$1 \le n \le 10^4$$$). | 1,500 | For each query, print such smallest integer $$$m$$$ (where $$$n \le m$$$) that $$$m$$$ is a good number. | standard output | |
PASSED | b4dd810e2f6ee30a859ccb202a662a02 | train_000.jsonl | 1571754900 | The only difference between easy and hard versions is the maximum value of $$$n$$$.You are given a positive integer number $$$n$$$. You really love good numbers so you want to find the smallest good number greater than or equal to $$$n$$$.The positive integer is called good if it can be represented as a sum of distinct... | 256 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.InputMismatchException;
import java.util.StringTokenizer;
public class C3 {
static class FastWriter {
private final BufferedWriter bw;
public FastWriter() {
this.bw = new BufferedWriter(new OutputStreamWriter(System.out));... | Java | ["7\n1\n2\n6\n13\n14\n3620\n10000"] | 1 second | ["1\n3\n9\n13\n27\n6561\n19683"] | null | Java 8 | standard input | [
"binary search",
"meet-in-the-middle",
"greedy",
"math"
] | 5953b898995a82edfbd42b6c0f7138af | The first line of the input contains one integer $$$q$$$ ($$$1 \le q \le 500$$$) — the number of queries. Then $$$q$$$ queries follow. The only line of the query contains one integer $$$n$$$ ($$$1 \le n \le 10^4$$$). | 1,500 | For each query, print such smallest integer $$$m$$$ (where $$$n \le m$$$) that $$$m$$$ is a good number. | standard output | |
PASSED | 29aa8c08a2729e75a66b1d937782d899 | train_000.jsonl | 1270136700 | A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018 to 5·1018 inclusive, or to find out that such points do not exist. | 256 megabytes | import java.io.*;
import java.util.*;
public class Solution
{
static long gcd;
static long x,y;
public static void main(String ag[])
{
Scanner sc=new Scanner(System.in);
long A=sc.nextLong();
long B=sc.nextLong();
long C=sc.nextLong();
gcd(A,B);
i... | Java | ["2 5 3"] | 1 second | ["6 -3"] | null | Java 11 | standard input | [
"number theory",
"math"
] | a01e1c545542c1641eca556439f0692e | The first line contains three integers A, B and C ( - 2·109 ≤ A, B, C ≤ 2·109) — corresponding coefficients of the line equation. It is guaranteed that A2 + B2 > 0. | 1,800 | If the required point exists, output its coordinates, otherwise output -1. | standard output | |
PASSED | 004db46d27cedacd6fc57da0b8ad218e | train_000.jsonl | 1270136700 | A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018 to 5·1018 inclusive, or to find out that such points do not exist. | 256 megabytes | import java.util.*;
import java.io.*;
public class hello {
public static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new... | Java | ["2 5 3"] | 1 second | ["6 -3"] | null | Java 11 | standard input | [
"number theory",
"math"
] | a01e1c545542c1641eca556439f0692e | The first line contains three integers A, B and C ( - 2·109 ≤ A, B, C ≤ 2·109) — corresponding coefficients of the line equation. It is guaranteed that A2 + B2 > 0. | 1,800 | If the required point exists, output its coordinates, otherwise output -1. | standard output | |
PASSED | cf019c38fba018587ef125ecd5311a0d | train_000.jsonl | 1270136700 | A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018 to 5·1018 inclusive, or to find out that such points do not exist. | 256 megabytes | import java.util.*;
public class Line {
static long[] solution(long a, long b){
if(a==0) return new long[]{0,1,b};
long[] ans = solution(b%a,a);
return new long[]{ans[1]-(b/a)*ans[0],ans[0],ans[2]};
}
static void solve(){
Scanner sc = new Scanner(System.in);
... | Java | ["2 5 3"] | 1 second | ["6 -3"] | null | Java 11 | standard input | [
"number theory",
"math"
] | a01e1c545542c1641eca556439f0692e | The first line contains three integers A, B and C ( - 2·109 ≤ A, B, C ≤ 2·109) — corresponding coefficients of the line equation. It is guaranteed that A2 + B2 > 0. | 1,800 | If the required point exists, output its coordinates, otherwise output -1. | standard output | |
PASSED | 4df7f9336e06187e473669cb8b692801 | train_000.jsonl | 1270136700 | A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018 to 5·1018 inclusive, or to find out that such points do not exist. | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
public class Main{
public static StreamTokenizer sc=new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
public static int nextint() throws I... | Java | ["2 5 3"] | 1 second | ["6 -3"] | null | Java 11 | standard input | [
"number theory",
"math"
] | a01e1c545542c1641eca556439f0692e | The first line contains three integers A, B and C ( - 2·109 ≤ A, B, C ≤ 2·109) — corresponding coefficients of the line equation. It is guaranteed that A2 + B2 > 0. | 1,800 | If the required point exists, output its coordinates, otherwise output -1. | standard output | |
PASSED | fe373f688ba6dd04686bc6659f5e7c11 | train_000.jsonl | 1270136700 | A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018 to 5·1018 inclusive, or to find out that such points do not exist. | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.*; // for bigInteger
public class practice {
private final static int M = (int)1e9+7;
private static final InputReader scan = new InputReader(System.in);
private static final PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWr... | Java | ["2 5 3"] | 1 second | ["6 -3"] | null | Java 11 | standard input | [
"number theory",
"math"
] | a01e1c545542c1641eca556439f0692e | The first line contains three integers A, B and C ( - 2·109 ≤ A, B, C ≤ 2·109) — corresponding coefficients of the line equation. It is guaranteed that A2 + B2 > 0. | 1,800 | If the required point exists, output its coordinates, otherwise output -1. | standard output | |
PASSED | ffd4c0ad29e54cfa52827892dbf00cb6 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.math.BigInteger;
import java.util.Scanner;
public class test {
static boolean s[];
static int a[] ;
static BigInteger dp[][] = new BigInteger[5005][2005];
static int N;
static boolean vis[][] = new boolean [5005][2005];
/**
* @param args
*/
static BigInteger val[] = new BigInteger[2005];
stat... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 60ea785ae0e3ad4a4f598125a1228151 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
static int n;
static ArrayList<pair> values;
static BigInteger[] sv;
static BigInteger dp(int ind) {
if (ind == n)
return BigInteger.ZERO;
if (!sv[ind].equals(BigInteger.v... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 527618276eb0df95892a108d45a2bce3 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.util.Scanner;
import java.math.*;
public class Main{
public static void main(String[] args){
BigInteger mayor[] = new BigInteger[5001];
int arr[] = new int[5001];
boolean gano[] = new boolean[5001];
int donde, n;
BigInteger tengo;
Scanner in = new Scanner(... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 1c27d1eef7029ba19d285094033edaae | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException{
//InputStream inputStream = new File("input.txt");
//OutputStream outputStream = new File("output.txt");
//Scanner in = new Scanner(new Fi... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | c733077a86b310cf6ef1e0f042eb6ad2 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException{
//InputStream inputStream = new File("input.txt");
//OutputStream outputStream = new File("output.txt");
//Scanner in = new Scanner(new Fi... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | f019022c21d6aa16ba21a34d8134b80a | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException{
//InputStream inputStream = new File("input.txt");
//OutputStream outputStream = new File("output.txt");
//Scanner in = new Scanner(new Fi... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | ec51e6ac11ae1a84203b6f78bb566fc3 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.math.*;
import java.util.*;
public class Program implements Runnable {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
Thread thread = new Thread(new Program(in, out))... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 083e6e77265993186536d5a15b7036c2 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
public class D implements Runnable {
BufferedReader in;
PrintWriter out;
StringTokenizer st;
Random rnd;
final int none = 2001;
BigInteger[][] d;
BigInteger[] pows;
BigInteger getMax(BigInteger a, BigInteger b) {
if(a == null) {
return b;
} e... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 06a4226d36463d399d0c880a22d45255 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.math.BigInteger;
import java.util.LinkedList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
final int SIZE = 2001;
int N = in.nextInt();
int[] sell = new int[SIZE];
int[] win = new in... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 5b52063f5b9d41fece461e10f4fe16e8 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;
public class SellerBob {
static int[] t;
static int[] v;
static BigInteger[][] dp;
static BigInteger max(BigInteger a, BigInteger... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | cc24429789cfea0a08d62e1d87b49a4d | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.util.Scanner;
import java.math.BigInteger;
import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int n = cin.nextInt();
String []op = new String[n];
int []val = new int[n];
BigInteger []dp = new BigIn... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 9888736b6d53728f0e768921ff30e194 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.math.BigInteger;
import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static int n,v[],ty[];
static BigInteger dp[]= new BigInteger[5009];
/*static BigInteger solve(int i,int l)
{
if(i==n) return BigInteger.ZERO;
if(!dp[i][l].eq... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 6802af9eb6a9b32d08075afa141a8c47 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
String s[] = new String[n+1];
int x[] = new int[n+1];
BigInteger dp[] = new BigInteger[n+1];
dp[0]... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 0160eca48597d83b51e58bc49689a25f | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.BufferedInputStream;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static final BigInteger neg = BigInteger.valueOf(-1);
public static final BigInteger two = BigInteger.valueOf(2);
public static BigInteger[][] dp = new Bi... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | a9cd36dee0f9df699de1e7c1a4bfabb6 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.math.*;
import java.util.*;
public class Solution {
final static int M = 2001;
public void run() {
try {
int n = reader.nextInt();
int[] hash = new int[M];
Arrays.fill(hash, -1);
int[][] order = new int[M][];
for... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 0ddf167499d4d09cbb79508de5e8b5ca | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner cin=new Scanner(System.in);
int n=cin.nextInt();
int[] next=new int[n];
int[] val=new int[n];
Bi... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 7fa04068f99b0254ded77515b4d0584e | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = n... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 3a8f94e506e992ad574b896f53c7260d | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException{
//InputStream inputStream = new File("input.txt");
//OutputStream outputStream = new File("output.txt");
//Scanner in = new Scanner(new Fi... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 47cd900e38a7f793381ac8b31c76b9fb | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException{
//InputStream inputStream = new File("input.txt");
//OutputStream outputStream = new File("output.txt");
//Scanner in = new Scanner(new Fi... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | eab04717303e31d3a0fa39605da3b4c3 | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
public class Main
{
public static void main ( String[] args ) throws IOException
{
Scanner in = new Scanner(System.in);
BufferedReader Reader = new BufferedReader(new InputStreamReader(System.in));
FastScanner sc = new FastScann... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 3c75a0960f0712259b69361550d8093c | train_000.jsonl | 1276700400 | Last year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place: A customer came to Bob and asked to sell him a 2x MB memory stick. If Bob had such a stick, he sold it and got 2x berllars. Bob won some programming competition and got a 2x MB memory stick as... | 128 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
public class a {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = ne... | Java | ["7\nwin 10\nwin 5\nwin 3\nsell 5\nsell 3\nwin 10\nsell 10", "3\nwin 5\nsell 6\nsell 4"] | 2 seconds | ["1056", "0"] | null | Java 7 | standard input | [
"dp",
"greedy",
"brute force"
] | 217a3a48b927213f4d5e0a19048e2a32 | The first input line contains number n (1 ≤ n ≤ 5000) — amount of Bob's working days. The following n lines contain the description of the days. Line sell x stands for a day when a customer came to Bob to buy a 2x MB memory stick (0 ≤ x ≤ 2000). It's guaranteed that for each x there is not more than one line sell x. Li... | 2,000 | Output the maximum possible earnings for Bob in berllars, that he would have had if he had known all the events beforehand. Don't forget, please, that Bob can't keep more than one memory stick at a time. | standard output | |
PASSED | 0a4b9bde2fdc06f41c4fb164bf964ce0 | train_000.jsonl | 1542033300 | You are given a string $$$s$$$ consisting of $$$n$$$ lowercase Latin letters.You have to remove at most one (i.e. zero or one) character of this string in such a way that the string you obtain will be lexicographically smallest among all strings that can be obtained using this operation.String $$$s = s_1 s_2 \dots s_n$... | 256 megabytes | /*
Aman Agarwal
algo.java
*/
import java.util.*;
import java.io.*;
public class A1076
{
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(new InputStreamReader(System.in));
... | Java | ["3\naaa", "5\nabcda"] | 1 second | ["aa", "abca"] | NoteIn the first example you can remove any character of $$$s$$$ to obtain the string "aa".In the second example "abca" < "abcd" < "abcda" < "abda" < "acda" < "bcda". | Java 8 | standard input | [
"greedy",
"strings"
] | c01fc2cb6efc7eef290be12015f8d920 | The first line of the input contains one integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10^5$$$) — the length of $$$s$$$. The second line of the input contains exactly $$$n$$$ lowercase Latin letters — the string $$$s$$$. | 1,200 | Print one string — the smallest possible lexicographically string that can be obtained by removing at most one character from the string $$$s$$$. | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.