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 | 5c2b6d0601ec10d0e3ed1381b6d724b2 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.Scanner;
public class Cf232 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int k = s.nextInt();
int[] a = new int[2*n];
for(int i = 0; i < 2*n... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 87e1943e49d1f7fc65dcb6ac3eaf911c | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.InputStreamReader;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.PrintStream;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.io.InputStream;
/**
* Built using CHelper... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 14c0f7707c7b94a5a47a696ddd1f7fbe | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner cin = new Scanner(System.in);
int n = cin.nextInt();
int k = cin.nextInt();
boolean[] vis = new boolean[2*n+1];
if (k != 0){
System.out.print(k+1+" "+1);
vis[k+1] = vis[1] = true;
}
for (int i = 1 ; i <= 2*n ;... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | da698e5ace50bc48d61e50e9ab3c2526 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
public class C {
public static void main(String[] args) throws Exception {
// BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
// StringTokenizer st = new StringTokenizer(bf.readLine());
Sc... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | e2e112b29de2d448f6b8a097dbcb4077 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the templa... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 3c00c4371614f0489bf2c37d098965e1 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class B {
static StringTokenizer st;
static BufferedReader br;
static PrintWr... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 34457234a700a2eb0898757e85027eec | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.Scanner;
public class B {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
for(int i = 1; i <= n; i++){
if(k > 0){
System.out.print(2*i + " " + (2*i-1));
k--;
}
else{
System.out.print((2*i-1) + " " +... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | a85c77d980bab225e7c44bbb8147dcac | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static ... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | ba8fa59637ef6b307b5b6b43429ba9c5 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main implements Runnable {
public void solve() throws IOException {
int N = nextInt();
int K = nextInt();
int[] a = new int[2 * N];
for(int i = 0; i < 2 * N; i++) a[i] = i + 1;
for(int i = 0; i < K; i++){
int t = a[2 * i];
a[2 * i] = a[2 * i + 1];... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | bd17165b4a60fcd6cb85a04de4244e8b | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;
public class _359B {
public static void main(String[] args) throws Exception {
Reader.init(... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | cbedb4b78c9ee91941d8128768bc899f | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.*;
import java.util.*;
public class Permut{
public static void main(String[] args) throws IOException{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
k = n-k;
for (int i=1; i<n+1; i++) {
if (k > 0) {
System.out.print(2*i+" ");
S... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | c9e0194540a6131945721b29262cd18e | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
public class Task359B {
public static void main(String... args) throws NumberFormatException,
IOException {
Solution.main(System.in, S... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 2c745c975271de99d1db2d663790d52a | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.Scanner;
public class Permutation {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int k=sc.nextInt();
int[]ans=new int[2*n+1];
for(int i=1;i<=2*n;i+=2){
if(k>0){
ans[i]=i+1;
ans[i+1]=... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | de6901d58c166191196e318d375028d8 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.*;
import java.io.*;
import java.lang.reflect.Array;
import java.math.*;
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWrit... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 030f337f8cb6355006eaa74a9bef8c53 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 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();
int arr[] = new int[2 * n];
for (int i = 0; i < arr.length; i++) {
arr[i] = i + 1;
}
... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 5a4e446c1e2b1b700150332679c55b06 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;
p... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 2f805f5a541418d963176274dc8e7a59 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
/**
* @param args
*/
public static void main(String[] args)throws IOException {
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
Strin... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 898fa8c996c737a4064910b1d9d162de | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.math.BigInteger;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 099d2183d5e223a7a8dfadd77be6df3f | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes |
import java.util.Scanner;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author KHALED
*/
public class Permutation {
public static void main(String[] args) {
... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 79fea2123a50c74d7fabb792860baa41 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 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 | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | cd197dcbe9afe9f0a6d1e3799fdb3993 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;
public class solver implements Runnable {
final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
BufferedReader in;
PrintWriter out;
StringTokenizer tok = new StringTok... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | cec596bff5ac3421773d5ee424fea23a | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.Scanner;
public class B {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int k = in.nextInt();
int ans[] = new int [n*2];
for(int i = 0; i < (n<<1); i++) ans[i] = i+1;
for(int i = 0; i < k; i++) {
... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 62369d7dddd4cb663518242101518a3b | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes |
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Scanner;
public class c209_1 {
public static void main(String[] args) {
FasterScanner s = new FasterScanner()... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 691d15f29c006d252f67dc3e08f97157 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.*;
import java.util.*;
public class b1 {
public static void main(String[] args) throws FileNotFoundException {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int n = in.nextInt();
int k = in.nextInt();
for (int i = 0; i < k; i++) {
out.print((2 * i ... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | faf6fa91a8d8e74a0b21d5ee7cab1c75 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.*;
import java.util.*;
public class solver {
BufferedReader in;
PrintWriter out;
StringTokenizer tok;
final boolean OJ=System.getProperty("ONLINE_JUDGE")!=null;
String readString() throws IOException{
while (tok==null || !tok.hasMoreTokens()){
tok=new StringTokenizer(in.readLine());
}
... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | d23ecca8d0a7f240f3d25130de546600 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
for (int i = 1; i <= 2*k; i += 2) {
System.out.print((i + 1) + " " + (i)+" ");
}
for (int i = 2 * k + 1; i <= 2 * n; i += 2) {
System.o... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 536c0948a30926e2392231574568ceb9 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.Scanner;
public class permutation{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int twon = 2*n;
int twok = 2*k;
int[] a = new int[twon];
if( k == 0){
a[0] = 1;
a[1] = 2;
}
else{
... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | f302c7d24323fbbc4c9e292a1fca809f | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.*; //Scanner;
public class R209_Div2_B //Name: Permutation
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] a = new int[n * 2];
int num = 2;
if (k == 0)
{
a[0] = 1... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 28eedbc73a38eba77e03336e117f8d90 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.Scanner;
public class Main {
public static void main(String arg0[]){
Scanner in=new Scanner(System.in);
int n=in.nextInt();
int m=in.nextInt();
int k=m+n;
int a[]=new int [2*n+2];
for (int i=1;i<=n;i++){
a[i*2-1]=i+n;
... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 610cef704cae7da21013e609852be949 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.Scanner;
public class study {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int k = scan.nextInt();
int[] table = new int[2 * n];
if(n%2 == 1){
int n1 = n-1;
} else {
... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 9a7e471e7996135324a6eb9d22066881 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.Locale;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
new Thread(null, new Runnab... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 13b826440ef2c01259dff4a60be819bb | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
O... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | ba15ecad07df6d3c26280d0c38f4ac40 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.Scanner;
public class cod1 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int x=sc.nextInt();
int y=sc.nextInt();
int a=0;
int b=0;
int swap=0;
for(int i=1; i<=x;i++){
b = i*2;
a = b-1;
if(y>0){
y--;
}
el... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 3ad2bbe26e3fefc291a05954e64a968d | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.*;
import java.util.*;
public class Permutation2 {
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.nextToke... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 01d6e131ee59d795892039ff0ef3b152 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main_B {
stat... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | db11a166ebb8f5109907d9848de9a5b5 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int n = in.nextInt(), k = in.nextInt();
System.out.print(k + 1);
for(int i = 1; i<=2*n; i++)
if(i != k + 1)
System.out.print(" " + i);
}
} | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 862acde3f6becee0d9ac4c12add9e2e3 | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | //package codeforces;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import ja... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | 04cb937fba8f7ac52f293da9a14861bc | train_003.jsonl | 1383379200 | A permutation p is an ordered group of numbers p1,βββp2,βββ...,βββpn, consisting of n distinct positive integers, each is no more than n. We'll define number n as the length of permutation p1,βββp2,βββ...,βββpn.Simon has a positive integer n and a non-negative integer k, such that 2kββ€βn. Help him find permutation a of... | 256 megabytes | import java.util.*;
import java.io.*;
public class c359B {
FastScanner in;
PrintWriter out;
final int inf = 2147483647;
public void solve() throws IOException {
int n = in.nextInt();
int k = in.nextInt();
for (int i = 0; i < n; i++) {
if (i > 0)
out.print(" ");
if (k > 0)
out.print((2 * i + 2... | Java | ["1 0", "2 1", "4 0"] | 1 second | ["1 2", "3 2 1 4", "2 7 4 6 1 3 5 8"] | NoteRecord |x| represents the absolute value of number x. In the first sample |1β-β2|β-β|1β-β2|β=β0.In the second sample |3β-β2|β+β|1β-β4|β-β|3β-β2β+β1β-β4|β=β1β+β3β-β2β=β2.In the third sample |2β-β7|β+β|4β-β6|β+β|1β-β3|β+β|5β-β8|β-β|2β-β7β+β4β-β6β+β1β-β3β+β5β-β8|β=β12β-β12β=β0. | Java 7 | standard input | [
"dp",
"constructive algorithms",
"math"
] | 82de6d4c892f4140e72606386ec2ef59 | The first line contains two integers n and k (1ββ€βnββ€β50000, 0ββ€β2kββ€βn). | 1,400 | Print 2n integers a1,βa2,β...,βa2n β the required permutation a. It is guaranteed that the solution exists. If there are multiple solutions, you can print any of them. | standard output | |
PASSED | ab1b477891eb0a0b0b9b9280c5bd0a62 | train_003.jsonl | 1506335700 | Polycarp is in really serious trouble β his house is on fire! It's time to save the most valuable items. Polycarp estimated that it would take ti seconds to save i-th item. In addition, for each item, he estimated the value of di β the moment after which the item i will be completely burned and will no longer be valuab... | 256 megabytes | /*
ID: davidzh8
PROG: subset
LANG: JAVA
*/
import java.io.*;
import java.util.*;
import java.lang.*;
public class fire {
static long startTime = System.nanoTime();
public static void main(String[] args) throws Exception {
boolean debug = (true);
FastScanner sc = new FastScanner("fire.in", d... | Java | ["3\n3 7 4\n2 6 5\n3 7 6", "2\n5 6 1\n3 3 5"] | 2 seconds | ["11\n2\n2 3", "1\n1\n1"] | NoteIn the first example Polycarp will have time to save any two items, but in order to maximize the total value of the saved items, he must save the second and the third item. For example, he can firstly save the third item in 3 seconds, and then save the second item in another 2 seconds. Thus, the total value of the ... | Java 11 | standard input | [
"dp",
"sortings"
] | f7a784dd4add8a0e892921c130068933 | The first line contains a single integer n (1ββ€βnββ€β100) β the number of items in Polycarp's house. Each of the following n lines contains three integers ti,βdi,βpi (1ββ€βtiββ€β20, 1ββ€βdiββ€β2β000, 1ββ€βpiββ€β20) β the time needed to save the item i, the time after which the item i will burn completely and the value of item... | 2,000 | In the first line print the maximum possible total value of the set of saved items. In the second line print one integer m β the number of items in the desired set. In the third line print m distinct integers β numbers of the saved items in the order Polycarp saves them. Items are 1-indexed in the same order in which t... | standard output | |
PASSED | 4f682274af044c59eded83de77a77cc7 | train_003.jsonl | 1506335700 | Polycarp is in really serious trouble β his house is on fire! It's time to save the most valuable items. Polycarp estimated that it would take ti seconds to save i-th item. In addition, for each item, he estimated the value of di β the moment after which the item i will be completely burned and will no longer be valuab... | 256 megabytes | import java.io.*;
import java.util.*;
import java.lang.*;
// .--------------.
// | Try First One|
// '--------------'
// | .--------------.
// | | |
// V V |
// .--------------. |
// ... | Java | ["3\n3 7 4\n2 6 5\n3 7 6", "2\n5 6 1\n3 3 5"] | 2 seconds | ["11\n2\n2 3", "1\n1\n1"] | NoteIn the first example Polycarp will have time to save any two items, but in order to maximize the total value of the saved items, he must save the second and the third item. For example, he can firstly save the third item in 3 seconds, and then save the second item in another 2 seconds. Thus, the total value of the ... | Java 11 | standard input | [
"dp",
"sortings"
] | f7a784dd4add8a0e892921c130068933 | The first line contains a single integer n (1ββ€βnββ€β100) β the number of items in Polycarp's house. Each of the following n lines contains three integers ti,βdi,βpi (1ββ€βtiββ€β20, 1ββ€βdiββ€β2β000, 1ββ€βpiββ€β20) β the time needed to save the item i, the time after which the item i will burn completely and the value of item... | 2,000 | In the first line print the maximum possible total value of the set of saved items. In the second line print one integer m β the number of items in the desired set. In the third line print m distinct integers β numbers of the saved items in the order Polycarp saves them. Items are 1-indexed in the same order in which t... | standard output | |
PASSED | ae08261b04ee31e0ed9f0a20a240c785 | train_003.jsonl | 1506335700 | Polycarp is in really serious trouble β his house is on fire! It's time to save the most valuable items. Polycarp estimated that it would take ti seconds to save i-th item. In addition, for each item, he estimated the value of di β the moment after which the item i will be completely burned and will no longer be valuab... | 256 megabytes | import java.util.*;
import java.io.*;
public class E436 {
public static void main(String[] args) {
MyScanner sc = new MyScanner();
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
int n = sc.nextInt();
Item [] a = new Item[n];
for (int i = 0; i < n; i... | Java | ["3\n3 7 4\n2 6 5\n3 7 6", "2\n5 6 1\n3 3 5"] | 2 seconds | ["11\n2\n2 3", "1\n1\n1"] | NoteIn the first example Polycarp will have time to save any two items, but in order to maximize the total value of the saved items, he must save the second and the third item. For example, he can firstly save the third item in 3 seconds, and then save the second item in another 2 seconds. Thus, the total value of the ... | Java 11 | standard input | [
"dp",
"sortings"
] | f7a784dd4add8a0e892921c130068933 | The first line contains a single integer n (1ββ€βnββ€β100) β the number of items in Polycarp's house. Each of the following n lines contains three integers ti,βdi,βpi (1ββ€βtiββ€β20, 1ββ€βdiββ€β2β000, 1ββ€βpiββ€β20) β the time needed to save the item i, the time after which the item i will burn completely and the value of item... | 2,000 | In the first line print the maximum possible total value of the set of saved items. In the second line print one integer m β the number of items in the desired set. In the third line print m distinct integers β numbers of the saved items in the order Polycarp saves them. Items are 1-indexed in the same order in which t... | standard output | |
PASSED | 9ebe74d37273f3f17883781d6de8da96 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Fruits {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int nFruits = scan.nextInt();
in... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | ef01d7bf8c8f584f58c0d32f623ca9b8 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.StringTokenizer;
public class C_12 {
FastScanner in;
PrintWriter... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 497fc65a0ff74cd4a204da48534be7cf | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes |
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.StringTokenizer;
/**
* 10:48 ~
*
*/
public... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 8213671a5f16ea2234fe0680a9ec922f | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class C12 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int m = in.nextInt();
int pric... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 32ca9400e5666d3bfeef1da4729c5ec1 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.*;
import java.util.*;
public class c12
{
public static void main(String args[])throws IOException
{
InputStreamReader read=new InputStreamReader(System.in);
BufferedReader in=new BufferedReader(read);
int n,m,minp=0,maxp=0,i,j,k=1,l=0,t;
int price[]=new int[1000];... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 59fdd0f09b454138615083318b0a4d72 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes |
import java.io.*;
import java.util.*;
/**
* Codeforces 12C - Fruits
* Created by Darren on 14-10-23.
*/
public class C {
Reader in = new Reader(System.in);
PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) throws IOException {
new C().run();
}
void ... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | e6b7a72fdee8970ebbfa65c804c0be55 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.Scanner;
public class prombel12Cfruits {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int m = scan.nextInt();
boolean fl = true, fl2 = true;
int[] costs = new int[n];
for (i... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 89731748aa2f6351541ef361aad881b9 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
public class P12C {
@SuppressWarnings("unchecked")
public void run() throws Exception {
int n = nextInt();
int m = nextInt();
int [] p = readInt(n);
Arrays.sort(p);
HashMap<String, Integer> hm = new HashMap<String, Integer>();... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 2bfee4b8bf81cb3ff7ce3dc5a76ba558 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.File;
import java.io.FileNotFoundException;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import jav... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 4ec92acb9887d482afea42414a09b288 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.*;
import java.util.*;
public class fruits {
static BufferedReader br;
static StringTokenizer st;
static PrintWriter out;
public static int exists(String[] a, String b) {
for (int i = 0; i < a.length; i++)
if (a[i].equals(b))
return i;
return -1;
}
public static void main(String[] args... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 7129b54626838ee80b4af25d0a4207b9 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.*;
import java.io.*;
public class C12 {
class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream));
tokenizer = null;
}
public InputReader() throws FileNotFo... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 2ac6e1c84037c5ad54f7dfff1c1fe2df | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.*;
import java.util.*;
public class CF {
void realSolve() {
int n = in.nextInt();
int m = in.nextInt();
int[] cost = new int[n];
for (int i = 0; i < n; i++)
cost[i] = in.nextInt();
Arrays.sort(cost);
HashMap<String, Integer> hm = new HashMap<>();
int it = 0;
int[] sz = new int[m];
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 6cfb9ca698c1adf981ae275a002bde8a | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Scanner;
public class Solution
{
public static void main(String args[])
{
Scanner scanner = new Scanner(System.in);
int fruits = scanner.nextInt();
int wishes = scanner.nextInt();
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 92f6a652a783ac8571a48547d6ecd5fb | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes |
import java.util.ArrayList;
import java.util.Scanner;
public class P12C {
P12C (){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
ArrayList<Integer>prices = new ArrayList<>();
for (int i = 0; i < n; i++){
prices.add(sc.nextInt(... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 56241e8861758977ac30cfea6398d119 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.Arrays;
import java.util.ArrayList;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.List;
import java.io.BufferedReader;
import java.util.Collection;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Collections;
import ja... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | e27eb15fee187a2ea08e34f32353de89 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.math.BigInteger;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Scanner;
public class Main {
static void sout(Object a){
System.out.print(a);
}
static boolean espal(String a){
int i=0,j=a.length()-1;
while(i<j){
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 813a69bb3c205a180305567b570adbf0 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 8b0aa0a10f1e2d7bd9ad151d9a4c0b31 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.*;
import java.util.*;
public class j
{
public static void main(String a[])throws IOException
{
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
int i=0,j=0,n=0,m=0,k=0;
long v=0,u=0;
String s;
s=b.readLine();
StringTokenizer c=new StringTokenizer(s);
n=Integer.parseInt(c.nextToken(... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 5ddcbe9d56f43fde57485e2b450aa1c8 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;
public class Temp {
public static void main(Str... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 3bf69eb359be055f63cedd0f2d70da6d | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main implements Runnable {
public void solve() throws IOException {
int N = nextInt();
int m = nextInt();
int[] prices = new int[N];
for(int i= 0; i < N; i++) prices[i] = nextInt();
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 75f29bb825d9c394d6882416a9c69ab0 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.*;
import java.math.*;
import java.io.*;
public class Main {
public static void main(String[] argv)
{
Scanner in = new Scanner(new InputStreamReader(System.in));
int n = in.nextInt();
int m = in.nextInt();
int a[] = new int[n];
for(int i = 0 ; i < n ; i++)
a[i] = in.nextInt();
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 6ab27b5fc9d3d41aa8c8278fdb864540 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner ss=new Scanner(System.in);
int kinds=ss.nextInt();
int buy=ss.nextInt();
int[] price=new int[kinds];
String[] fruit=new String[buy];
for(int i=0;i<kinds;i++){
price[i]=s... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 566994741540a1cbf72be1c2ca7fdfc9 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
public class Fruits {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
HashMap<String, Integer> ma... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | b9d70fc0bc43342a538a32c9624758fa | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.*;
import java.io.*;
public class C0012 {
public static void main(String args[]) throws Exception {
new C0012();
}
C0012() throws Exception {
PandaScanner sc = null;
PrintWriter out = null;
try {
sc = new PandaScanner(System.in);
ou... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | dc07de49d1c99a27f94a487b53a67fac | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.Arrays;
import java.util.Scanner;
import java.util.HashMap;
public class Codeforces {
public static void main(String[] args) {
Scanner entrada=new Scanner(System.in);
HashMap hash=new HashMap();
int n,m;
n=entrada.nextInt();
m=entrada.nextInt();
int[... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 30c93b3544e29eba5c546a84c44c61a1 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 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.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHash... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 6a42ae1220f5844f794dfb0354f39880 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.StringTokenizer;
public class magic2 {
public static void main(String[] args) {
Scanner sc = new Scan... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 2a856e70fbac14f585314be3eca93c85 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static BufferedReader reader
= new BufferedReader(new InputStreamReader(System.in));
static StringBuilder out = new StringBuilder();
public static void main(String[] args){
int[] tmp = nextIntArray();
int n = tmp[0];
int m = tmp[1... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | c54e2cb73321c31bfe9be5f6d7ebf603 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
static Scanner si;
public static void main(String[] args) {
si = new Scanner(System.in);
int n=si.nextInt();
int m=si.nextInt();
int max=0;
int min=0;
int[] n1=new int[n];
String [] m1=new String[m];
Stri... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | bb5ee172b90a5da6993916f1e13cf017 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.*;
public class JavaApplication17 {
/**
* @param args the command line arguments
*/
static class valueComparator implements Comparator<String>{
Map<String,Integer> base;
public valueComparator(Map<String,Integer> base) {
this.base = base;
}
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | da9c48ca0f66e6ed29a49076e41843eb | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.*;
import java.util.*;
public class problem12C {
public static void main (String[]args)throws IOException{
BufferedReader x = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer(x.readLine());
int numtags=Integer.parseInt(st.nextToken());
int numfruits=I... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | c76a4231b7f61321cbed04bfd1a4dc5e | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 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.math.BigInteger;
import java.util.*;
public class Codeforces implements Runnable {
BufferedReader in;
PrintWrite... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 6cbc63c6151c9853500377e7864c0217 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.StringTokenizer;
public class Co... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | a3cc66a085e5f023d95ba523213daf37 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
public class Main {
static void solve(InputReader in, OutputWriter out) throws IOException {
// Scanner in = new Scanner(new BufferedReader(new
// FileReader("input.txt")));
// PrintWriter out = ... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 5a521248383674bc762cde27fa14cbd8 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.*;
import java.util.*;
public class j
{
public static void main(String a[])throws IOException
{
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
int i=0,j=0,n=0,m=0,k=0;
long v=0,u=0;
String s;
s=b.readLine();
StringTokenizer c=new StringTokenizer(s);
n=Integer.parseInt(c.nextToken(... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | bf2657d3f446531456288e2d184a7557 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws java.lang.Exception {
BufferedReader kek = new BufferedReader(new InputStreamReader(System.in));
//Scanner skek = new Scanner(System.in);
PrintWriter outkek = new PrintWriter(System.out);
int minRes =... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 600bc75e705db1a03a6c61ee63c94097 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes |
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
public class C12 {
public static void main (String args[]){
Scanner in = new Scanner(System.in);
int n = in.nextInt(); int m = in.nextInt();
int a[] = new int [n];
for (int i = 0 ; i < n ;i++){
a[i]=in.nextInt();
}
Arrays.so... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 08f6697b0be3d6e28c42596de6b4a735 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Arrays;
public class FRUITS {
public static void main(String[] args) throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | f0c95914e16041e88b87ad31eb6b84b6 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.StringTokenizer;
public class Fruits {
public static void main(String[] args) throws IOException {
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | b78706a7a35a92b57c3e0b046244a722 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
static Scanner si;
public static void main(String[] args) {
si = new Scanner(System.in);
int n=si.nextInt();
int m=si.nextInt();
int max=0;
int min=0;
int[] n1=new int[n];
String [] m1=new String[m];
Stri... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 51352039c64af5190082d2c6df4c264b | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
public class Main12C {
private FastScanner in;
private... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | eb492d2200b6c27d1cfe41f73f8a0fed | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes |
//package threadpractice;
import java.text.DecimalFormat;
import java.util.*;
import java.io.*;
public class Main {
public static void main(String args[]) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s[] = br.readLine().split(" ")... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 1b3ad3afb0137cbe2c64b2d46a29b623 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 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 m = in.nextInt();
int V[] = new int[n];
int N[] = new int[n];
for (int i = 0; i < n; i++) {
... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 6f3120d2fa3d1dd2e526f3665a664f68 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Scanner;
public class problem12C {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nex... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | d49c45e1749e800f8a86ee52bc692aa5 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.Arrays;
import java.util.ArrayList;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.List;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Collections;
import java.io.IOException;
import jav... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 2b6b91026233e5889cd3b0153099a19c | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.Set;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.HashSet;
import java.io.InputStream;
/**
* Built using CHelper plug-in... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | b0a45998f9ca1a7c7a96cae95c04ab6a | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class Fruits {
public static void main(String[] args) {
Scanner in = new Scanner(System.in... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | ab5a533f8f0fbbcbcba368ade8cc701d | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import java.util.Scanner;
/**
*
* @author IR_HAM
*/
public class Fruits
{
public static void main(String [] args)
{
Scanner in = new Scanner(System.in);
int n = in.nextInt(); int m = in.nextI... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 7dbccf55e7db268275d863107b90d3f2 | train_003.jsonl | 1272538800 | The spring is coming and it means that a lot of fruits appear on the counters. One sunny day little boy Valera decided to go shopping. He made a list of m fruits he wanted to buy. If Valera want to buy more than one fruit of some kind, he includes it into the list several times. When he came to the fruit stall of Ashot... | 256 megabytes | //package codeforces.ru.task_12C;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
/**
* Created by myduomilia on 14.10.14.
*/
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.... | Java | ["5 3\n4 2 1 10 5\napple\norange\nmango", "6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange"] | 1 second | ["7 19", "11 30"] | null | Java 7 | standard input | [
"implementation",
"sortings",
"greedy"
] | 31c43b62784a514cfdb9ebb835e94cad | The first line of the input contains two integer number n and m (1ββ€βn,βmββ€β100) β the number of price tags (which is equal to the number of different kinds of fruits that Ashot sells) and the number of items in Valera's list. The second line contains n space-separated positive integer numbers. Each of them doesn't exc... | 1,100 | Print two numbers a and b (aββ€βb) β the minimum and the maximum possible sum which Valera may need to buy all fruits from his list. | standard output | |
PASSED | 751baf54f19e972463a121a0ebfb9e47 | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 256 megabytes | /**
* Created by yume on 2016/5/27.
*/
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
public static void main(final String[] args) {
InputStream in... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output | |
PASSED | 941ef1a7d4347344b127e0fe90b37b4f | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 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 Rene
*/
public class Main {
public static void main(String[] args) {
InputStream inpu... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output | |
PASSED | 1b28233ac0ef57610ca9416e838c8b79 | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 256 megabytes | // practice with rainboy
import java.io.*;
import java.util.*;
public class CF668A extends PrintWriter {
CF668A() { super(System.out, true); }
Scanner sc = new Scanner(System.in);
public static void main(String[] $) {
CF668A o = new CF668A(); o.main(); o.flush();
}
void main() {
int n = sc.nextInt();
int m... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output | |
PASSED | 9d1117cf69fefe8dc1e132fe46e55700 | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 256 megabytes | import java.util.ArrayList;
import java.util.Scanner;
public class ProblemA {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int m = input.nextInt();
int q = input.nextInt();
int[][] arr = new int[n][m];
for (... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output | |
PASSED | eb5fb79374bdbfb92f7a82d4f1f0231d | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 256 megabytes | import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;
import java.io.InputStream;
import java.io.InputStreamReader;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static ... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output | |
PASSED | ae35a6099a0a885382595d5e16b165f0 | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 256 megabytes | import java.util.*;
import java.io.*;
public class A
{
public static void main(String[] args) throws Exception
{
FastScanner in = new FastScanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int n = in.nextInt();
int m = in.nextInt();
int qs = in.nextInt();
Query[] queries = new Query... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output | |
PASSED | bd94389058c008029e475941164b4075 | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputS... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output | |
PASSED | bcf90a67abaf05be217d3de248563ec1 | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 256 megabytes |
import java.io.*;
import java.util.*;
public class A {
InputStream is;
int __t__ = 1;
int __f__ = 0;
int __FILE_DEBUG_FLAG__ = __f__;
String __DEBUG_FILE_NAME__ = "src/A2";
FastScanner in;
PrintWriter out;
class Query {
int t;
int r;
int c;
int x;
Query(int t, int rc) {
this.t = t;
this.... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output | |
PASSED | 3605e9540e708a7474d3e93e39fd4d08 | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 256 megabytes | // package codeforces.cf3xx.cf348.div1;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class A {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
Prin... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output | |
PASSED | d5c51ed247fdcd69e4fb324a11faa003 | train_003.jsonl | 1461515700 | Little Artem likes electronics. He can spend lots of time making different schemas and looking for novelties in the nearest electronics store. The new control element was delivered to the store recently and Artem immediately bought it.That element can store information about the matrix of integers size nβΓβm. There are... | 256 megabytes | import java.io.*;
import java.util.*;
public class Solution {
private BufferedReader in;
private StringTokenizer line;
private PrintWriter out;
private static final int mm = 1000000007;
public void solve() throws IOException {
int n = nextInt();
int m = nextInt();
int q =... | Java | ["2 2 6\n2 1\n2 2\n3 1 1 1\n3 2 2 2\n3 1 2 8\n3 2 1 8", "3 3 2\n1 2\n3 2 2 5"] | 2 seconds | ["8 2 \n1 8", "0 0 0 \n0 0 5 \n0 0 0"] | null | Java 8 | standard input | [
"implementation"
] | f710958b96d788a19a1dda436728b9eb | The first line of the input contains three integers n, m and q (1ββ€βn,βmββ€β100,β1ββ€βqββ€β10β000)Β β dimensions of the matrix and the number of turns in the experiment, respectively. Next q lines contain turns descriptions, one per line. Each description starts with an integer ti (1ββ€βtiββ€β3) that defines the type of the ... | 1,400 | Print the description of any valid initial matrix as n lines containing m integers each. All output integers should not exceed 109 by their absolute value. If there are multiple valid solutions, output any of them. | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.