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
5aa8fb77af35dfc8aee14fa47e366c18
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
import java.util.*; public class Cash { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int L=0,n=0,a=0; n=sc.nextInt(); L=sc.nextInt(); a=sc.nextInt(); int i=0; int k=0; int ti[]=new int[n]; int li[]=new int[n]; ...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
9f68bd139eccd414df679ecb0d10e507
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
import java.util.*; public class Cash { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int L=0,n=0,a=0; n=sc.nextInt(); L=sc.nextInt(); a=sc.nextInt(); int i=0; int ti[]=new int[n]; int li[]=new int[n]; int te=0,sum...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
b6b97ea9e981debab7b9fe91987c3bc3
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; public class Main { public static void main(String[] args) throws IOException{ // TODO Auto-generated method stub Reader.init(System.in); int n=Reader.nextInt(); int l=Reader.nextInt(); ...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
162ba25ea8b4ac1ec048b3c93a4dc7e4
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class Round541ProblemA { public static void main(String[] args) { // TODO Auto-generated method stub out=new PrintWriter(new BufferedOutputSt...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
31e494c5586ad4810697ed97d87cd467
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
import java.util.*; public class A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int L = sc.nextInt(); int a = sc.nextInt(); int[] start = new int[n]; int[] length = new int[n]; int numB = 0; for (int i = 0; i < n; i++) { start[i] = sc.next...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
f4326ae5f2103a04d0f6431c8a447509
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
/* Roses are red Memes are neat All my test cases time out Lmao yeet */ import java.util.*; import java.io.*; public class A { public static void main(String args[]) throws Exception { BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st ...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
8a5487f4f219f0c680170e8924a35ba4
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); long n=in.nextInt(); long L=in.nextInt(); long a=in.nextInt(); long t,l; if(n==0) { System.out.print(L/a); } else { t=in.nextLong(); l=in.nextLong(); long sum=0; ...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
fe5da73f28fe76a341fe533fe11904f0
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { // Excercise_1059A q = new Excercise_1059A(); // q.qwerty(); Scanner in = new Scanner(System.in); String firstLine = in.nextLine(); String[] fl = firstLine.split(" "); int count = ...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
5ccac95e99c6f6d8f0a7eadea5baf83e
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
import java.util.Scanner; public class codeforces { public static void main(String args[]) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int L = in.nextInt(); int a = in.nextInt(); int x = 0; if(n==0) { System.out.println(L/a); ...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
c580aeb7c89412111f9b9afcc951d1d4
train_002.jsonl
1538750100
Vasya has recently got a job as a cashier at a local store. His day at work is $$$L$$$ minutes long. Vasya has already memorized $$$n$$$ regular customers, the $$$i$$$-th of which comes after $$$t_{i}$$$ minutes after the beginning of the day, and his service consumes $$$l_{i}$$$ minutes. It is guaranteed that no custo...
256 megabytes
import java.util.Scanner; public class Cashier { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int customers = scan.nextInt(); int minutes = scan.nextInt(); int b = scan.nextInt(); int count = 0; int start = 0; int end = 0; if(customers == 0) { System.out.println(...
Java
["2 11 3\n0 1\n1 1", "0 5 2", "1 3 2\n1 2"]
2 seconds
["3", "2", "0"]
NoteIn the first sample Vasya can take $$$3$$$ breaks starting after $$$2$$$, $$$5$$$ and $$$8$$$ minutes after the beginning of the day.In the second sample Vasya can take $$$2$$$ breaks starting after $$$0$$$ and $$$2$$$ minutes after the beginning of the day.In the third sample Vasya can't take any breaks.
Java 8
standard input
[ "implementation" ]
00acb3b54975820989a788b9389c7c0b
The first line contains three integers $$$n$$$, $$$L$$$ and $$$a$$$ ($$$0 \le n \le 10^{5}$$$, $$$1 \le L \le 10^{9}$$$, $$$1 \le a \le L$$$). The $$$i$$$-th of the next $$$n$$$ lines contains two integers $$$t_{i}$$$ and $$$l_{i}$$$ ($$$0 \le t_{i} \le L - 1$$$, $$$1 \le l_{i} \le L$$$). It is guaranteed that $$$t_{i}...
1,000
Output one integer  — the maximum number of breaks.
standard output
PASSED
8ed9809319a1336a52451dcbb3da87e6
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class NewPassword { public static void main(String[] args) { Scanner in=new Scanner(System.in); int n=in.nextInt(); int k=in.nextInt(); String s=""; for(int i=0;i<n;i++){ s+=(char)((int)'a'+(i%k)); } System.out.println(s); }...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
e7df773c228357d585e48169b2a76e07
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); String s = ""; for (int i = 0; i < n; i++) { s += (char)((int)'a' + i % k); } System...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
8eea8d867b17be71efd17853ed9af92e
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.* ; import java.io.* ; public class Main { public static Scanner in= new Scanner(System.in) ; public static void main(String[] args) { int n = in.nextInt(), k = in.nextInt(); StringBuilder x = new StringBuilder() ; String dict = "qwertyuiopasdfghjkl...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
b138e7640572727e634aef2f733abcb8
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class Main { private static final Scanner scanner = new Scanner(System.in); public static void main(String[] args) { int n = scanner.nextInt(); int k = scanner.nextInt(); String s = ""; int a = 97; int j = 0; for (int i = 0; i <...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
49b00c7cefced22855f5cbb511c2d763
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
//package com.mass.codeforces; import java.io.File; import java.io.FileNotFoundException; import java.math.BigInteger; import java.util.Arrays; import java.util.Scanner; public class solution { public static void main(String[] args) throws FileNotFoundException { // File file // = new File(...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
479543f019058499487a6b9e9f0c8b3b
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class Problems { public static void main(String[] args) { Scanner s = new Scanner(System.in); String alph = "abcdefghijklmnopqrstuvwxyz"; int n= s.nextInt(); int k= s.nextInt(); String alphabet = alph.substring(0,k); String passwor...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
7de5f47a01f74793671886d20fb717a6
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
// Long Contest 1, Problem G import java.io.*; import java.nio.charset.Charset; import java.util.Arrays; public class Main { public static void main(String[] args) { Charset charset = Charset.forName("ascii"); FastIO rd = new FastIO(System.in, System.out, charset); int n = rd.readInt(); int k...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
ea7e4d66bff47c536bd6595a31889045
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Random; import java.util.Scanner; import java.lang.*; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); Random random = new Random(); StringBuilder sb = new StringBuilder(); String alphabet = "abcdefghijklmnopqrst...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
f5e76d4b4aa9077884172b9010309247
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import javax.swing.*; import java.util.Scanner; public class solution { public static void main(String[] args) { Scanner input = new Scanner(System.in); int totalLetters = input.nextInt(); int numberOfLetters = input.nextInt(); char[] letters = new char[numberOfLetters]; int...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
517e15a0d0c1c8f114f76c5f4e78b5c9
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; public class Main { public static void main(String[] args) { // write your code here Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); String s =""; for (int i = 0; i < n; i++) { s+= (char)((int) 'a' +...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
68cd5683fd8e12e36d1dc222d5539d7c
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
// package cfa; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.StringTokenizer; public class NewPassword { public static void main(String[] args) { InputStream input...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
cb964a67d4efddff1067d8f510d54bf3
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; import java.math.*; public class Euler { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); String str = ""; for (int i = 0; i < n; i++) { int x = i % k; int y = 97 + x; char c = (char) y; ...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
ce61c79e7a7b3fa3a7eff9636d52aeb7
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.ArrayList; import java.util.Scanner; public class Test { public static void main(String[] args) { try(Scanner input = new Scanner(System.in)) { int n = input.nextInt(); int k = input.nextInt(); System.out.print(createNewPassword(n, k)); } } public s...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
e2640f1a7fc477f93da6486fdb7f9f57
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class Password { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int k=sc.nextInt(); char a[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; ...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
1ed046a356356e44f18b4cb1aae23677
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; public class solution{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); String s=""; for(int i=0;i<a;i++){ s+=(char)((int)'a'+i%b); } System.out.println(s);...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
496d34b09c9812212da69a42846a1c84
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class practice{ static Scanner sc = new Scanner(System.in); public static String function(int n,int k) { String s=""; char[] sam=new char[k]; for(int i=0;i<k;++i) { sam[i]=(char) ('a'+i); } for(int i=0;i<n;++i) { s+=sam[i%k]; } return s; } public static...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
9658c2d079a4ec7eb0bbed8d778c3754
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
//package pkg770a; import java.util.*; public class p45 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); char c = 97 ; String s = ""; while (k>0) { s+=c; c+=1; k--; } while (s.length...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
e1226f63052f97bdd479be14e0cab203
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; //import java.util.Random; public class NewPassword { public static void main(String[]args){ Scanner in=new Scanner(System.in); int n=in.nextInt(); int k=in.nextInt(); String pass=""; for(int i=97;i<97+k;i++) { pass=pass+(char)i; ...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
d3745b75798fe07a0b14c2240a2e8888
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class code { public static void main(String[] args) { Scanner inp = new Scanner(System.in); int n = inp.nextInt(); int k = inp.nextInt(); int[] string = new int[k]; int base = 97; for(int i=0;i<k;i++) { string[i] = base; base++; } int passwordCount = 0; while(p...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
344bb9785bc15eff722c05d94fdda52a
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; public class Problems { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n , k ; n =in.nextInt(); k = in.nextInt(); String s =""; for (int i=0; i<n; i++) { s...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
bf44542058b6dc0ced3b14029cfecbde
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Arrays; import java.util.Scanner; import java.util.Stack; public class Code { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int a = (int)'a'; for(int i = 0, j = 0; i < n; i++){ char b = ...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
d3c2f433b3c2d9fa277c654b42937e25
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
/* Jai Shree Ram */ import java.math.*; import java.io.*; import java.util.*; public class JAVA { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str[] = br.readLine().trim().split("\\s+"); int n = Integer.parseInt(str[0...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
e2811551cd66e93cc5a7f8dd270ab3e4
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class NewPassword { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); int k = input.nextInt(); while (n > 0) { for (int i = 0; i < k; i++) { System.out.printf("%c", 9...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
664c6ec6d22d48d0aeb0c0970b5e32f1
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; //import java.lang.Math; public class new_password { public static void main(String[] args) { solve(); } static void solve() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String pass = ""; for...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
eeea6ca5c95cb3c64412ad257311c6fc
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); String str =""; for(int i=0;i<n;i++){ str+= (char)((int)'a'+(i%k)); } System.out.p...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
b2f37292e76a2d1690ebf0ceb2938e2c
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class ProblemSolving { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String password =""; String alphapet="abcdefghijklmnopqrstuvwxyz...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
d80c4d57489df2fbdce3dc5a82f6c473
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; import java.util.Set; public class ProblemSolving { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String password =""; String alphapet="...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
3da76086dc3af074bf4d473bd796d7d0
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; /** * * @author aso */ public class Problem27 { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner in = new Scanner(System.in); char[] c = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
26f67308152ff742d27d8a01d6dfe03d
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; public class Hello { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int x = scanner.nextInt(); int y = scanner.nextInt(); StringBuffer s = new StringBuffer(); int m = 97; int c = 0; for(int i = 0; i < x; ...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
17ee3dd42bb2caa9ebd2b87b50b02a7d
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new ...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
b6a2ea8ea1ece16eea0d5452a0f01762
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Arrays; import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); char[] pass = new char[n]; char[] cryp = new char[k]; for (int i = 97;...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
04c09bf5547ebe75aa920c340535527d
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner inp=new Scanner(System.in); int lenght=inp.nextInt(); int words=inp.nextInt(); char array[]=new char[words]; int c=0; for (int i =97 ; i <97+words; i++) { char a=(char)i; ...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
63d884f62a7f2caa507db9988073366e
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; import java.io.*; import java.lang.*; public class c { static class Reader { final private int BUFFER_SIZE = 1 << 16; private DataInputStream din; private byte[] buffer; private int bufferPointer, bytesRead; public Reader() { din = new DataIn...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
76da159180519c74414a5484e023be70
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class Password { public static void main(String args[]) { Scanner sc = new Scanner(System.in); String a = ""; for(char i='a';i<='z';i++) { a+=i; } int len = sc.nextInt(); int ch = sc.nextInt(); ...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
61de68878ca052848abab368d88f66c9
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; import java.io.*; public class a { BufferedReader br; PrintWriter out; StringTokenizer st; public a() throws Exception { br = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(System.out); } public void solve() throws IOException { int nums[] = readArray(2...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
00f0af4ee820786b3983485561857998
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; import java.io.*; public class a { BufferedReader br; PrintWriter out; StringTokenizer st; public a() throws Exception { br = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(System.out); } public void solve() throws IOException { int nums[] = readArray(2...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
a2210f5b2c823329282560908af59b95
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); String s = ""; for (int i = 0; i < n; i++) { s += (char)((int)'a' + i % k)...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
c0cfb1f0884a8190e38d33a69f14c7c2
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
// Long Contest 1, Problem G import java.io.*; import java.nio.charset.Charset; import java.util.Arrays; public class Main { public static void main(String[] args) { Charset charset = Charset.forName("ascii"); FastIO rd = new FastIO(System.in, System.out, charset); int n = rd.readInt(); int k...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
3141b74a781e1ca88597464dc7720a25
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; public class aaa { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int k = scan.nextInt(); String s = ""; char x = 'a'; for(int i =0;i<k;i++) { s+= x; x++; } for(int j =0, i =0;i<n-k...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
2a5eca247f78b62d498ca2c07d4e2281
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; //juicer public class App { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ch = sc.nextInt(), count = 0; sc.close(); ...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
529b95e658b61131bbc5a9136e870895
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Scanner; /** * Built using CHelper plug-in * Actual solution is at the top * * @author Bisoye */ public class Main { public static void main(String[] args) { InputStream in...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
077090c84f951eb394c89c20968ddb34
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Scanner; /** * Built using CHelper plug-in * Actual solution is at the top * * @author Bisoye */ public class Main { public static void main(String[] args) { InputStream in...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
ffa8d241851eecf0bfe61329461bfafd
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.*; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; public class sol { public sol() { // TODO Auto-generated constructor stub } public static class Reader { static BufferedReader rea...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
aafeb96a0a02c7a1b40a80a9ad26b2cc
train_002.jsonl
1489233600
Innokentiy decides to change the password in the social net "Contact!", but he is too lazy to invent a new password by himself. That is why he needs your help. Innokentiy decides that new password should satisfy the following conditions: the length of the password must be equal to n, the password should consist only ...
256 megabytes
import java.util.ArrayDeque; import java.util.Arrays; import java.util.Deque; import java.util.Scanner; public class Sheet_A { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(); int k = input.nextInt(); String word = ""; for (int i = 0...
Java
["4 3", "6 6", "5 2"]
1 second
["java", "python", "phphp"]
NoteIn the first test there is one of the appropriate new passwords — java, because its length is equal to 4 and 3 distinct lowercase letters a, j and v are used in it.In the second test there is one of the appropriate new passwords — python, because its length is equal to 6 and it consists of 6 distinct lowercase lett...
Java 11
standard input
[ "implementation", "*special" ]
39f5e934bf293053246bd3faa8061c3b
The first line contains two positive integers n and k (2 ≤ n ≤ 100, 2 ≤ k ≤ min(n, 26)) — the length of the password and the number of distinct symbols in it. Pay attention that a desired new password always exists.
800
Print any password which satisfies all conditions given by Innokentiy.
standard output
PASSED
dfb7be7ff12baedd53587bab544a460a
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.*; public class Poster { public static void main(String[]args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int position=sc.nextInt(); String name=sc.next(); if (position>(n/2)) { while(position<n) { System.out.println("RIGHT"); position++; } while(position>0) { ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
0d38109ab9c39cc6f1c67338e5d5eb4f
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.*; import java.io.*; public class A { static int n,k; static char[] c; public static void main(String[] args) { Scanner in = new Scanner(System.in); StringTokenizer st = new StringTokenizer(in.nextLine()); n = i(st.nextToken()); k = i(st.nextToken()); c = in.nextLine().toCharArray(); if...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
4c8cd338c7eed2dd7481649798ab90f2
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String s = sc.next(); int pos = k-1; while(pos!=0 && pos!=n-1){ if(pos <= (n-1)/2...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
c9fee1ce990a9d41d753da25b62e0903
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.Scanner; public class CoderStrike1A { /** * @param args */ public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int index=sc.nextInt(); String s=sc.next(); boolean goToRight=false; StringBuilder x=new StringBuilder(); if(index-1>...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
e2afbae426089fb1aa0229884b53b99d
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.*; public class first { public static void main(String[] args) throws Exception { Scanner in = new Scanner(System.in); String str = in.nextLine(); int n = Integer.parseInt(str.substring(0, str.indexOf(" "))); int k = Integer.parseInt(str.substring(str.index...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
9b895a7ffe283807833dcfad4f0e8e20
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.StringTokenizer; public class A { static BufferedReader br; static StringTokenizer st; static PrintWriter pw; /* Designed by Shoh */ public ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
93db58d16e37a8cdd197becb26c70b04
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; im...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
6a04fa1c1de83df7c805555b3fb46415
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.HashMap; import java.util.InputMismatchException; public class A { public static void main(String[] args) throws Exception{ ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
f3904bef262e1ceabf177a7951ed1c61
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.IOException; import java.io.OutputStreamWriter; import java.io.BufferedWriter; import java.util.InputMismatchException; import java.io.OutputStream; import java.io.PrintWriter; import java.util.NoSuchElementException; import java.io.Writer; import java.math.BigInteger; import java.io.InputStream; /** *...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
1aa033639b9d4d172cc10b7213df81d6
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.IOException; import java.io.OutputStreamWriter; import java.io.BufferedWriter; import java.util.InputMismatchException; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Writer; import java.math.BigInteger; import java.io.InputStream; /** * Built using CHelper plug-in * Actual so...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
689941e980467689098bc07dd8d68751
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.*; public class aa { public static void main(String[] args) { Scanner input = new Scanner(System.in); int n = input.nextInt(), k = input.nextInt()-1; int copy = k; String s = input.next(); if(k < n/2) { while(k > 0) { System.out.println("PRINT " + s.c...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
57b1ddf2ddc6d68e15e0f9ffac4fc8e7
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.Scanner; public class Input { public static void main(String[] args) { @SuppressWarnings("resource") Scanner in = new Scanner(System.in); int l = in.nextInt(); int p = in.nextInt(); String s = in.next(); if (l%2 == 0)...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
5f9147893e01169cf43c439fe792a0db
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.Scanner; import java.io.OutputStream; import java.io.IOException; import java.io.PrintWriter; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * @author rabeckiy */ public class Main { public static void main(String[] args) { InputStream inputStream ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
73fc98840497eb53e18002dc12c48919
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; import java.util.TreeSet; public class solver { BufferedReader in; PrintWriter out; ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
bdef64a04be3ce94b2160d04b8c6e08c
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class A { static class Scanner{ BufferedReader br=null; StringTokenizer tk=null; public Scanner(){ br=new BufferedReader(new InputStreamReader(System.in)); } public Str...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
6dcb29905bddc634f114c196f38838d3
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class RoundOne { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String first = ""; String second = ""; try ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
d14b47a755bf37777a6233c0cd9b3074
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.InputMismatchException; import java.util.StringTokenizer; pub...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
3c2d0c737b97ecec338cd408927e916e
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.*; import java.util.*; public class Poster { public static void main(String[] args) throws IOException { BufferedReader f = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(f.readLine()); int n = Integer.parseInt(st.nextToken()); ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
d2787435e5ed38077aebb90ede4dc835
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.* ; import java.io.* ; import java.util.regex.* ; import java.text.* ; import java.math.* ; public class Main { public static void main( String[] args ) { InputStream isObj ; OutputStream osObj ; InputReader irObj ; PrintWriter pwObj ; String inputFileName , outputFileName ; File fObj1 , ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
08ebb9ea4d7957023d84072972949fc9
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.PrintWriter; import java.io.InputStreamReader; import java.util.StringTokenizer; public class CF412A { static BufferedReader in; static PrintWriter out; static StringTokenizer st; public static void main(String[] args) throws Exception { in = new BufferedReader(new...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
d13a63a3a0e7d33909cf2bb9903d2c83
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.*; public class Poster { public static void main(String [] args) throws Throwable{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String nk=""; nk=br.readLine(); String [] str=nk.split(" "); int n=Integer.parseInt(str[0]); int k=Integer.parseInt(str[1]); nk=br.rea...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
f9bfc95a53a8baae0fae5e6e10ca70ca
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class A { public static void main(String[] args) throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
7f939a816652625b1a98c2dacc5bbb94
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.StringTokenizer; public class Solver { public static void main(String[] Args) t...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
c78fc41dceed62a81fdd0e54c1e70ba7
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.InputStreamReader; import java.io.IOException; import java.io.BufferedReader; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Reader; import java.io.Writer; import java.util.StringTokenizer; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at t...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
039bc9f6f45bebc5e2d6b2c48160aeac
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; import java.util.ArrayList; import java.util.Scanner; import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * * @author Ammar.Eliwat */ public cl...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
7e1ffd089039efa038c5134c2b038a6b
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.IOException; import java.util.Scanner; public class A { public static void main(String[] args) throws IOException{ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String s = sc.next(); if (k > n/2){ while(k!=n){ ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
51aeb06e276df011c117fd6b4ae5dfc7
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.Scanner; public class MyClass { public static void main(String[] args) { try (Scanner sc = new Scanner(System.in); PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out))) { int n = sc.nextInt(); int k = sc.nextInt(); String...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
d037bce7849f1bb1acd203f0c5046225
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.*; import java.io.*; public class CS2014R1A { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); String s = in.nextLine(); s = in.nextLine(); if(k > n/2) { for (int i = 1; i < n-k+1; i++) { System.out.println(...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
f23da652387b3df1fe3f39aa8c09bc9c
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.*; import java.util.*; public class Main implements Runnable { public void _main() throws IOException { int n = nextInt(); int k = nextInt() - 1; char[] s = next().toCharArray(); if (k < n / 2) { for (int i = 0; i < k; i++) { out.println("LEFT"); } for (int i = 0; i < n; i++) { ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
ea9628bb9e38b80b867df39e91469272
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.*; import java.util.*; public class Main implements Runnable { final boolean isFileIO = false; BufferedReader in; PrintWriter out; StringTokenizer st = new StringTokenizer(""); String delim = " "; public static void main(String[] args) { new Thread(null, new Main(), "", 268435456).st...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
413b188357b55dd24a673c62785831ad
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
//package codestrike.r1; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class A { InputStream is; PrintWriter out; String INPUT = ""; void solve() { int n = ni(), ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
82018741feb9cab55dfa891747ff1991
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.*; import java.util.*; import java.math.*; public class Main { BufferedReader reader; StringTokenizer tokenizer; PrintWriter out; public static void main(String[] args) { new Main().run(); } public void run() { try { reader = new BufferedReader(new InputStreamReader(System.in)); out ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
cfff75a0faad00ed62be92b3d59de70e
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.Scanner; public class PA { public static void main(String[] args){ Scanner in = new Scanner(System.in); int n=in.nextInt(); int init=in.nextInt(); String s = in.next(); if(init>n/2){ while(init<n){ init++; System.out.println("RIGHT"); } } else { while(init>1){ ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
28e1c5e458ed8ef0ec884ba8668790e2
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Random; import javax.print.attribute.standard.Si...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
3b1de6b1eb636512da893c47e504883a
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
//package main; import java.util.*; import java.io.*; import java.math.BigInteger; public class Main { FastScanner scan; PrintWriter out; BufferedReader in; static boolean isEnd(String a, String s) { return a.equals(s); } public void solve() throws Exception { int n = scan.n...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
5e683c85884dc4390f207d78e0caf8e2
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.*; public class Practica_1 { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); String ln = in.next(); int a = ln.length() - k; int b = k - 1; int c = 0; if (a <...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
931148679f52564d1c0dd00750c3bc1c
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; import java.util.ArrayList; import java.util.Scanner; import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * * @author Ammar.Eliwat */ public cl...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
e89ae730a497822ea2738bb47325582b
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.*; import java.util.*; public class p412a { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String str = sc.next(); if(n==2*k) { if(k<=(n/2)) { ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
21aacf94b03f42e582dbcb2911104087
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.OutputStream; import java.io.IOException; import java.io.PrintWriter; import java.io.Writer; import java.math.BigInteger; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * @author Shamir14 (amirhossein.shapoori@gmail.com) */ public class Main { public s...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
192b61d569ed85239679c23980deb542
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.*; import java.io.*; import java.awt.Point; import java.math.BigDecimal; import java.math.BigInteger; import static java.lang.Math.*; // Solution is at the bottom of code public class A implements Runnable{ final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null; BufferedReader...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
c7e272ee51ada0c1e2bec5512e1d98c5
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.*; import java.util.*; public class CoderStrikeA { private static StringTokenizer st; public static void nextLine(BufferedReader br) throws IOException { st = new StringTokenizer(br.readLine()); } public static int nextInt() { return Integer.parseInt(st.nex...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
698a81597aa1c0e2cef96d10537af56f
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.io.PrintStream; import java.util.Scanner; public class A { public static void main(String[] args) { Scanner in = new Scanner(System.in); PrintStream out = System.out; int n = in.nextInt(); int k = in.nextInt(); in.nextLine(); char[] s = in.nextLine().to...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
0c3a9ba7d968c2f9ec1fba04ec3a7030
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.math.BigInteger; import java.util.Scanner; public class a { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String s = sc.next(); if (n / 2 < k) { for (int i = 1; i <=n-k; i++) { System.out.println("RIGHT"); } ...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
33c5e2d81c84948a4fad4fd2fae4f3f5
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); sc.nextInt(); int k = sc.nextInt()-1; char str[] = sc.next().toCharArray(); if(k < str.length-k-1) { for(;k > 0; k--) { System.out.println("LEFT"); } System.out.println("PRI...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
8ce1b049fbb5960859b3e8f512302620
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int len=0,pos=0,key=0; String slogan=""; len = in.nextInt(); pos = in.nextInt(); in.nextLine(); slogan = in.nextLine(); if (pos==1) key=0; else if (pos==len) key=1; els...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output
PASSED
bbe108159b6915475c207bf6e94fcf85
train_002.jsonl
1397837400
The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It's time to decorate the new office, and the first thing to do is to write the company's slogan above the main entrance to the building.The slogan of the company consists of n characters, so the decorators hung a large...
256 megabytes
/** * Created with IntelliJ IDEA. * User: den * Date: 4/18/14 * Time: 11:49 PM * To change this template use File | Settings | File Templates. */ import java.io.*; import java.util.*; public class TaskA extends Thread { private void solve() throws IOException { int n = _int(); int k = _int(...
Java
["2 2\nR1", "2 1\nR1", "6 4\nGO?GO!"]
1 second
["PRINT 1\nLEFT\nPRINT R", "PRINT R\nRIGHT\nPRINT 1", "RIGHT\nRIGHT\nPRINT !\nLEFT\nPRINT O\nLEFT\nPRINT G\nLEFT\nPRINT ?\nLEFT\nPRINT O\nLEFT\nPRINT G"]
NoteNote that the ladder cannot be shifted by less than one meter. The ladder can only stand in front of some square of the poster. For example, you cannot shift a ladder by half a meter and position it between two squares. Then go up and paint the first character and the second character.
Java 7
standard input
[ "implementation", "greedy" ]
e3a03f3f01a77a1983121bab4218c39c
The first line contains two integers, n and k (1 ≤ k ≤ n ≤ 100) — the number of characters in the slogan and the initial position of the ladder, correspondingly. The next line contains the slogan as n characters written without spaces. Each character of the slogan is either a large English letter, or digit, or one of t...
900
In t lines, print the actions the programmers need to make. In the i-th line print: "LEFT" (without the quotes), if the i-th action was "move the ladder to the left"; "RIGHT" (without the quotes), if the i-th action was "move the ladder to the right"; "PRINT x" (without the quotes), if the i-th action was to "go up...
standard output