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 | d4bcefb7b4c5261a560f94b98613d27a | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class Cf {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int t=sc.nextInt();
while(t--!=0) {
int n=sc.nextInt();
boolean found=false;
int i=0;
for( ;i<n;i++) {
int a=sc.nextInt();
if(!issqrt(... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | ddaf9a59af55c1baca2c35792f899ed6 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class Cf {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int t=sc.nextInt();
while(t--!=0) {
int n=sc.nextInt();
boolean found=false;
int sum=1;
int i=0;
for( ;i<n;i++) {
int a=sc.nextInt();
sum*=a;
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 03521f7aebf6785841ccf55d8da783e5 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class Main {
public static void main(String[] args) {
// write your code here
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;... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 91f278079a570d4cb2cea1d7e70c5660 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.io.*;
import java.lang.*;
import java.util.*;
public class A1514 {
public static void main(String[] args) throws IOException{
StringBuffer ans = new StringBuffer();
StringTokenizer st;
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
st... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 7852ab4dc23052adc859f7ed322c3141 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class CodeForces_716 {
public static void main(String[] args){
Scanner in=new Scanner(System.in);
int tt=in.nextInt();
while (tt-->0){
int n=in.nextInt();
long[] a=new long[n];
for(int i=0;i<n;i++){
a[i]=... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 26b30b9ad5e70b62cc0b32d60164c306 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.io.*;
public class SolutionA{
public static void main(String[] args) throws Exception{
Fast sc=new Fast();
StringBuilder sb=new StringBuilder();
int t=sc.nextInt();
HashSet<Double> al=new HashSet<>();
while(t-->0){
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | d3da5c3487add77da9be89ce7c925092 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int t = scn.nextInt();
while(t>0){
int n= scn.nextInt();
int[] arr = new int[n];
for(int i = 0;i<n... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | f3e444b0b7eed97480c0d60324b7ba6b | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Random;
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 957984da3b4359e174c74e686cf6a734 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class Main {
public static void main(String[] srgs) {
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]... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 20a2f12a772206768dc9bb1fe34e93e0 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.util.regex.*;
import java.lang.*;
import java.io.*;
public class rough{
static BufferedReader br;
/*static int[][] dir = {{1,0}, {0,1}, {-1,0}, {0,-1}};
static class Node{
int n, f;
Node(int n, int f){
this.n = n;
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 86c6d032fef5a9dc9523f9bc87106015 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
public static void main(String args[]) throws IOException {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int sum=0;
for (int i=0;i<n;i++){
int number= input.nextInt();
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 3c4b4379f85e2c190c72a2e0e39f739d | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Codechef
{
public static void main(String [] args)
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0)
{
int n = sc.nextInt();
int a[] = new int[n];
String s... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | c8ba7d1d5d8fd3288f57461bc5852d49 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 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();
long a[] = new long[n];
long product = 1;
String s = "";
for(int i=0;i<n;i++) {
product = 1;
a[i] = sc.nextLong();
product=pr... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | b9552e45ff425cea0e5fb7fd7ddfabec | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastReader in = new FastReader();
PrintWriter pw = new PrintWriter(System.out);
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 31188ed2812049fb9ab009df194434ae | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static int mod=(int)1e9+7;
public static void main(String[] args) {
Scanner scn=new Scanner(System.in);
int t=scn.nextInt();
while(t-- >0){
int n=scn.nextInt();
boolean ans=true;
while(n-->0) ... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 7afbedfe895b95ff4313bc886c1643ba | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in =new Scanner(System.in);
int t=in.nextInt();
while(t>0){
int a=in.nextInt(),s=0;
int arr[]=new int[a];
for(int i=0;i<a;i++){
ar... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 4d907e8cba712910019dda30f379504a | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 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();
double arr[] = new double[n];
int pro = 1;
double num = 0;
for(int i=0;i<n;i++)
{
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 0955c020c65b89f62937f9e9b0ab4a4e | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class Test1 {
public static boolean isPerfectSquare(int n){
boolean res=false;
double sqrt=Math.sqrt(n);
return ((sqrt - Math.floor(sqrt)) == 0);
}
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | c502962010288c63e0160bf538e1b191 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
Scanner input = new Scanner(System.in);
int numberOfTestCases = input.nextInt();
for (int x = 0; x < numberOfTestCases; x++){
int arraySize = input.nextI... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 03ddd58155c707d2eb53f11b75ebf06b | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.io.*;
import java.math.*;
import java.util.*;
// @author : Dinosparton
public class test {
static class Pair{
long x;
long y;
Pair(long x,long y){
this.x = x;
this.y = y;
}
}
static class Compare {
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 2216da952a717ab2d802f48ea2fb8102 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.io.*;
public class a2oj {
static FastReader sc;
static PrintWriter out;
static int mod = 1000000007;
public static void main(String[] args) throws IOException {
if (System.getProperty("ONLINE_JUDGE") == null) {
File f1 = new File("input.t... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 6ff92cd0924264e6e7db56fdebe18d02 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
import java.io.*;
import java.util.*;
import java.util.Stack;
import java.util.HashMap;
import java.util.Map;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.StringTokenizer;
import java.io.Reader;
import java.util.Collections;
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 4d601f7a23f53a2213327d4025aca7fb | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.io.*;
public class Main
{
public static void main(String[] args)throws java.lang.Exception
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int t=Integer.parseInt(br.readLine());
while(t-->0)
{
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | bc422106ca5a89d1013ae135096951ca | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.io.*;
import java.util.*;
public class Codeforces {
public void solve() {
FastScanner fs = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int t = fs.nextInt();
while (t-- > 0 ){
int n = fs.nextInt();
int[]ar = n... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | f480cb86b87d1bb394006945a3af6338 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
public class Main{
static int mod=(int)1e9+9;
public static void main(String args[]){
InputReader sc = new InputReader(System.in);
//write your code
int test=sc.nextInt();
while(test-->0){
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | edcb46d04d2fda577fc26d273db040e5 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.PrintWriter;
import java.io.OutputStream;
/*
* @author : Imtiaz Adar
*/
public class Perfectly_Imperfect_Array {
public static void main(String[] args) {
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | d7062a28baa5daba18bd09a718a9a8b8 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class HelloWorld{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0)
{
int n = sc.nextInt();
long a[] = new long[n];
int l = 7;
for(int i=0;i<n;i++) {
a[i] = sc.nextLong();
double c1 ... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | d12447283bbded879ba8f867cc5ad992 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | //package codeforces;
import java.util.Scanner;
public class PerfectlyImperfectArray {
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[]=ne... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 65f9e9df469e925b0aec0d5e6a5051be | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class Test{
public static void main(String rhf[]){
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt();
int a[]=new int[n];
for(int i=0;i<n;i++){
a[i]=sc.nextInt();
}
boolean flag=true;
for(int i=0;i... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | ed5996d2f3389c1f06ade1fa825a32d9 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class CF1514A {
public static void main(String[] args) throws IOException {
int t = ri();
t: while (t-- > 0) {
int n = ri(), a[] = ria(n);
for (int x : ... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 0bb27006a1117d2971deac2339fdcedc | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | //package contest04_05;
import java.util.*;
public class ProblemA {
public static void main(String[] args) {
Scanner in= new Scanner (System.in);
int test= in.nextInt();
for(int t=0;t<test;t++)
{
int n=in.nextInt();
String ans="NO";
double[] prod= new double[n];... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | d726e0a2800174b951b65d789643bf0d | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Test{
static FastReader scan;
static void solve(){
int n=scan.nextIn... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 10180ad72109f7c7275860ceca383753 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class test{
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int t = sc.nextInt();
while(t-- >0){
int n = sc.nextInt(), val =1;
int[] arr = new int[n];
boolean v = false;
for... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 74aa39505061bb3e3dcb56038e4a4002 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Problem_1 {
public static void main(String args[]) {
FastScanner sc = new FastScanner();
int testSize = sc.nextInt();
String[] answer = new... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | f2485167f09a60e844f5fb268d6aca89 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class PerfectlyImperfectArray {
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[] a=new int[n];
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 98c532d980922c5e920373e44b74f0f5 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.* ;
import java.lang.* ;
import java.io.*;
public class javaTemplate {
static FastReader sc = new FastReader();
// static Scanner sc = new Scanner(System.in) ;
public static void main(String[] args) {
int t = sc.nextInt() ;
while(t -- != 0) {
int n = s... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | e1dd04c271dc5d76fa63819026444366 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.util.*;
public class random{
static boolean check(int n){
for(int i=0;i<=Math.sqrt(n);i++)
{
if(n==i*i)
return true;
}
return false;
}
public static void main(String args[]){
Scanner sc=new Scanner(Sys... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 388440aeeb2697d2c9ed14d0fb76bf64 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n-- >0){
boolean imp = false;
int count = 0;
int j = sc.nextInt();
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 26d4422e37454ef0883954fb31f57fd3 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class MyClass {
public static void main(String args[]) {
HashSet<Integer> hs = new HashSet<>();
for(int i=1;i<10001;i++)
{
hs.add(i*i);
}
Scanner sc = new Scanner(System.in);
int test = sc.nextInt();
while(test-- != 0)
{
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 43e558ca89e7b91c610551e259b5dafe | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class MyClass {
public static void main(String args[]) {
HashSet<Integer> hs = new HashSet<>();
for(int i=1;i<10001;i++)
{
hs.add(i*i);
}
Scanner sc = new Scanner(System.in);
int test = sc.nextInt();
while(test-- != 0)
{
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | c5b8a75b2840853da4e2b13c7daeda4c | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 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();
boolean f=false;
int a[]=new int[n];
for(int i=0;i<n;i++)
{
a[i]=sc.nextInt();
int p=(int)Math.sqrt(a[i]);
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 4e318ad6a329d655153999e2113eadd6 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.io.*;
import java.util.*;
import java.text.DecimalFormat;
public class Main {
static class FastReader {
BufferedReader br;
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | c3c1a308235cc4accf2312b1a69eaf44 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
try {
int n = Integer.valueOf(read.readLine());
for (i... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 6f3602b2b2b9ae94b77372008999680c | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scn = new Scanner(System.in);
int X = scn.nextInt();
for(int i=1;i<=X;i++) {
int Y = scn.nextInt();
int [] arr = new int[Y];
for(int j =0;j<Y;j... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 2cbf5e0c46049cfd3a36d3202815ca9e | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class Prob1{
public static void main(String args[]){
Scanner s = new Scanner(System.in);
int t = s.nextInt();
while(t-- > 0){
int n = s.nextInt();
int arr[] = new int[n];
for(int i=0;i<n;i++) arr[i] = s.nextInt();
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 54349201d205a8c028c1f64c36dc0ea8 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class CodeForces {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | f0c93cfc829d43bf168a557fa20f26ae | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(br.readLine());... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 1ece47bec4847865c43b95f2c139f226 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.lang.*;
import java.math.*;
import java.io.*;
import java.util.*;
public class Practice{
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(
new InputStre... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | e22b6195b54f8b97464f4b40f89f0069 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.StringTokenizer;
public class Qus1 {
static HashMap<Integer, Integer> hashMap;
public static void main(String[] args) {
handmadeInput.FastReader in = new ... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | d3685fd29607e0d10243ca2b2b5e8fd0 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.*;
import java.util.*;
public class CodeF1
{
// .....................................input stuff started....................................
private static StringTokenizer st;
public static void nextLine(BufferedReader br) throws IOException
{
st = new StringTokeniz... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | f532b0b787684c6c2662fa873d229585 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.util.*;
import java.math.*;
//import java.io.*;
public class Experiment {
static Scanner in=new Scanner(System.in);
// static BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
public static void sort(int ar[],int l,int r) {
if(l<r) {
int m=... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 1a55c0b496b72a66280e74263f8e9dbe | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.util.*;
import java.lang.*;
import java.io.*;
public class CP
{
static boolean isSqr(int n){
double sqrt=Math.sqrt(n);
//finds the floor value of the square root and comparing it with zero
return ((sqrt - Math.floor(sqrt)) == 0);
}
public static void mai... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 8d00a5601cb5d90590e3a654de788b8e | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.io.*;
import java.util.*;
public class Codeforces1 {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader(){
br = new BufferedReader(new InputStreamReader(System.in));
}
String next(){
while(s... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 3d228f58b1ecfce912a04240a6cf3928 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.* ;
import java.util.* ;
public class App {
public static void main (String[] args) throws java.lang.Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
//reader = new BufferedReader(new FileReader(new File("C:\\Users\\Anjali\\Desktop\\projects\\Hel... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | e6ddc02b5768cf061dfbe781dbc521bc | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.lang.*;
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 a = 0;
for(int i =0;i<n;++i)
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | c0362ecf80011abeeb31c7c77a24d50d | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.lang.Math;
import java.util.*;
public class A {
public static void main(String[] args){
Scanner s = new Scanner(System.in);
int a = s.nextInt();
for(int i = 0;i < a; i++){
int b = s.nextInt();
boolean check = false;
for(int j = 0; j ... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 0bd23edc44ba3b6028aeb77e767ce78e | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
{
public static String check(int a[],int n)
{
for(int i=0;i<n;i++)
{
long k=(int)Math.sqrt(a[i]);
if(k*k!=a[i])
return "YES";
}
return "NO";
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | adb03afc22607fe77dced82cc3c77a4f | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class PerfectlyImperfectArray {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
while (t-- > 0) {
int n = s.nextInt();
int[] a = new int [n];
for (in... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | f7b650d194e1030335d351303698ef90 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
/**
*
* @author Acer
*/
public class PerfectlyImperfectArray {
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... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | f47414f366f3293fc136b5896e5b8e3f | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
for(int i=0;i<n;i++){
int size= sc.nextInt();
int[] arr = new int[size];
for(int j=0;j<arr.length;j++){
arr[j] = sc.nextInt();
}
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 7fbf8f5b05ba27a075bf2ed860716f6a | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.io.*;
public class Codeforces {
final static long mod = 1000000007;
public static void main(String[] args) {
FastReader sc = new FastReader();
int t = sc.nextInt();
while(t-->0){
int n=sc.nextInt();
int a[]= new int[n];... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 2fd891f7494d1a485111e235d11cdf50 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class CF_1517A {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int testCase = scan.nextInt();
while (testCase != 0) {
int arrayLimit = scan.nextInt();
boolean result = false;
int[] arrayNumbers = new int[arrayLimit];
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 48c7992dcca18fc3712af84fb95f5401 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | /*Author Adityaraj*/
import java.awt.Color;
import java.io.*;
import java.math.BigInteger;
import java.security.spec.ECPublicKeySpec;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Sc... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | b81793d7f9f826fcacdb7d059ec6bdf3 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.util.*;
import java.io.*;
public class kickStart {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null |... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 7714374abf111f054b8ac2b5a029affe | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.math.*;
import java.lang.*;
public class blipblop {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t=sc.nextInt();
while(t-->0) {
int n=sc.nextInt();
long a[] = new long[n];
for(int i=0 ; i<n ; i++) {
a[i]=sc.nextLong()... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 7252a766a2978ddda29df9660c69e137 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.util.Scanner;
import java.lang.*;
import java.lang.*;
public class Main {
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();
boolean f=fa... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | c52afa52561c96a186fc9cd2a92a6178 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner scn=new Scanner(System.in);
int t=scn.nextInt();
while(t-->0){
int n=scn.nextInt();
int []arr=new int[n];
for(int i=0;i<n;i++){
arr[i]=scn.next... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | b022a8cd8ea570430d2e75e1adb40b79 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class fact {
public static boolean checkPerfectSquare(double number)
{
double sqrt=Math.sqrt(number);
return ((sqrt - Math.floor(sqrt)) == 0);
}
public static... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 3f166abc9acfad4959dcf14ad77a8903 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.Scanner;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelpe... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 26d43899ca5fdc1f2d04775114875558 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.InputMismatchException;
import java.util.*;
import java.io.*;
import java.lang.*;
public class Main{
public static class InputReader {
private InputStream strea... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 8f5fd0af2b39f4cc1181ee65f5262714 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.*;
public class Codeforces {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
int t = Integer.parseIn... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 4cc4398fcbf4472433c9f12f561d69ff | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.util.Scanner;
public class Main
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
boolean f=false;
int n=sc.nextInt();
int arr[]=new int[n];
for(int i=0;i<n;i++)
{
arr[i]=... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 32fe92e3b3556120d22e50d0591297ad | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.*;
import java.util.Scanner;
import java.util.*;
import java.lang.*;
import java.io.IOException;
public class Code
{
////
public static void main(String[] args) throws IOException
{
try
{
System.setIn(new FileInputStream("input.txt"));
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | d0236be89560733c0db504cd4780c621 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
long t = scn.nextLong();
for (int j = 1; j <= t; j++) {
int n = scn.nextInt();
long[] arr = new long[n];
for (int i = 0... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 0cd2a96b12054fa23fe709409742e873 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.math.BigInteger;
import java.util.Scanner;
public class p1
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
int y=Integer.MIN_VALUE;
int n=sc.nextInt();
int a[]=new int[n];
for(int i=0;i<n;i++){
a[i]=sc.n... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | f17f58d16518c648e1c494bf6a057a9d | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;
public class B {
public static void main(String[] args) {
FastScanner fs=new FastScanner();
int T=fs.nextInt();
whil... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 019d2c952a12c14569581569e2ae03f9 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class MyClass {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
int n=sc.nextInt();
int a[]=new int[n];
String s="NO";
for(int i=0;i<n;i++)
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 10c0fdf0f86133310e202aa873c8f396 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public final class Main {
public static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader(){
br=new BufferedReader(new InputStreamReader(System.... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 99630dee8853e70ee564915942192e01 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner scn=new Scanner(System.in... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 2afc0b6410891c1aea9380cfd201390e | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | // Working program using Reader Class
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Q1 {
static class Reader {
final private int BUFFER_SIZE = 1 << 16;
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 7fefd3cbc3e6d945e28f48392c9f8701 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.util.LinkedList;
import java.io.*;
import java.math.*;
public class Main
{
static class Pair{
int key;
int value;
Pair(int key,int value)
{
this.key=key;
this.value=value;
}
int getKey(){
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | c74d4dec4223e2663ab1f6c070251ec8 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
import java.util.Arrays;
import java.util.HashMap;
//import java.util.HashMap;
//import java.util.Arrays;
//import java.util.Stack;
import java.lang.Math;
public class solution {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | aa482b697ef060585c33cb402ad45b56 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class a{
static Scanner sc = new Scanner(System.in);
public static void solve(){
int len = sc.nextInt();
boolean pr = false;
long [] tab = new long[len];
for(int i=0;i<len;i++){
tab[i] = sc.nextLong();
}
for(int i=0;i<len;i++){
long l = (long)Math.sqrt(tab[i]);
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 024519ba5fe61dd85cc79578992c6c4b | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class Perfectly_Imperfect_Array {
static boolean isPerfectSquare(int num)
{
long left = 1, right = num;
while (left <= right)
{
long mid = (left + right) / 2;
if (mid * mid == num)
{
return... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 97e9e3c891a6261d74959ed3991faf72 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.*;
import java.util.*;
public class Hackerrank {
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();
boolean temp = false;
int[] arr = new int[n];
for(int j=0;j<n;j++) {
arr[j] =sc... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | d6058baccb689479520fa08bdb6e273d | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner o=new Scanner(System.in);
int t=o.nextInt();
while(t>0) {
int n=o.nextInt();
int ar[]=new int[n];
for(int i=0;i<n;i++) {
ar[i]=o.nextInt();
}
boolean ps=true;
for(int i=0;i<n;i++) {
int v=... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | f2c3a9dd6e46e39797f939e4cd4759c7 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.Scanner;
public class CF2308 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int testCases = scan.nextInt();
while(testCases>0){
int arrayLength = scan.nextInt();
int[] array = new int[arrayLength];
for(int i=0; i<arrayLength; i++){
array[i... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 5c771a25d040bcc49aa4ab001fb1b2d7 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class MyClass {
public static void main(String args[])
{
Scanner kb = new Scanner(System.in);
int t = kb.nextInt();
while(t-- > 0)
{
int n = kb.nextInt();
int [] arr = new int[n];
for(int i=0;i<n;i++)
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | a005cd973ec047252f819348776871f8 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 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, a[];
boolean k;
while(t -- > 0){
k = false;
n = sc.nextInt();
a = new int[n];
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | fdc26e53bb946ea176cfa1bc01dcb570 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.io.*;
public class Practice {
static boolean multipleTC = true;
final static int mod = 1000000007;
final static int mod2 = 998244353;
final double E = 2.7182818284590452354;
final double PI = 3.14159265358979323846;
int MAX = 41000;
int N = 40000;
int dp[];
void pre() throws... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | bb126c456d5422bb6c771b8006e6dfe1 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 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.StringTokenizer;
/**
*
* @author eslam
*/
public class IceCave {
static class FastReader {
BufferedReader br;
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 758bfbcb55b95d564866f3e1bd96002b | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i=0;i<n;i++){
int a = sc.nextInt();
int arr[] = new int[a];
int cnt=0;
for(int j=0;j<a;j++){
ar... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 11 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | ef0d9d2fb8e0d1eeb0629e1f5394b4af | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes |
import java.util.*;
public class Main {
public static boolean perfect(int x)
{
int i = 0;
while(i * i < x) {
++i;
}
if(i * i == x) {
return true;
} else {
return false;
}
}
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 8 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | ff5fec316666b2c427b32058c9881cd4 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.*;
import java.math.*;
import java.util.*;
public class D {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new
InputStreamReader(System.in));
}
String ne... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 8 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 9d21d972e5067e240a1ec54a34231b33 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class A {
//a
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int test = fs.nextInt();
test: for (in... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 8 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 71d87332a003e9f968258701ac3a4628 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class A {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int test = fs.nextInt();
test: for (int t... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 8 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 5c9461978ec73829dc588ad19c3b5475 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 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.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deq... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 8 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 0181875281c3288010dce53ada1f2039 | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 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.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deq... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 8 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | 96789c3c96a367558ba4a364bbab227f | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.math.BigInteger;
public class perfectly_imperfectly_square {
public static void main(String[] args) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
try
... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 8 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output | |
PASSED | c5a93f4e18b189575ce5741a6dbd69ce | train_110.jsonl | 1618839300 | Given an array $$$a$$$ of length $$$n$$$, tell us whether it has a non-empty subsequence such that the product of its elements is not a perfect square.A sequence $$$b$$$ is a subsequence of an array $$$a$$$ if $$$b$$$ can be obtained from $$$a$$$ by deleting some (possibly zero) elements. | 256 megabytes | import java.util.*;
public class Q1 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
while(t--!=0) {
int n = s.nextInt();
int flag=0;
while(n--!=0) {
int c = s.nextInt();
int ans = (int)(Math.sqrt(c));
if(ans*ans!=c) ... | Java | ["2\n3\n1 5 4\n2\n100 10000"] | 1 second | ["YES\nNO"] | NoteIn the first example, the product of the whole array ($$$20$$$) isn't a perfect square.In the second example, all subsequences have a perfect square product. | Java 8 | standard input | [
"math",
"number theory"
] | 33a31edb75c9b0cf3a49ba97ad677632 | The first line contains an integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows. The first line of each test case contains an integer $$$n$$$ ($$$1 \le n \le 100$$$) — the length of the array $$$a$$$. The second line of each test case contains $$$n$$$ integers $$... | 800 | If there's a subsequence of $$$a$$$ whose product isn't a perfect square, print "YES". Otherwise, print "NO". | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.