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 | d2003b493bcbc2af5bb3a4e9084317b7 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.List;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Comparator;
public class AllZeroSequence {
public static void main(String[] args) {
try(final Scanner scanner = new Scanner(System.in)){
int noTests = scanner.nextInt();
while(noTest... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 2fd4f833af6c3669ab0492bd920b802b | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
/**
*
* @author ZatFa
*/
public class TokitsukazeAndAllZeroSequence {
public static void main(String[]args){
Scanner input = new Scanner(System.in);
int t = input.nextInt();
ArrayList <Integer> list = new ArrayList <> ();
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 68dd58bcff7df9c0009572d236d2a93e | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
import java.nio.Buffer;
public class codeforce {
public static void main(String[] args) throws Exception{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
Scanner read = new Scanner(System.in);
int t = Integer.parseInt(bf.... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 128cdd4d9e773ca0afc6e558f125becf | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number 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.util.*;
public class Round_789 {
static BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 6c8537e7ca2ea8a596937eaa59e08ad9 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
public class cf1678A {
// https://code... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 6bcf2a8e7e9bd7dc5f55bf0345345582 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
public class cf1678A {
// https://code... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 53c806f822b02f631540ed8cf319236b | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class Main {
public static void sort(int[] in) {
shuffle(in);
Arrays.sort(in);
}
public static void shuffle(int[] in) {
for (int i = 0; i < in.length; i++) {
int idx = (int) (Math.random() * in.length);
int tmp = in[i]... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | abc70e0460dc91fdd7bdbfddcc5479aa | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.util.Arrays;
import java.util.Scanner;
public class TokitsukazeandAllZeroSequence {
public static void main(String[] args) {
Scanner sc=new Scanner (System.in);
int t=sc.nextInt();
for(int i=0;i<t;i++) {
int n=sc.nextInt();
int arr[]=new int[n];
for(int j=0;j<n;j++) {
a... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 6d5307a8cb91c00c643f67ec2ae3043c | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
public class TokitsukazeandAllZeroSequence {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
int n=sc.nextInt();
int arr[]=new int[n];
int count=0;
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 310f350baf1ab02c0f12e822eb25062b | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt(), n;
int a[] = new int[100], min, sum, z;
boolean c;
while(t -- > 0){
sum = 0;
z = 0;
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 42fbebe22bfd9bf7c64336af471e2529 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class TaskA {
static void solve(FastScanner fs) {
int n = fs.nextInt();
int a[] = fs.readArray(n);
int num[] = new int[101];
int cnt = 0, dup = 0;
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 224b7eda58b24a4c2ccbfefc22816aa2 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
public class Solution {
static Scanner scan = new Scanner(System.in);
private static final Integer INF = 32768;
public static void main(String[] args) {
int cas = sc... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 39921b26f568362882a07efc7503d33d | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
// System.out.println(sc.nextByte());
allzero(sc);
}
private static void allzero(Scanner scanner){
int testcase=scanner.nextInt();
HashMap<Integ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 87882507cb09bf3e0e4788ebd19cc2f3 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | //package Practise_problems;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Random;
import java.util.StringTokenizer;
public class ZeroSequence {
public static void main(String []args) {
Fa... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 03c576323dc5303ea5ee251946666bb9 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class A
{
public static void main(String[] args) {
Scanner read= new Scanner(System.in);
int t=read.nextInt();
for(int j=0;j<t;j++){
int n = read.nextInt();
boolean f = true; int cnt=0;
Set<Integer> s = new HashSet<I... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | b517514186ed4a278aadb7dbd2e2790b | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Solution {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i = 0; i < n; i++) {
int l = sc.nextInt();
int[] a... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 6edf32fb88a37ad87c3abe258778ff07 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.*;
import java.util.*;
/**
* @author atulanand
*/
public class Solution {
static class Result {
public int solve(int[] arr, int n) {
int zero = 0;
boolean same = false;
Set<Integer> set = new HashSet<>();
for (int i : arr) {
if (i == 0) {
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 32719fc7b080d561d6bb4fa9d47b3541 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.nio.file.FileAlreadyExistsException;
import java.util.*;
public class roughCodeforces {
public static boolean isok(long x, long h, long k){
long sum = 0;
if(h > k){
long t1 = h - k;
long t = t1 * k;
sum += (k * (k + 1)) / 2;
su... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 10411ecca733abf55fcbeb1e8f459f71 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.Scanner;
public class Testing1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
for(int w = 0; w < t; w++){
int n = in.nextInt();
int[] a = new int[n];
int[] num = new int[101]... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 58562c99e776df27fb07db7112b96364 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.Arrays;
import java.util.Scanner;
public class TokitsukazeandAllZeroSequence {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int t = scn.nextInt();
while(t -- > 0){
int n = scn.nextInt();
int[] arry = new int[n];
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | dbcc1620543101a419bb0ae71d6f5e3a | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number 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;
import java.util.*;
public class coding {
// static class FastReader {
// private InputStream stream;
// private by... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | f3b65e2d841162c2e08b9b304f480324 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) throws FileNotFoundException,IOException, InterruptedException {
Scanner s=new Scanner(System.in);
PrintWriter pw=new PrintWriter(System.out);
int t=... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | ba38e17690f38359c37d744d10c04a7c | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class TokitsukazeandAllZeroSequence {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new B... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | b77b9703f3f2d26b739e21e0eb592443 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
while (n-->0) {
int m = scanner.nextInt();
int[] arr = new int[m];
int count = 0;
HashSet<Integer> set = new HashSet<>();
for (int i =... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | ddaaa56d408f3fe92f63097e7f7af2b4 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class TokitsukazeAndSeqLite {
private static int countOfOper(int lenghtOfSeq, int[] seq) {
int min = lenghtOfSeq;
boolean zeroFlag = false;
for (int i = ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 64a791083d1b48cae90e60cfdcb84739 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class test {
public static void main(String []args){
Scanner sc=new Scanner (System.in);
int t=sc.nextInt();
while(t>0){
int c=0,n=sc.nextInt();
boolean flag1=false,flag2=false,flag3=true;
int []arr=new int[n];
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | ce814ef31eeb9d3744da6dab554fd943 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.*;
import java.util.*;
public class A {
static long TIME_START, TIME_END;
public static class Task {
public void solve(Scanner sc, PrintWriter pw) throws IOException {
int n = sc.nextInt();
int[] arr = sc.readIntArray(n);
Arrays.sort(arr);
if (arr[0] == 0) {
int coun... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 4e222c89dd4f09b9aa317ef47ba3cb4a | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.io.*;
import java.util.*;
public class ProblemA{
static long mod = 1000000007L;
static MyScanner sc = new MyScanner();
//code here
static void solve(){
int x = sc.nextInt();
int[] a = new int[x];
int[] b = new int[101];
for(int i=0;i<x;i++)... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | c4500b399879325d9b266b3f72034a91 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import static java.lang.System.*;
public class Round_780_Div_3 {
static MyScanner str = new MyScanner();
static ArrayList<Integer> list;
final int mod = ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 69f2a6b37ff0a17e4ed8d5bfb4fd825e | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class main{
public static void main(String[]args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0) {
int n=sc.nextInt();
int arr[]=new int[n];
boolean haveZero=false;
boolean isSame=false;
int noOfNonZeros=0;
for(int i=0;i<n;i++) {
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 1dfac8f1e8d61806d0b907a84d525fa6 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.util.*;
import java.lang.*;
import java.io.*;
public class A {
public static void main(String[] args) throws java.lang.Exception {
try {
FastReader sc = new FastReader();
int t = sc.nextInt();
u: while (t-- > 0) {
int n = sc.nextInt();
HashSet<Integer> hs=new HashSe... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | d551980e2e5624f44a0fb2c2bcedf940 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;
public class A_Tokitsukaze_and_All_Zero_Sequence {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public Fas... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 535096d135c73a436e750310324f162a | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | ///package solution;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class Solution implements Runnable {
public void solve() throws Exception {
i... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 31c16d70ecaa3bb201ae27d7cd4da61e | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
public class Contest {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
while(t-->0) {
// HashMap<Integer, Integer> h = new HashMap<>();
HashSet<Integer> h = new Ha... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 83267fa34df8ef35ef7f0d15428c925a | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.math.BigInteger;
public class Solution{
public static void main(... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | ccda690b8514db73c0ee2e0ad3c9f45c | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 8747dc29d5c722fdda99d2185b0fb659 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.*;
import java.util.InputMismatchException;
public class A {
public static void main(String[] args) throws IOException {
ReadInput in = new ReadInput(System.in);
PrintWriter writer = new PrintWriter(System.out);
int t = in.nextInt();
for (int ti = 0; ti < t;... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 42fcfa05fa0ad2babf2bbdc4913ba200 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.Scanner;
public class check{
public static boolean isPresent(char ch, char[] arr){
for(int i=0;i<arr.length;i++){
if(ch==arr[i])
return true;
}
return false;
}
public static void main(String[] args){
Scanner sc=new Sc... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 81adb164d5a6d38ddb947b3879dccb00 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.Map.Entry;
public class codeforces {
static int mod = 1000000007;
public static void main(String[] args) {
FastReader sc = new Fas... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 15323a83c8ad5e68e0ddc981af0ed27c | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class A {
static class RealScanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
S... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | d949e0d9b31ee978646d061e3e8e1d68 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.util.InputMismatchException;
/**
* Built using CHelper plug-in
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | cfc388149915ff19c76284ea0b4369ca | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.util.*;
import java.io.*;
public class A{
public static void main(String[] args) throws IOException,NumberFormatException{
try {
FastScanner sc=new FastScanner();
int t=sc.nextInt();
while(t-->0) {
Set<Integer> set=new HashSet<>();
int n=sc.nextInt();
int a[]=sc.readArra... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 78d9e9892e7947c7ddd00e252d5ac12b | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException {
int t = sc.nextInt();
while (t-- > 0) {
int n = sc.nextInt();
int[] arr = sc.nextIntArray(n);
int duplicate = 0;
int ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 7326fe8ff6611933afce87fde7b68cdb | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.util.*;
import java.io.*;
public class TokitsukazeandAllZeroSequence {
public static void main(String[] args) throws IOException {
int t = readInt();
while(t-->0){
int n = readInt();
int [] arr = new int[n];
boolean zero = false;
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | df1c3d41f384d5d30e9187080413137e | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class Prob1678A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int t = sc.nextInt();
while(t-->0) {
int n = sc.nextInt();
Inte... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 2f954878c048e322aac19f8678106dd9 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
import java.lang.*;
public class Main {
static class Reader {
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public Reader() {
d... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 5772db88d3335de3778c49f68a138225 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | //<———My cp————
import java.util.*;
import java.io.*;
public class Day1{
public static void main(String[] args) throws Exception{
FastReader fr = new FastReader(System.in);
int t = fr.nextInt();
while(t-->0){
int n = fr.nextInt();
int[] vals = new int[n];
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | eb9e1e50b606b9e9548d130e963f6f71 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.Vector;
import static java.lang.Math.PI;
import static java.lang.Math.pow;
public class haha {
static cla... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 7dfe91e5e3f00497d42711a31c1980b4 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastReader in = new FastReader(System.in);
PrintWriter pw = new PrintWriter(System.out);
int test = in.nextInt();
for(int tt=1;tt<=test;tt++) {
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 16e24cf1e4afb65b77375b1c42d9e723 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Scanner;
public class aa {
public static void main(String[] args) {
var in = new Scanner(System.in);
int n = in.nextInt();
for(int i = 0; i < n; i++) {
int m = in.nextInt();
int[] a = new int[m];
for(int j = 0; j < m; ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 0ae21aa412a8f59da1e9633e1e5c8b68 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int caseNum=input.nextInt();
for (int i = 0; i < caseNum; i++) {
int n = input.nextInt();
int[] num=new int[n];
for (int j = 0; j ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 9f7f36130901f6f58af8871190da96f0 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | /*
Enjoy the code :>
Modular Arithematic
1. (a + b)%c = ((a%c)+(b%c))%c
2. (a - c)%c = ((a%c)-(b%c) + c)%c
3. (a * c)%c = ((a%c)*(b*c))%c
4. (a / b)%c = ((a%c)*(b-1%c))%c
Modular Exponetion --> time complexity O(logN)
*/
import static java.lang.Math.max;
import static java.lang.Math.min;
import s... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 0e83bcc63b184d555f8f60bd741893e6 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class anshu {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
while(t-->0) {
int n=sc.nextInt();
int[] arr = new int[n];
for(int i=0;i<n;i++)
arr[i]=sc.nextInt();
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 4ea69279481c0e460450bb902e8a7c75 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.*;
import java.util.*;
public class Cses {
static boolean[] table = new boolean[10001];
static StringBuilder sb =new StringBuilder();
static TreeSet<String> sn = new TreeSet<>();
static List<Long> sm = new ArrayList<>();
static int numberOfWays=0;
static class Point {
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 0597165588bfbd62c2c35034c487040f | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.pars... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | df428326f223657325f4a83a783aa004 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.lang.*;
public class Solution{
static int mod=(int)1e9+7;
static int mod1=998244353;
static FastScanner sc = new FastScanner();
static StringBuffer ans;
static long ct;
public static... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 444026eea2ee40c1d95fc844aaea5407 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | /*
"Everything in the universe is balanced. Every disappointment
you face in life will be balanced by something good for you!
Keep going, never give up."
Just have Patience + 1...
*/
import java.util.*;
import java.lang.*... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 8e1b0efc5c67922516ff20726e09b514 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class Solution {
static Scanner sc = new Scanner(System.in);
public static void solver() {
int n = sc.nextInt();
int[] arr =new int[101];
boolean hasDuplicate = false;
int zeros = 0;
for(int i =0; i < n; i++){
int a = ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | df13b1425ddf245998f7928a41981eb1 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t > 0){
t--;
int n = sc.nextInt();
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 4090e2a5eb125b83f9ffbc6a2f759a4d | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | /*
AUTHOR-> HARSHIT AGGARWAL
CODEFORCES HANDLE-> @harshit_agg
FROM-> MAHARAJA AGRASEN INSTITUE OF TECHNOLOGY
>> YOU CAN DO THIS <<
*/
import java.util.*;
import java.io.*;
public class zerosequenceA {
public static void main(String[] args) throws Exception {
int t = scn.nextInt();
while... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | a98e7de553382fb572328f94bb7398e6 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
public class Practice {
static boolean multipleTC = true;
final static int mod2 = 1000000007;
final static int mod = 998244353;
final double E = 2.7182818284590452354;
final double PI = 3.14159265358979323846;
int MAX = 1005;
void pre() throws Exception {
}
// All th... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 736488e1ad059d5332c28fc1e463bfe0 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.IOException;
import java.util.HashMap;
import java.util.Scanner;
public class codeforces1678A {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
for (int j = 0;j < t; j++) {
int n = in.... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | ebc2884f7a8cca2edba6c8caa9405223 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(
new InputS... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | e31f4ec1283c6315814558ae0b05f5ae | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner in = new FastScanner();
int t = in.nextInt();
while (t > 0) {
int n = in.nextInt();... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 926e5cc977583d70b743a2ef2a7976a2 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
while (t > 0) {
int n = in.nextInt()... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | bf1050b8e3057a28f2011f92ba38cb9e | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main
{
InputStream is;
PrintWriter out = new PrintWriter(System.out); ;
String INPUT = "";
void run() throws Exception
{
is = System.in;
solve();
out.flush();
out.close();
}
publ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | dae8e3b5304753fc8b1d55395c0e13e7 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | // package div_2_789;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class A{
public static void main(String[] args){
FastReader sc = new FastReader();
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt();
int a[]=sc.fastAr... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 4cd473ef6a2fda35b64eaafe9bca234b | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class Rough {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int t =sc.nextInt() ;
while(t > 0) {
int size = sc.nextInt() ;
int [] arr = new int[size];
for(int i = 0 ; i < size ; i++) {
arr[i] = sc.nextInt() ;
}
Arrays.... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 341430b9006fd8648369de38c40a0718 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.*;
import java.util.*;
public class JavaApplication {
static BufferedReader in;
static StringTokenizer st;
public String getLine() throws IOException {
return in.readLine();
}
public String getToken() throws IOException {
if (st == null || !st.hasMoreTokens())
st =... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 57efa896d371141e01bae9bdc126b00f | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;import java.io.*;
public class k{
// static boolean f(int []a){
// int n=a.length;
// ArrayList<Integer> x=new ArrayList<>();
// ArrayList<Integer> y=new ArrayList<>();
// if(n==1 || n==2)return true;
// if(a[n-1]>=a[n-2]){y.add(a[n-1]);x.add(a[n-2]... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 1ac47816b0cc47e3c10782d08588ac92 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
public class Main{
public static void main(String[]args){
long s = System.currentTimeMillis();
new Solver().run();
System.err.println(System.currentTimeMillis()-s+"ms");
}
}
class Solver{
final long... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 45939031e32f22d8ec77858dc29e381f | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.*;
import java.util.*;
import java.lang.*;
public class Codeforces {
public static void main(String[] args)
{
Scanner input= new Scanner(System.in);
int t=input.nextInt();
while(t-->0){
int n=input.nextInt();
int[] ar=new int[n];
boolean ok=false;
int zeros=0;
int equals=0;
for(i... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | b8bbcf191096cc2f9d00e6fdfdc242ac | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.math.*;
import java.io.*;
public class Main {
static ArrayList<Integer> prime = new ArrayList<>();
static long mod = 1000000007;
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReade... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 7431e921e212136d3bf41439e0c2a2ea | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-- > 0) {
int n = sc.nextInt();
int[] arr = new int[n];
for(int i = 0; i < n; i++) {
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 41f22197e3fa5b4cca87022d386dc08b | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
// bo... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | d432244aa31704a91a008f55b67d209a | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int test = sc.nextInt();
while(test -- > 0) {
int n = sc.nextInt();
int[] arr = new int[n];
boolean isZ = false;
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | a30cd9fabfa069fff853aef2d3f5bf0a | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class A {
public static void main(String[] args) throws IOException {
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 95d89c7e4bcc6688e900a9695198ba23 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class problem1{
public static void main(String[] args) {
Scanner sh = new Scanner(System.in);
int t = sh.nextInt();
while(t>0){
int n = sh.nextInt();
Map<Integer,Integer> a = new Ha... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 1555166dc89d6bf1c94eb841cf4f3f1d | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.HashMap;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int T = s.nextInt();
for(int t=0;t<T;t++) {
int n = s.nextInt();
int ip, max=0, sol;
HashMap<Integer, Integer> map = new HashMap<Integer, Inte... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 64232252f749779d2c812b5699657a47 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
public class ZeroSequence {
static int t;
static int n;
static ArrayList<Integer> input;
public static boolean allOs(ArrayList<Integer> inputArr)
{
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 35ba02caa3e02cf2af61b527010c9fd9 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class A_Tokitsukaze_and_All_Zero_Sequence {
public static void main(String[] args) {
try {
FastReader s = new FastReader();
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | cc8ad86144afb38d8cb3db188527b784 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class CFZS {
public static void main(String[] args) {
Scanner sn=new Scanner(System.in);
int t=sn.nextInt();
while(t-->0){
int n=sn.nextInt();
int a[]=new int[n];
for(int i=0;i<n;i++)
a[i]=sn.nextInt();
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 36d814f776ee70ab3ed9c78fe7dd5347 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class PC {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
sc.nextLine();
for (int z = 0; z < t; z++) {
// String s = sc.nextLine();
// String ts = sc.nextLine();
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | d5349907d21beb32963557430dbd20d5 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main
{
static PrintWriter out = new PrintWriter(System.out);
static FastReader sc = new FastReader();
public static void main (String[] args) throws java.lang.Exception
{
int t = i();
int te=t;
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 86e8a192aab235cd49837093414dfd13 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
import java.util.*;
public class Problem1678A {
public static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
int tc = scanner.nextInt();
while (tc-->0){
int n = scanner.nextInt();
int [] array = new int[n];
int ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | a6d931fc2a3386d7e97036cf9c30eab4 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes |
/*
* way to red
*/
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import static java.lang.System.out;
import java.util.*;
import java.io.*;
import java.math.*;
public class CF789A
{
public static void main(String AC[]) throws Exception
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 0a599d41709dc03e2a3cf5faa1d88eda | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.StringTokenizer;
public class TokitsukazeAndAllZeroSequence {
public static void main(String[] args) throws Exception {
var br = new BufferedReader(new InputStreamReader(S... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 214c9213cab75a5a941731d86fea04e1 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
public static void process()throws IOException
{
int n=ni();
int arr[]=iarr(n);
int zero=0,dup=0;
Set<Integer> set=new HashSet<>();
for(int i=0;i<n;i++)
{
if(arr[i]==0)
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 6610871dda6e5643320dbfcab1f2de91 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | //package com.company;
import java.math.BigInteger;
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
public static FastScanner fs = new FastScanner();
public static Scanner sc = new Scanner(System.in);
public static PrintWriter out = new PrintWriter(System.out);
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | d808b2e5a48eb2469da8ab5d3e2bad7f | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | /*----------- ---------------*
Author : Ryan Ranaut
__Hope is a big word, never lose it__
------------- --------------*/
import java.io.*;
import java.util.*;
public class Codeforces2 {
static PrintWriter out ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 5c5ffee094c55a276f0f29c60702dc1f | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.io.*;
import java.util.HashSet;
import java.util.StringTokenizer;
public class CodeForces789_1 {
final static class IO {
final static class Reader {
BufferedReader reader;
StringTokenizer tokenizer = null;
Reader() {
reader = new BufferedRea... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 867e764e11f6e7a7c02f5abb6ee604e2 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class r789 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt();
int[] arr=new int[n];
Map<Integer,Integer> map=new HashMap<>();
b... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 72744667174204134ef225e2f3581a17 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
public class TokitsukazeAndAllZeroSequence{
public static void main(String[] args) {
MyScanner sc = new MyScanner();
out = new PrintWriter(new BufferedOutputStream(System.out));
//CODE HERE
int t=sc.nextInt();
while (t-->0){
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 95a79f07322605276ce260d795837791 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.util.Map.Entry;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.math.*;
import java.sql.Array;
public class imp {
static final Random random = new Rand... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | bd344885d7ffdeef18c9ee098c6b9d15 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
public class A {
static class Scan {
private byte[] buf=new byte[1024];
private int index;
private InputStream in;
private int total;
public Scan()
{
in=System.in;
}
public int scan()throws ... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | cf32f9ca07f03c59b63cad581a3d809e | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | // import static java.lang.System.out;
import static java.lang.Math.*;
import static java.lang.System.*;
import java.lang.reflect.Array;
import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
static FastReader sc;
static long mod = ((long) 1e9) + 7;
static long lmax=... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | ece1105fafaddbd0c5f1469b4aa36a0e | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main{
static class FastReader {
BufferedReader br; StringTokenizer st;
public FastReader(){
br = new BufferedReader(new InputStreamReader(System.in));
}
String next(){
while (st == null || !st.hasMore... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 3928a717a6dcb4f0b3c8b2236539fd44 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int t1=sc.nextInt();
for(int j1=0;j1<t1;j1++){
int n=sc.nextInt();
int a[]=new int[n];
int c=0;
int d=0;
for(int i=0;i<a.length;i++){
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 11 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | 6b1900c654deaf825349f95c332be2fe | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | //package com.company;
import java.util.*;
import java.util.Stack;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
while(t-- > 0){
int n = in.nextInt();
int[] arr = new int[n];
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 17 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output | |
PASSED | b1a8ec8845f1fbda3e5fb84910f5df76 | train_108.jsonl | 1652020500 | Tokitsukaze has a sequence $$$a$$$ of length $$$n$$$. For each operation, she selects two numbers $$$a_i$$$ and $$$a_j$$$ ($$$i \ne j$$$; $$$1 \leq i,j \leq n$$$). If $$$a_i = a_j$$$, change one of them to $$$0$$$. Otherwise change both of them to $$$\min(a_i, a_j)$$$. Tokitsukaze wants to know the minimum number of... | 256 megabytes | import java.util.HashSet;
import java.util.Scanner;
public class problem10 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t= sc.nextInt();
while(t-- > 0){
int n = sc.nextInt();
int arr[] = new int[n];
... | Java | ["3\n3\n1 2 3\n3\n1 2 2\n3\n1 2 0"] | 1 second | ["4\n3\n2"] | NoteIn the first test case, one of the possible ways to change all numbers in the sequence to $$$0$$$:In the $$$1$$$-st operation, $$$a_1 < a_2$$$, after the operation, $$$a_2 = a_1 = 1$$$. Now the sequence $$$a$$$ is $$$[1,1,3]$$$.In the $$$2$$$-nd operation, $$$a_1 = a_2 = 1$$$, after the operation, $$$a_1 = 0$$$.... | Java 17 | standard input | [
"implementation"
] | ad242f98f1c8eb8d30789ec672fc95a0 | The first line contains a single positive integer $$$t$$$ ($$$1 \leq t \leq 1000$$$) — the number of test cases. For each test case, the first line contains a single integer $$$n$$$ ($$$2 \leq n \leq 100$$$) — the length of the sequence $$$a$$$. The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$... | 800 | For each test case, print a single integer — the minimum number of operations to change all numbers in the sequence to $$$0$$$. | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.