submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s931913164 | p00003 | Java | public class triangle.java {
public static void main(String[] args) {
int a = new java.util.Scanner(System.in).nextInt();
int b = new java.util.Scanner(System.in).nextInt();
int c = new java.util.Scanner(System.in).nextInt();
if (a * a == b * b + c * c )
{ System.out.println("YES");
} else {
System.out.println("NO");
}
}
} | Main.java:1: error: '{' expected
public class triangle.java {
^
1 error
|
s365129057 | p00003 | Java | public class Main {
public static void main(String[] args) {
for ( int i = 0; i < n; i++){
int a = new java.util.Scanner(System.in).nextInt();
int b = new java.util.Scanner(System.in).nextInt();
int c = new java.util.Scanner(System.in).nextInt();
if (a * a == b * b + c * c || b * b == a * a + c * c || c * c == b * b + a * a )
{ System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
} | Main.java:4: error: cannot find symbol
for ( int i = 0; i < n; i++){
^
symbol: variable n
location: class Main
1 error
|
s131946186 | p00003 | Java | 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 = new java.util.Scanner(System.in).nextInt();
int b = new java.util.Scanner(System.in).nextInt();
int c = new java.util.Scanner(System.in).nextInt();
if (a * a == b * b + c * c || b * b == a * a + c * c || c * c == b * b + a * a )
{ System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
} | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s470154514 | p00003 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("????????????????§???¢????????????????????\??????????????????");
int times = scan.nextInt();
int[][] delta = new int[times][3];
for (int i = 0; i < times; i++) {
System.out.println("????§???¢????????????????????\?????????????????????");
int edge1 = scan.nextInt();
int edge2 = scan.nextInt();
int edge3 = scan.nextInt();
delta[i][0] = edge1;
delta[i][1] = edge2;
delta[i][2] = edge3;
}
for (int i = 0; i < times; i++) {
if ((delta[i][0]) * (delta[i][0]) == (delta[i][1]) * (delta[i][1]) + (delta[i][2]) * (delta[i][2])
|| (delta[i][1]) * (delta[i][1]) == (delta[i][0]) * (delta[i][0]) + (delta[i][2]) * (delta[i][2])
|| (delta[i][2]) * (delta[i][2]) == (delta[i][0]) * (delta[i][0]) + (delta[i][1]) * (delta[i][1])) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
scan.close();
}
} | Main.java:9: error: illegal escape character
System.out.println("?????????????????????????????????????????\??????????????????");
^
Main.java:16: error: illegal escape character
System.out.println("?????????????????????????????\?????????????????????");
^
2 errors
|
s950097610 | p00003 | Java | class Main{
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
for(int i = 0;i<num;i++){
int[] array = new int[3];
for (int j = 0; j < 3; j++) {
array[i] = sc.nextInt();
}
Arrays.sort(array);
if (array[2] * array[2] == array[1] * array[1] + array[0] * array[0]) {
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
} | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:16: error: cannot find symbol
Arrays.sort(array);
^
symbol: variable Arrays
location: class Main
3 errors
|
s979834054 | p00003 | Java | package jp.ac.can;
import java.util.*;
public class Triangle {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
int A,B,C;
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
for(int i = 0;i<num;i++){
int[] array = new int[3];
for (int j = 0; j<3; j++){
array[j] = sc.nextInt();
}
A = array[0] * array[0];
B = array[1] * array[1];
C = array[2] * array[2];
if(A == B + C){
System.out.println("YES");
}else if(B == A + C){
System.out.println("YES");
}else if(C == A + B){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
} | Main.java:4: error: class Triangle is public, should be declared in a file named Triangle.java
public class Triangle {
^
1 error
|
s343590807 | p00003 | Java | package jp.ac.can;
import java.util.*;
public class 0003{
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
int A,B,C;
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
for(int i = 0;i<num;i++){
int[] array = new int[3];
for (int j = 0; j<3; j++){
array[j] = sc.nextInt();
}
A = array[0] * array[0];
B = array[1] * array[1];
C = array[2] * array[2];
if(A == B + C){
System.out.println("YES");
}else if(B == A + C){
System.out.println("YES");
}else if(C == A + B){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
} | Main.java:4: error: <identifier> expected
public class 0003{
^
1 error
|
s078205397 | p00003 | Java | public class Main{
public static void main(String args[]){
Scanner scanner = new Scanner(System.in);
int dataSet = scanner.nextInt();
for(int i=0; i<dataSet; i++){
int ab = (int)(Math.pow(scanner.nextInt(),2));
int bc = (int)(Math.pow(scanner.nextInt(),2));
int ac = (int)(Math.pow(scanner.nextInt(),2));
if(ab==bc+ac){
System.out.println("YES");
}else if(bc==ab+ac){
System.out.println("YES");
}else if(ac==ab+bc){
System.out.println("YES");
}
System.out.println("NO");
}
scanner.close();
}
} | Main.java:3: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s171190578 | p00003 | Java | import java.util.Scanner;
import java.util.Arrays;
class Main{
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
int N=sc.nextInt();
int[] t=new int[N][3];
for(int i=0; i<N; i++){
for(int j=0; j<3; j++){
t[i][j]=sc.nextInt();
}
}
sort(t);
for(int i=0; i<N; i++){
if(t[i][2]*t[i][2]==(t[i][1]*t[i][1]+t[i][0]*t[i][0])){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
public static void sort(int[][] t){
int [] s=new int[3];
for(int i=0; i<t.length; i++){
for(int j=0; j<3; j++){
s[j]=t[i][j];
}
Arrays.sort(s);
for(int k=0; k<3; k++){
t[i][k]=s[k];
}
}
}
} | Main.java:6: error: cannot find symbol
int N=sc.nextInt();
^
symbol: variable sc
location: class Main
Main.java:7: error: incompatible types: int[][] cannot be converted to int[]
int[] t=new int[N][3];
^
Main.java:10: error: array required, but int found
t[i][j]=sc.nextInt();
^
Main.java:10: error: cannot find symbol
t[i][j]=sc.nextInt();
^
symbol: variable sc
location: class Main
Main.java:13: error: incompatible types: int[] cannot be converted to int[][]
sort(t);
^
Main.java:16: error: array required, but int found
if(t[i][2]*t[i][2]==(t[i][1]*t[i][1]+t[i][0]*t[i][0])){
^
Main.java:16: error: array required, but int found
if(t[i][2]*t[i][2]==(t[i][1]*t[i][1]+t[i][0]*t[i][0])){
^
Main.java:16: error: array required, but int found
if(t[i][2]*t[i][2]==(t[i][1]*t[i][1]+t[i][0]*t[i][0])){
^
Main.java:16: error: array required, but int found
if(t[i][2]*t[i][2]==(t[i][1]*t[i][1]+t[i][0]*t[i][0])){
^
Main.java:16: error: array required, but int found
if(t[i][2]*t[i][2]==(t[i][1]*t[i][1]+t[i][0]*t[i][0])){
^
Main.java:16: error: array required, but int found
if(t[i][2]*t[i][2]==(t[i][1]*t[i][1]+t[i][0]*t[i][0])){
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
11 errors
|
s919337414 | p00003 | Java | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner in=new Scanner(System.in);
int a[3]=new int[3],t,n;
n=in.nextInt();
while(n--){
a[0]=in.nextInt();a[1]=in.nextInt();a[2]=in.nextInt();
for(int i=0;i<2;i++){
if(a[i]<a[i+1]){t=a[i];a[i]=a[i+1];a[i+1]=t;}
}
if(a[0]<a[1]){t=a[0];a[0]=a[1];a[1]=t;}
if(a[0]*a[0]==a[1]*a[1]+a[2]*a[2])System.out.println("YES");
else System.out.println("NO");
}
}
} | Main.java:5: error: ']' expected
int a[3]=new int[3],t,n;
^
Main.java:5: error: not a statement
int a[3]=new int[3],t,n;
^
Main.java:5: error: ';' expected
int a[3]=new int[3],t,n;
^
Main.java:5: error: not a statement
int a[3]=new int[3],t,n;
^
Main.java:5: error: ';' expected
int a[3]=new int[3],t,n;
^
Main.java:5: error: not a statement
int a[3]=new int[3],t,n;
^
6 errors
|
s215012850 | p00003 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String[] args) throws IOException{
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(buf.readLine());
for (int i = 0; i < N; i++) {
String str = buf.readLine();
String[] tmp = str.split(" ");
int array[] = new int[3];
for (i = 0; i < 3; i++) {
array[i] = Integer.parseInt(tmp[i]);
}
int a, b, c;
a = array[0] * array[0];
b = array[1] * array[1];
c = array[2] * arary[2];
if ((a == b + c) || (b == a + c) || (c == a + b)) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
} | Main.java:19: error: cannot find symbol
c = array[2] * arary[2];
^
symbol: variable arary
location: class Main
1 error
|
s698452965 | p00003 | Java | mport java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static int num;
static int edge[][] = new int[3][100];
//mainÖ
public static void main(String[] args) {
read();
solve();
}
//readÖ
static boolean read(){
if(sc.hasNextInt()){
num = sc.nextInt();
}
for(int i=0; i<num; i++){
for(int j=0; j<3; j++){
if(sc.hasNextInt() == true){
edge[j][i] = sc.nextInt();
}
}
}
return true;
}
//solveÖ
static void solve(){
for(int i=0; i<num; i++){
if(Math.pow(edge[0][i], 2) + Math.pow(edge[1][i], 2) == Math.pow(edge[2][i], 2)){
System.out.println("YES");
continue;
} else if(Math.pow(edge[1][i], 2) + Math.pow(edge[2][i], 2) == Math.pow(edge[0][i], 2)){
System.out.println("YES");
continue;
} else if(Math.pow(edge[2][i], 2) + Math.pow(edge[0][i], 2) == Math.pow(edge[1][i], 2)){
System.out.println("YES");
continue;
} else{
System.out.println("NO");
}
}
}
} | Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
|
s606924349 | p00003 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a, b, c;
boolean flg;
for(int i = 0; i < n; i++){
if(a >= b && a >= c){
flg = pita(a, b, c);
}else if(b >= a && b >= c){
flg = pita( b, a, c);
}else{
flg = pita( c, a, b);
}
if(flg){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
public static boolean pita(int a, int b, int c){
if( a * a == b * b + c * c){
return true;
}
return false;
}
} | Main.java:10: error: variable a might not have been initialized
if(a >= b && a >= c){
^
Main.java:10: error: variable b might not have been initialized
if(a >= b && a >= c){
^
Main.java:10: error: variable c might not have been initialized
if(a >= b && a >= c){
^
Main.java:12: error: variable c might not have been initialized
}else if(b >= a && b >= c){
^
Main.java:15: error: variable c might not have been initialized
flg = pita( c, a, b);
^
5 errors
|
s955992720 | p00003 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
//public class Problem0003_IsItaRightTriangle {
public class Main {
public static void main(String[] args) {
try {
Problem0003_IsItaRightTriangle test = new Problem0003_IsItaRightTriangle();
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int number = Integer.parseInt(reader.readLine());
int[] sides = new int[3]; //ÓÍ"side"çµ¢
for(int i = 0; i < number; i++) { //±±©ç{Ô
String[] textArray = reader.readLine().split(" ");
for(int j = 0; j < 3; j++) {
sides[j] = Integer.parseInt(textArray[j]);
}
test.showAnswer(test.getMax(sides));
}
} catch(Exception e) {
e.printStackTrace();
}
}
Problem0003_IsItaRightTriangle() {
}
int[] getMax(int[] array) {
int[] targetArray = array;
int max = targetArray[0]; //}CiXÌêÍ0ðãü³êéÆss
int maxPosition = 0; //0ªúlÈÌ;ç©
for(int i = 1; i < targetArray.length; i++) {
if(max < targetArray[i]) {
max = targetArray[i];
maxPosition = i;
}
}
int temporary = targetArray[0];
targetArray[0] = max;
targetArray[maxPosition] = temporary;
return targetArray;
}
//ÅålªêÔOÉ ézñÉεÄA¼pOp`©Ç¤©¦ðo·B
void showAnswer(int[] array) {
if(array.length != 3) {
throw new IllegalArgumentException(); //O̽ß
}
if(array[0] * array[0] == array[1] * array[1] + array[2] * array[2]) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
} | Main.java:26: error: invalid method declaration; return type required
Problem0003_IsItaRightTriangle() {
^
1 error
|
s849273457 | p00003 | Java | import java.util.Scanner;
import java.util.Array;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int N = cin.nextInt();
for(int i=1, i<=N, i++){
int[] len = new int[3];
for(int j=0; j<3; j++){ len[j] = cin.textInt();}
Array.sort(len);
if(len[0]*len[0] + len[1]*len[1} == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
}
} | Main.java:10: error: ';' expected
for(int i=1, i<=N, i++){
^
Main.java:10: error: ';' expected
for(int i=1, i<=N, i++){
^
Main.java:14: error: ']' expected
if(len[0]*len[0] + len[1]*len[1} == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
^
Main.java:14: error: illegal start of expression
if(len[0]*len[0] + len[1]*len[1} == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
^
Main.java:14: error: ';' expected
if(len[0]*len[0] + len[1]*len[1} == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
^
Main.java:14: error: 'else' without 'if'
if(len[0]*len[0] + len[1]*len[1} == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
^
6 errors
|
s191626940 | p00003 | Java | import java.util.Scanner;
import java.util.Array;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int N = cin.nextInt();
for(int i=1; i<=N; i++){
int[] len = new int[3];
for(int j=0; j<3; j++){ len[j] = cin.textInt();}
Array.sort(len);
if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
}
} | Main.java:16: error: reached end of file while parsing
}
^
1 error
|
s041731714 | p00003 | Java | import java.util.Scanner;
import java.util.Array;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int N = cin.nextInt();
for(int i=1; i<=N; i++){
int[] len = new int[3];
for(int j=0; j<3; j++){ len[j] = cin.textInt();}
Array.sort(len);
if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
}
}
} | Main.java:2: error: cannot find symbol
import java.util.Array;
^
symbol: class Array
location: package java.util
Main.java:12: error: cannot find symbol
for(int j=0; j<3; j++){ len[j] = cin.textInt();}
^
symbol: method textInt()
location: variable cin of type Scanner
Main.java:13: error: cannot find symbol
Array.sort(len);
^
symbol: variable Array
location: class Main
3 errors
|
s407976281 | p00003 | Java | import java.util.Scanner;
import java.util.Arrays;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int N = cin.nextInt();
for(int i=1; i<=N; i++){
int[] len = new int[3];
for(int j=0; j<3; j++){ len[j] = cin.textInt();}
Arrays.sort(len);
if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]){System.out.println("YES");} else{System.out.println("NO");}
}
}
} | Main.java:12: error: cannot find symbol
for(int j=0; j<3; j++){ len[j] = cin.textInt();}
^
symbol: method textInt()
location: variable cin of type Scanner
1 error
|
s203307097 | p00003 | Java | import java.util.*;
public class Main{
public static void main(String[] args) {
new Main.run();
}
public void run() {
Scanner sc = new Scanner(System.in);
int n;
n = sc.nextInt();
while(n-->0){
int x,y,z;
x = sc.nextInt();
y = sc.nextInt();
z = sc.nextInt();
int a,b,c;
a = Math.min(x,Math.min(y,z));
c = Math.max(x,Math.max(y,z));
b = x+y+z-a-c;
System.out.println(a*a+b*b==c*c?"YES":"NO");
}
}
} | Main.java:5: error: cannot find symbol
new Main.run();
^
symbol: class run
location: class Main
1 error
|
s382220392 | p00003 | Java | import java.util.*;
public class Main{
public static void main(String[] args) {
new Main.run();
}
public void run() {
Scanner sc = new Scanner(System.in);
int n;
n = sc.nextInt();
while(n-->0){
int x,y,z;
x = sc.nextInt();
y = sc.nextInt();
z = sc.nextInt();
int a,b,c;
a = Math.min(x,Math.min(y,z));
c = Math.max(x,Math.max(y,z));
b = x+y+z-a-c;
System.out.println(a*a+b*b==c*c?"YES":"NO");
}
}
} | Main.java:5: error: cannot find symbol
new Main.run();
^
symbol: class run
location: class Main
1 error
|
s112986310 | p00003 | Java | import java.io.*;
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
//int n;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int i;
for(i = 1;i <= n; i++){
int x = sc.nextInt();
int y = sc.nextInt();
int z = sc.nextInt();
if(x*x+y*y==z*z)
System.out.println("YES");
else
System.out.println("NO");
}
}
} | Main.java:3: error: class Test is public, should be declared in a file named Test.java
public class Test {
^
1 error
|
s884633202 | p00003 | Java | package test;
import java.io.*;
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
//int n;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int i;
for(i = 1;i <= n; i++){
int x = sc.nextInt();
int y = sc.nextInt();
int z = sc.nextInt();
if(x*x+y*y==z*z)
System.out.println("YES");
else
System.out.println("NO");
}
}
} | Main.java:5: error: class Test is public, should be declared in a file named Test.java
public class Test {
^
1 error
|
s323173445 | p00003 | Java | package Volume0;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
public class P0003 {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s;
int n;
try {
s = br.readLine();
n = Integer.parseInt(s);
int[][] tri = new int[n][3];
int i, j;
i = j = 0;
while (null != (s = br.readLine())) {
Scanner sc = new Scanner(s);
j = 0;
while (sc.hasNext()) {
tri[i][j] = sc.nextInt();
j++;
}
Arrays.sort(tri[i]);
i++;
}
//
for (i = 0; i < n; i++) {
int a, b, c;
a = tri[i][0];
b = tri[i][1];
c = tri[i][2];
if (c * c == a * a + b * b) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
} | Main.java:9: error: class P0003 is public, should be declared in a file named P0003.java
public class P0003 {
^
1 error
|
s940316782 | p00003 | Java | public static void main(String[] args) {
int min=Integer.MAX_VALUE,max=Integer.MIN_VALUE,mid=0;
int n=0;
try {
Scanner scan=new Scanner(System.in);
n=scan.nextInt();
for (int i = 0; i < n; i++) {
int temp=scan.nextInt();
min=max=mid=temp*temp;
for (int j = 0; j < 2; j++) {
temp=scan.nextInt();
if(temp*temp<min){
min=temp*temp;
}
else if(temp*temp>max){
mid=max;
max=temp*temp;
}
else{
mid=temp*temp;
}
}
if(min+mid==max){
System.out.println("YES");
}
else
System.out.println("NO");
}
}
catch(Exception exp){
}
} | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s706658763 | p00003 | Java | class ACM1 {
public static void main(String[] args) {
int min=Integer.MAX_VALUE,max=Integer.MIN_VALUE,mid=0;
int n=0;
try {
Scanner scan=new Scanner(System.in);
n=scan.nextInt();
for (int i = 0; i < n; i++) {
int temp=scan.nextInt();
min=max=mid=temp*temp;
for (int j = 0; j < 2; j++) {
temp=scan.nextInt();
if(temp*temp<min){
min=temp*temp;
}
else if(temp*temp>max){
mid=max;
max=temp*temp;
}
else{
mid=temp*temp;
}
}
if(min+mid==max){
System.out.println("YES");
}
else
System.out.println("NO");
}
}
catch(Exception exp){
}
}
} | Main.java:6: error: cannot find symbol
Scanner scan=new Scanner(System.in);
^
symbol: class Scanner
location: class ACM1
Main.java:6: error: cannot find symbol
Scanner scan=new Scanner(System.in);
^
symbol: class Scanner
location: class ACM1
2 errors
|
s398460116 | p00003 | Java | public class Main {
public static void main(String[] args) {
int min=Integer.MAX_VALUE,max=Integer.MIN_VALUE,mid=0;
int n=0;
Scanner scan=new Scanner(System.in);
n=scan.nextInt();
for (int i = 0; i < n; i++) {
int temp=scan.nextInt();
min=max=mid=temp*temp;
for (int j = 0; j < 2; j++) {
temp=scan.nextInt();
if(temp*temp<min){
min=temp*temp;
}
else if(temp*temp>max){
mid=max;
max=temp*temp;
}
else{
mid=temp*temp;
}
}
if(min+mid==max){
System.out.println("YES");
}
else
System.out.println("NO");
}
}
} | Main.java:5: error: cannot find symbol
Scanner scan=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner scan=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s205104072 | p00003 | Java |
import java.util.Scanner;
public class RightTriangle {
/**
* @param args
*/
public static void main(String[] args) throws java.lang.Exception{
// TODO 自動生成されたメソッド・スタブ
Scanner in = new Scanner(System.in);
int checkNum = in.nextInt();
for(int i = 0; i < checkNum; i++) {
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
int tmp = (a + b + c) / 2;
double space = Math.sqrt(tmp * (tmp - a) * (tmp - b) * (tmp - c));
double angleA = 0.0;
double angleB = 0.0;
double angleC = 0.0;
double high = 0.0;
if ( b < a && c < a) {
high = (2 * space) / (double)a;
angleB = Math.toDegrees(Math.asin(high / c));
angleC = Math.toDegrees(Math.asin(high / b));
angleA = 180.0 - angleB - angleC;
} else if (a < b && c < b) {
high = (2 * space) / (double)b;
angleC = Math.toDegrees(Math.asin(high / a));
angleA = Math.toDegrees(Math.asin(high / c));
angleB = 180.0 - angleA - angleC;
} else if (a < c && b < c) {
high = (2 * space) / (double)c;
angleA = Math.toDegrees(Math.asin(high / b));
angleB = Math.toDegrees(Math.asin(high / a));
angleC = 180.0 - angleA - angleB;
} else {
// ありえない
}
if (((int)angleA) == 90 || ((int)angleB) == 90 || ((int)angleC) == 90) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
} | Main.java:4: error: class RightTriangle is public, should be declared in a file named RightTriangle.java
public class RightTriangle {
^
1 error
|
s277721596 | p00003 | Java | #include <deque>
#include <iostream>
#include <algorithm>
int main()
{
using namespace std;
deque<int> edge;
int iedge[3];
int j;
int a,b,c;
cin >> j;
for(int l=0;l<j;l++){
for(int i=0;i<3;i++){
cin >> iedge[i];
edge.push_back(iedge[i]);
}
sort(edge.begin(),edge.end());
a = edge[0];
b = edge[1];
c = edge[2];
if(c*c == (a*a+b*b))cout << "YES\n";
else cout << "NO\n";
edge.clear();
}
return 0;
} | Main.java:1: error: illegal character: '#'
#include <deque>
^
Main.java:2: error: illegal character: '#'
#include <iostream>
^
Main.java:3: error: illegal character: '#'
#include <algorithm>
^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
deque<int> edge;
^
(use --enable-preview to enable unnamed classes)
Main.java:9: error: class, interface, enum, or record expected
int iedge[3];
^
Main.java:11: error: class, interface, enum, or record expected
int a,b,c;
^
Main.java:13: error: class, interface, enum, or record expected
cin >> j;
^
Main.java:15: error: class, interface, enum, or record expected
for(int l=0;l<j;l++){
^
Main.java:15: error: class, interface, enum, or record expected
for(int l=0;l<j;l++){
^
Main.java:15: error: class, interface, enum, or record expected
for(int l=0;l<j;l++){
^
Main.java:16: error: class, interface, enum, or record expected
for(int i=0;i<3;i++){
^
Main.java:16: error: class, interface, enum, or record expected
for(int i=0;i<3;i++){
^
Main.java:18: error: class, interface, enum, or record expected
edge.push_back(iedge[i]);
^
Main.java:19: error: class, interface, enum, or record expected
}
^
Main.java:22: error: class, interface, enum, or record expected
a = edge[0];
^
Main.java:23: error: class, interface, enum, or record expected
b = edge[1];
^
Main.java:24: error: class, interface, enum, or record expected
c = edge[2];
^
Main.java:25: error: class, interface, enum, or record expected
if(c*c == (a*a+b*b))cout << "YES\n";
^
Main.java:26: error: class, interface, enum, or record expected
else cout << "NO\n";
^
Main.java:28: error: class, interface, enum, or record expected
edge.clear();
^
Main.java:29: error: class, interface, enum, or record expected
}
^
Main.java:32: error: class, interface, enum, or record expected
}
^
22 errors
|
s173838447 | p00003 | Java | import java.util.Scanner
class Main{
public static void main(String[] a) {
Scanner keyboad=new Scanner(System.in);
int i[]=new int[1000];
int j[]=new int[1000];
int l[]=new int[1000];
int kai=keyboad.nextInt();
for(int k=0;k<kai;k++){
String str1 =keyboad.nextLine();
String[] bun = str1.split(" ");
i[k]= Integer.parseInt(bun[0]);
j[k]= Integer.parseInt(bun[1]);
l[k]= Integer.parseInt(bun[2]);
}
int mob[][]=new int[kai][3];
int kau[][]=new int [kai][3];
int max[][]=new int[kai][3];
for(int b=0;b<kai;b++){
for(int a=0;a<3;a++){
if (i[b] > j[b]) {
max[b][a] = i[b];
mob[b][a] = i[b];
kau[b][a]=1;
} else {
max[b][a] = j[b];
mob[b][a] = j[b];
kau[b][a]=2;
}
if (l[b] > max[b][a]) {
max[b][a] = l[b];
mob[b][a] = l[b];
kau[b][a]=3;
}
if(kau[b][a]==1)i[b]=-1;
else if(kau[b][a]==2)j[b]=-1;
else if(kau[b][a]==3)l[b]=-1;
}
}
for(int z=0;z<kai;z++){
if(max[z][0]*max[z][0]==max[z][1]*max[z][1]+max[z][2]*max[z][2]){
System.out.println("YES");
}else System.out.println("NO");
}
}
} | Main.java:1: error: ';' expected
import java.util.Scanner
^
1 error
|
s341288265 | p00003 | Java | import java.util.Scanner;
class Main{
public static void main(String[] a) {
Scanner keyboad=new Scanner(System.in);
int i[]=new int[1000];
int j[]=new int[1000];
int l[]=new int[1000];
int kai=keyboad.nextInt();
for(int k=0;k<kai;k++){
String str1 =keyboad.nextLine();
String[] bun = str1.split(" ");
i[k]= Integer.parseInt(bun[0]);
j[k]= Integer.parseInt(bun[1]);
l[k]= Integer.parseInt(bun[2]);
}
int mob[][]=new int[kai][3];
int kau[][]=new int [kai][3];
int max[][]=new int[kai][3];
for(int b=0;b<kai;b++){
for(int a=0;a<3;a++){
if (i[b] > j[b]) {
max[b][a] = i[b];
mob[b][a] = i[b];
kau[b][a]=1;
} else {
max[b][a] = j[b];
mob[b][a] = j[b];
kau[b][a]=2;
}
if (l[b] > max[b][a]) {
max[b][a] = l[b];
mob[b][a] = l[b];
kau[b][a]=3;
}
if(kau[b][a]==1)i[b]=-1;
else if(kau[b][a]==2)j[b]=-1;
else if(kau[b][a]==3)l[b]=-1;
}
}
for(int z=0;z<kai;z++){
if(max[z][0]*max[z][0]==max[z][1]*max[z][1]+max[z][2]*max[z][2]){
System.out.println("YES");
}else System.out.println("NO");
}
}
} | Main.java:26: error: variable a is already defined in method main(String[])
for(int a=0;a<3;a++){
^
1 error
|
s008132596 | p00003 | Java | import java.util.Scanner;
import java.io.*;
class Main{
public static void main(String[] a) {
Scanner keyboad=new Scanner(System.in);
int kai=keyboad.nextInt
int i[]=new int[1000];
int j[]=new int[1000];
int l[]=new int[1000];
for(int k=0;k<kai;k++){
String str1 =keyboad.nextLine();
String[] bun = str1.split(" ");
i[k]= Integer.valueOf(bun[0]).intValue();
j[k]= Integer.valueOf(bun[1]).intValue();
l[k]= Integer.valueOf(bun[2]).intValue();
}
int mob[][]=new int[kai][3];
int kau[][]=new int [kai][3];
int max[][]=new int[kai][3];
for(int b=0;b<kai;b++){
for(int s=0;s<3;s++){
if (i[b] > j[b]) {
max[b][s] = i[b];
mob[b][s] = i[b];
kau[b][s]=1;
} else {
max[b][s] = j[b];
mob[b][s] = j[b];
kau[b][s]=2;
}
if (l[b] > max[b][s]) {
max[b][s] = l[b];
mob[b][s] = l[b];
kau[b][s]=3;
}
if(kau[b][s]==1)i[b]=-1;
else if(kau[b][s]==2)j[b]=-1;
else if(kau[b][s]==3)l[b]=-1;
}
}
for(int z=0;z<kai;z++){
if(max[z][0]*max[z][0]==max[z][1]*max[z][1]+max[z][2]*max[z][2]){
System.out.println("YES");
}else System.out.println("NO");
}
}
} | Main.java:9: error: ';' expected
int kai=keyboad.nextInt
^
1 error
|
s754267077 | p00003 | Java | public class Main {
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
doStuff(in);
}
public static void doStuff(Scanner in)
{
int n = in.nextInt();
for(int i = 0; i < n; i++)
{
int[] vals = new int[3];
vals[0] = in.nextInt();
vals[1] = in.nextInt();
vals[2] = in.nextInt();
Arrays.sort(vals);
boolean rightTri = ((vals[0] * vals[0]) + (vals[1] * vals[1])) == (vals[2] * vals[2]);
System.out.println(rightTri ? "YES" : "NO");
}
}
public static void solve()
{
}
} | Main.java:9: error: cannot find symbol
public static void doStuff(Scanner in)
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:20: error: cannot find symbol
Arrays.sort(vals);
^
symbol: variable Arrays
location: class Main
4 errors
|
s364425591 | p00003 | Java | import java.util.*;
class Main{
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
for(int i = 0; i < N; i++){
int a = scan.nextInt(), b = scan.nextInt(), c = scan.nextInt();
if(a > b){
int multi = a;
a = b;
b = multi;
}
if(b > c){
int multi = b;
b = c;
c = multi;
}
if(a * a + b * b == c * c) System.out.println("YES");
else System.out.println("NO");
}
}
} | Main.java:7: error: variable a is already defined in method main(String[])
int a = scan.nextInt(), b = scan.nextInt(), c = scan.nextInt();
^
1 error
|
s420258746 | p00003 | Java | package javatest;
import java.util.Arrays;
import java.util.Scanner;
public class CodeTest {
public static void main(String[] args) {
int n;
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
for(int i=0;i<n;i++){
int[] num = new int[3];
for(int j=0;j<3;j++){
num[j] = sc.nextInt();
}
Arrays.sort(num);
if(num[0]*num[0]+num[1]*num[1]==num[2]*num[2]){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
} | Main.java:6: error: class CodeTest is public, should be declared in a file named CodeTest.java
public class CodeTest {
^
1 error
|
s195253656 | p00003 | Java | import java.util.Scanner;
public class dua {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int testCase = scan.nextInt();
for(int i=0; i<testCase; i++) {
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
if (c*c==a*a+b*b)
{
System.out.println("YES");
}
else if (b*b==a*a+c*c)
{
System.out.println("YES");
}
else if (a*a==c*c+b*b)
{
System.out.println("YES");
}
else
{
System.out.println("NO");
}
}}}
| Main.java:2: error: class dua is public, should be declared in a file named dua.java
public class dua {
^
1 error
|
s232220502 | p00003 | Java | import java.util.Scanner;
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 b = sc.nextInt();
int c = sc.nextInt();
boolean hypotenuseA = (a * a == b * b + c * c);
boolean hypotenuseB = (b * b == a * a + c * c);
boolean hypotenuseC = (c * c == a * a + b * b);
if(A|B|C) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
} | Main.java:20: error: reached end of file while parsing
}
^
1 error
|
s671695663 | p00003 | Java | import java.util.Scanner;
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 b = sc.nextInt();
int c = sc.nextInt();
boolean hypotenuseA = (a * a == b * b + c * c);
boolean hypotenuseB = (b * b == a * a + c * c);
boolean hypotenuseC = (c * c == a * a + b * b);
if(A|B|C) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
} | Main.java:14: error: cannot find symbol
if(A|B|C) {
^
symbol: variable A
location: class Main
Main.java:14: error: cannot find symbol
if(A|B|C) {
^
symbol: variable B
location: class Main
Main.java:14: error: cannot find symbol
if(A|B|C) {
^
symbol: variable C
location: class Main
3 errors
|
s946218891 | p00003 | Java | import java.io.*;
import java.util.*;
class aoj00004{
public static void main(String[] a) throws IOException{
//String input = new String();
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String input2 = input.readLine();
String[] str1ary = input2.split(" ");
if(str1ary.length == 3){
if(Integer.valueOf(str1ary[0]) * Integer.valueOf(str1ary[0]) + Integer.valueOf(str1ary[1]) * Integer.valueOf(str1ary[1]) == Integer.valueOf(str1ary[2]) * Integer.valueOf(str1ary[2])){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
} | Main.java:19: error: reached end of file while parsing
}
^
1 error
|
s950045240 | p00003 | Java | import java.io.*;
import java.util.Arrays;
public class IsItARightTriangle {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int N, arr[] = new int[3];
String str, tmp[];
N = Integer.parseInt(in.readLine());
for (int i = 0; i < N; i++) {
str = in.readLine();
tmp = str.split(" ", 0);
for (int j = 0; j < 3; j++) {
arr[j] = Integer.parseInt(tmp[j]);
arr[j] *= arr[j];
}
Arrays.sort(arr);
if (arr[2] == arr[0] + arr[1])
System.out.println("YES");
else
System.out.println("NO");
}
}
} | Main.java:4: error: class IsItARightTriangle is public, should be declared in a file named IsItARightTriangle.java
public class IsItARightTriangle {
^
1 error
|
s293886452 | p00003 | Java | #include <iostream>
using namespace std;
bool check(int a, int b , int c){
return ( a*a == ( b*b + c*c ) )? true : false ;
}
int main(){
int n, a, b, c;
cin >> n;
for(int i=0 ; i<n ; i++){
cin >> a >> b >> c;
if( check(a,b,c) || check(b,c,a) || check(c,a,b) ){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
} | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
bool check(int a, int b , int c){
^
(use --enable-preview to enable unnamed classes)
Main.java:11: error: not a statement
cin >> n;
^
Main.java:13: error: not a statement
cin >> a >> b >> c;
^
Main.java:15: error: not a statement
cout << "YES" << endl;
^
Main.java:17: error: not a statement
cout << "NO" << endl;
^
7 errors
|
s118336117 | p00003 | Java | #include <iostream>
#include <math.h>
using namespace std;
void solve(int a, int b, int c) {
bool f = false;
int max_num = max(a, max(b, c));
int sub1, sub2;
if (max_num != a) {
sub1 = a;
if (max_num != b) sub2 = b;
else sub2 = c;
} else if (max_num != b) {
sub1 = b;
sub2 = c;
}
if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
if (f) cout << "YES" << endl;
else cout << "NO" << endl;
}
int main() {
int num, a, b, c;
cin >> num;
for (int i=0; i<num; i++) {
cin >> a >> b >> c;
solve(a,b,c);
}
return 0;
} | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <math.h>
^
Main.java:19: error: not a statement
if (f) cout << "YES" << endl;
^
Main.java:20: error: not a statement
else cout << "NO" << endl;
^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
void solve(int a, int b, int c) {
^
(use --enable-preview to enable unnamed classes)
Main.java:25: error: not a statement
cin >> num;
^
Main.java:27: error: not a statement
cin >> a >> b >> c;
^
7 errors
|
s169212407 | p00003 | Java | import java.util.*;
public class aoj0003 {
static final Scanner stdin = new Scanner(System.in);
static final String solve(int a, int b, int c){
return ( a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b ) ? "YES" : "NO";
}
public static void main(String[] args) {
int n = stdin.nextInt();
while( n-- != 0 ){
int a = stdin.nextInt();
int b = stdin.nextInt();
int c = stdin.nextInt();
System.out.println( solve(a,b,c) );
}
}
} | Main.java:2: error: class aoj0003 is public, should be declared in a file named aoj0003.java
public class aoj0003 {
^
1 error
|
s964176272 | p00003 | Java | import java.util.Arrays;
import java.util.Scanner;
public class AOJ_Volume0003 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int i = Integer.parseInt(sc.nextLine());
int[] values = new int[3];
for(int j=0;j<i;j++)
{
String[] s = sc.nextLine().split("[\\s]+");
values[0] = Integer.parseInt(s[0]);
values[1] = Integer.parseInt(s[1]);
values[2] = Integer.parseInt(s[3]);
Arrays.sort(values);
if(values[0]*values[0] + values[1]*values[1] == values[2]*values[2]){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
} | Main.java:6: error: class AOJ_Volume0003 is public, should be declared in a file named AOJ_Volume0003.java
public class AOJ_Volume0003 {
^
1 error
|
s461523088 | p00003 | Java | import java.util.Arrays;
import java.util.Scanner;
public class AOJ_Volume0003 {
public static void main(String[] args){
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
int i = Integer.parseInt(sc.nextLine());
int[] values = new int[3];
for(int j=0;j<i;j++)
{
String[] s = sc.nextLine().split("[\\s]+");
values[0] = Integer.parseInt(s[0]);
values[1] = Integer.parseInt(s[1]);
values[2] = Integer.parseInt(s[3]);
Arrays.sort(values);
if(values[0]*values[0] + values[1]*values[1] == values[2]*values[2]){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
} | Main.java:6: error: class AOJ_Volume0003 is public, should be declared in a file named AOJ_Volume0003.java
public class AOJ_Volume0003 {
^
1 error
|
s964067989 | p00003 | Java | import java.util.*;
public class Triangle {
public static int squareNumber(int x) {
return x * x;
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int numOfTriangles = in.nextInt();
for (int i = 0; i < numOfTriangles; i++) {
Scanner s = new Scanner(System.in);
int a = s.nextInt();
int b = s.nextInt();
int c = s.nextInt();
System.out.println(a);
int[] squares = {squareNumber(a), squareNumber(b), squareNumber(c)};
if (squares[0] + squares[1] == squares[2]) {
System.out.println("YES");
} else if(squares[1] + squares[2] == squares[0]) {
System.out.println("YES");
} else if(squares[0] + squares[2] == squares[1]) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
} | Main.java:3: error: class Triangle is public, should be declared in a file named Triangle.java
public class Triangle {
^
1 error
|
s246290843 | p00003 | Java | import java.util.Scanner;
import java.util.Arrays;
public class Triangle{
public static int squareInt(int x){
return x * x;
}
public static void main(String[] args){
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int[] lengths = new int[3];
for (int i = 0; i < n; i++) {
// 3辺の配列への入力
for (int j = 0; j < 3; j++){
lengths[j] = s.nextInt();
}
// 直角三角形かどうかの判定
Arrays.sort(lengths);
if (squareInt(lengths[0]) + squareInt(lengths[1]) == squareInt(lengths[2])){
System.out.println("YES");
} else{
System.out.println("NO");
}
}
}
} | Main.java:4: error: class Triangle is public, should be declared in a file named Triangle.java
public class Triangle{
^
1 error
|
s349037104 | p00003 | Java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package algorithm;
import java.util.Arrays;
import java.util.Scanner;
/**
*
* @author izumi
*/
public class test1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for (int i = 0; i < n; i++) {
int[] l = new int[3];
for (int j = 0; j < 3; j++) {
l[j] = sc.nextInt();
}
Arrays.sort(l);
if ((l[2]*l[2]) == ((l[1]*l[1])+(l[0]*l[0]))) {
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
}
} | Main.java:16: error: class test1 is public, should be declared in a file named test1.java
public class test1 {
^
1 error
|
s250211829 | p00003 | Java | import java.io.IOException;
import java.util.StringTokenizer;
public class RightTriangle {
public static void main(String[] args) throws IOException{
java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
try{
int count =Integer.parseInt(in.readLine());
String ans [] = new String [count];
for(int i=0;i<count;i++){
String s = in.readLine();
StringTokenizer st = new StringTokenizer(s);
int num [] = new int [4];
for(int j=0;j<3;j++){
num[j] = Integer.parseInt(st.nextToken());
if(num[0] < num[j]){
int tmp = num[0];
num[0] = num[j];
num[j] = tmp;
}
}
if (num[0] * num[0] == num[1] * num[1] + num[2] * num[2]){
ans[i] = "YES";
}else{
ans[i] = "NO";
}
}
for(int i=0;i<count;i++){
System.out.println(ans[i]);
}
}catch(Exception e){
System.exit(0);
}
} | Main.java:35: error: reached end of file while parsing
}
^
1 error
|
s574667842 | p00003 | Java | import java.io.IOException;
import java.util.StringTokenizer;
public class RightTriangle {
public static void main(String[] args) throws IOException{
java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
try{
int count =Integer.parseInt(in.readLine());
String ans [] = new String [count];
for(int i=0;i<count;i++){
String s = in.readLine();
StringTokenizer st = new StringTokenizer(s);
int num [] = new int [4];
for(int j=0;j<3;j++){
num[j] = Integer.parseInt(st.nextToken());
if(num[0] < num[j]){
int tmp = num[0];
num[0] = num[j];
num[j] = tmp;
}
}
if (num[0] * num[0] == num[1] * num[1] + num[2] * num[2]){
ans[i] = "YES";
}else{
ans[i] = "NO";
}
}
for(int i=0;i<count;i++){
System.out.println(ans[i]);
}
}catch(Exception e){
System.exit(0);
}
}
} | Main.java:4: error: class RightTriangle is public, should be declared in a file named RightTriangle.java
public class RightTriangle {
^
1 error
|
s246527048 | p00003 | Java | import java.util.Scanner;
public class Triangle {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
String a = in.nextLine();
int b = Integer.parseInt(a);
for(int i = 0;i<b;i++){
String x = in.next();
String y = in.next();
String z = in.next();
int p = Integer.parseInt(x);
int q = Integer.parseInt(y);
int r = Integer.parseInt(z);
int a1,a2,a3;
a1 = 0;
a2 = 0;
a3 = 0;
a1 = Math.max(Math.max(p,q),Math.max(q,r));
if(a1 == p){
a2=Math.max(q,r);
a3=Math.min(q,r);
}
if(a1 == q){
a2=Math.max(p,r);
a3=Math.min(p,r);
}
if(a1 == r){
a2=Math.max(p,q);
a3=Math.min(p,q);
}
if(p == q){
if(p<r){
a1=r;
a2=p;
a3=p;
}
}
if(q == r){
if(q<p){
a1=p;
a2=q;
a3=q;
}
}
if(p == r){
if(p<q){
a1=q;
a2=p;
a3=p;
}
}
if(p ==q && q == r){
System.out.println("NO");
}
if(a2*a2+a3*a3 == a1*a1){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
} | Main.java:3: error: class Triangle is public, should be declared in a file named Triangle.java
public class Triangle {
^
1 error
|
s659529496 | p00003 | Java | import java.util.Scanner;
import java.util.Arrays;
public class Ex04 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
final int cnt = scan.nextInt();
for(int i = 0; i < cnt; i++) {
Integer[] tri = new Integer[3];
tri[0] = scan.nextInt();
tri[1] = scan.nextInt();
tri[2] = scan.nextInt();
Arrays.sort(tri);
tri[0] *= tri[0];
tri[1] *= tri[1];
tri[2] *= tri[2];
if((tri[0] + tri[1]) == tri[2]) {
System.out.println("YES");
}
else {
System.out.println("NO");
}
}
}
} | Main.java:4: error: class Ex04 is public, should be declared in a file named Ex04.java
public class Ex04 {
^
1 error
|
s977419169 | p00003 | C | #include <stdio.h>
int main(void)
{
int i,N,a,b,c;
scanf("%d",N);
for(i=0;i<N;i++){
scanf("%d %d %d",&a,&b,&c);
int max=a,min1=b,min2=c;
if(b>a)
max=b; min1=a;
if(c>max)
int t;
t=max; max=c; min2=t;
if(max*max=min1*min1+min2*min2)
printf("Yes\n");
else
printf("No\n");
return 0;
}
| main.c: In function 'main':
main.c:13:17: error: expected expression before 'int'
13 | int t;
| ^~~
main.c:14:17: error: 't' undeclared (first use in this function)
14 | t=max; max=c; min2=t;
| ^
main.c:14:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:27: error: lvalue required as left operand of assignment
15 | if(max*max=min1*min1+min2*min2)
| ^
main.c:20:1: error: expected declaration or statement at end of input
20 | }
| ^
|
s249364298 | p00003 | C | #include<stdio.h>
#include<math.h>
int main(){
int a,b,c,n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d%d",&a,&b,&c);
if(c==sqrt(pow(a,2)+pow(b,2)))printf("YES\n");
else if(a==b && c=a*sqrt(2))printf("YES\n");
else printf("NO\n");
}
return 0;
}
| main.c: In function 'main':
main.c:9:34: error: lvalue required as left operand of assignment
9 | else if(a==b && c=a*sqrt(2))printf("YES\n");
| ^
|
s641406139 | p00003 | C | #include<stdio.h>
#include<math.h>
int main(){
int a,b,c,n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d%d",&a,&b,&c);
if(c==sqrt(pow(a,2)+pow(b,2)))printf("YES\n");
else if(a==b && c=a*sqrt(2) || c=b*sqrt(2))printf("YES\n");
else printf("NO\n");
}
return 0;
}
| main.c: In function 'main':
main.c:9:49: error: lvalue required as left operand of assignment
9 | else if(a==b && c=a*sqrt(2) || c=b*sqrt(2))printf("YES\n");
| ^
|
s129957636 | p00003 | C | #include <stdio.h>
void judge(int x, int y, int z)
{
int f = 0;
if(x * x == y * y + z * z){
f = 1;
}else if(y * y == z * z + x * x){
f = 1;
}else if(z * z == x * x + y * y){
f = 1;
}
printf( (f == 1) ? ("YES\n") : ("NO\n") );
return;
}
int main(void)
{
int n,a,b,c;
scanf("%d", &n);
while(n--){
scanf("%d%d%d", &a, &b, &c);
judge(a, b, c);
}
return 0; | main.c: In function 'main':
main.c:24:9: error: expected declaration or statement at end of input
24 | return 0;
| ^~~~~~
|
s951698005 | p00003 | C | #include<stdio.h>
main(){
int N,a,b,c,i,j,k;
int x[100];
scanf("%d",&N);
for(i=0;i<n;i++){
scanf("%d %d %d",&a,&b,&c);
if(c*c == a*a+b*b){
x[i] = 1;
}
else{
x[i] = 0;
}
}
for(j=0;j<N;j++){
if(x[j] == 1){
printf("YES\n");
}
else{
printf("NO\n");
}
}
return 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:6:13: error: 'n' undeclared (first use in this function)
6 | for(i=0;i<n;i++){
| ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
|
s441596470 | p00003 | C | #include<stdio.h>
main()
{
int N,i,j,k;
scanf("%d",&N);
int a[N],b[N],c[N];
for(i=0;i<N;i++){
scanf("%d %d %d",&a[i],&b[i],&c[i]);
}
int higher,lower;
for(i=0;i<N;i++){
if(b[i]<c[i]){
higher=c[i];
lower=b[i];
c[i]=lower;
b[i]=higher;
}
if(a[i]<b[i]){
higher=b[i];
lower=a[i];
b[i]=lower;
a[i]=higher;
}
}
for(i=0;i<N;i++){
if(a[i]*a[i]==b[i]*b[i]+c[i]*c[i]){
printf("YES\n");
}
else{printf("NO\n");}
}
returen 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main()
| ^~~~
main.c: In function 'main':
main.c:31:9: error: 'returen' undeclared (first use in this function)
31 | returen 0;
| ^~~~~~~
main.c:31:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:16: error: expected ';' before numeric constant
31 | returen 0;
| ^~
| ;
|
s276576392 | p00003 | C | #include<stdio.h>
int main(){
int a,b,c,i,N,k[2048]={0};
scanf("%d",N);)
for(i=0;i<N;i++){
scanf("%d%d%d",&a,&b,&c);
if(a<b)a=b;
if(a<c)a=c;
if(a*a=b*b+c*c)k[i]++;
}
for(i=0;i<N;i++){
if(k[i]==0)printf("NO\n");
else printf("YES\n");
}
return 0;
} | main.c: In function 'main':
main.c:7:23: error: expected statement before ')' token
7 | scanf("%d",N);)
| ^
main.c:17:23: error: lvalue required as left operand of assignment
17 | if(a*a=b*b+c*c)k[i]++;
| ^
|
s132821458 | p00003 | C | #include<stdio.h>
int main(){
int a,b,c,tmp,i,N,k[2048]={0};
scanf("%d",&N);
for(i=0;i<N;i++){
scanf("%d%d%d",&a,&b,&c);
if(a<b){tmp=b;
b=a;
a=tmp;
}
if(a<c){tmp=c;
c=a;
a=tmp
}
if(a*a==b*b+c*c)k[i]++;
}
for(i=0;i<N;i++){
if(k[i]==0)printf("NO\n");
else printf("YES\n");
}
return 0;
} | main.c: In function 'main':
main.c:20:22: error: expected ';' before '}' token
20 | a=tmp
| ^
| ;
21 | }
| ~
|
s506923419 | p00003 | C | #include <stdio.h>
typedef enum {
false,
true
} boolean_t;
void sorter ( int* data, int elements )
{
int i, j, cmp, key;
for ( i = 0; i < elements; i++ )
{
key = data[i];
for ( j = i; j > 0; j-- )
{
cmp = data[j - 1];
if ( key < cmp )
{
break;
}
else
{
data[j] = cmp;
}
}
data[j] = key;
}
}
int sq ( int input )
{
return input * input;
}
// length[] should be sorted
// assuming number of elements of length[] is 3
boolean_t alg ( int* length )
{
if ( sq(length[0]) == sq(length[1]) + sq(length[2]) )
return true;
else
return false;
}
#include <stdio.h>
typedef enum {
false,
true
} boolean_t;
void sorter ( int* data, int elements )
{
int i, j, cmp, key;
for ( i = 0; i < elements; i++ )
{
key = data[i];
for ( j = i; j > 0; j-- )
{
cmp = data[j - 1];
if ( key < cmp )
{
break;
}
else
{
data[j] = cmp;
}
}
data[j] = key;
}
}
int sq ( int input )
{
return input * input;
}
// length[] should be sorted
// assuming number of elements of length[] is 3
boolean_t alg ( int* length )
{
if ( sq(length[0]) == sq(length[1]) + sq(length[2]) )
return true;
else
return false;
}
int main ( void )
{
int linenum, i, result;
int data[3];
scanf( "%d", &linenum );
for ( i = 0; i < linenum; i++ )
{
scanf( "%d %d %d", &data[0], &data[1], &data[2] );
sorter( data, 3 );
if ( alg(data) )
puts( "YES" );
else
puts( "NO" );
}
return 0;
} | main.c:47:5: error: redeclaration of enumerator 'false'
47 | false,
| ^~~~~
main.c:4:5: note: previous definition of 'false' with type 'enum <anonymous>'
4 | false,
| ^~~~~
main.c:48:5: error: redeclaration of enumerator 'true'
48 | true
| ^~~~
main.c:5:5: note: previous definition of 'true' with type 'enum <anonymous>'
5 | true
| ^~~~
main.c:49:3: error: conflicting types for 'boolean_t'; have 'enum <anonymous>'
49 | } boolean_t;
| ^~~~~~~~~
main.c:6:3: note: previous declaration of 'boolean_t' with type 'boolean_t'
6 | } boolean_t;
| ^~~~~~~~~
main.c:51:6: error: redefinition of 'sorter'
51 | void sorter ( int* data, int elements )
| ^~~~~~
main.c:8:6: note: previous definition of 'sorter' with type 'void(int *, int)'
8 | void sorter ( int* data, int elements )
| ^~~~~~
main.c:73:5: error: redefinition of 'sq'
73 | int sq ( int input )
| ^~
main.c:30:5: note: previous definition of 'sq' with type 'int(int)'
30 | int sq ( int input )
| ^~
main.c:80:11: error: conflicting types for 'alg'; have 'boolean_t(int *)'
80 | boolean_t alg ( int* length )
| ^~~
main.c:37:11: note: previous definition of 'alg' with type 'boolean_t(int *)'
37 | boolean_t alg ( int* length )
| ^~~
|
s182157283 | p00003 | C | #include <stdio.h>
typedef enum {
false,
true
} boolean_t;
void sorter ( int* data, int elements )
{
int i, j, cmp, key;
for ( i = 0; i < elements; i++ )
{
key = data[i];
for ( j = i; j > 0; j-- )
{
cmp = data[j - 1];
if ( key < cmp )
{
break;
}
else
{
data[j] = cmp;
}
}
data[j] = key;
}
}
int sq ( int input )
{
return input * input;
}
// length[] should be sorted
// assuming number of elements of length[] is 3
boolean_t alg ( int* length )
{
if ( sq(length[0]) == sq(length[1]) + sq(length[2]) )
return true;
else
return false;
}
#include <stdio.h>
typedef enum {
false,
true
} boolean_t;
void sorter ( int* data, int elements )
{
int i, j, cmp, key;
for ( i = 0; i < elements; i++ )
{
key = data[i];
for ( j = i; j > 0; j-- )
{
cmp = data[j - 1];
if ( key < cmp )
{
break;
}
else
{
data[j] = cmp;
}
}
data[j] = key;
}
}
int sq ( int input )
{
return input * input;
}
// length[] should be sorted
// assuming number of elements of length[] is 3
boolean_t alg ( int* length )
{
if ( sq(length[0]) == sq(length[1]) + sq(length[2]) )
return true;
else
return false;
}
int main ( void )
{
boolean_t result;
int linenum, i;
int data[3];
scanf( "%d", &linenum );
for ( i = 0; i < linenum; i++ )
{
scanf( "%d %d %d", &data[0], &data[1], &data[2] );
sorter( data, 3 );
if ( alg(data) )
puts( "YES" );
else
puts( "NO" );
}
return 0;
} | main.c:47:5: error: redeclaration of enumerator 'false'
47 | false,
| ^~~~~
main.c:4:5: note: previous definition of 'false' with type 'enum <anonymous>'
4 | false,
| ^~~~~
main.c:48:5: error: redeclaration of enumerator 'true'
48 | true
| ^~~~
main.c:5:5: note: previous definition of 'true' with type 'enum <anonymous>'
5 | true
| ^~~~
main.c:49:3: error: conflicting types for 'boolean_t'; have 'enum <anonymous>'
49 | } boolean_t;
| ^~~~~~~~~
main.c:6:3: note: previous declaration of 'boolean_t' with type 'boolean_t'
6 | } boolean_t;
| ^~~~~~~~~
main.c:51:6: error: redefinition of 'sorter'
51 | void sorter ( int* data, int elements )
| ^~~~~~
main.c:8:6: note: previous definition of 'sorter' with type 'void(int *, int)'
8 | void sorter ( int* data, int elements )
| ^~~~~~
main.c:73:5: error: redefinition of 'sq'
73 | int sq ( int input )
| ^~
main.c:30:5: note: previous definition of 'sq' with type 'int(int)'
30 | int sq ( int input )
| ^~
main.c:80:11: error: conflicting types for 'alg'; have 'boolean_t(int *)'
80 | boolean_t alg ( int* length )
| ^~~
main.c:37:11: note: previous definition of 'alg' with type 'boolean_t(int *)'
37 | boolean_t alg ( int* length )
| ^~~
|
s098884478 | p00003 | C | #include<stdio.h>
int main(){
int N, i, a, b, c;
scanf("%d",&N);
for(i=0; i<N; i++){
scanf("%d %d %d", &a, &b, &c);
if(a*a == b*b + c*c || b*b = c*c + a*a || c*c = a*a + b*b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
} | main.c: In function 'main':
main.c:7:63: error: lvalue required as left operand of assignment
7 | if(a*a == b*b + c*c || b*b = c*c + a*a || c*c = a*a + b*b)
| ^
|
s880540945 | p00003 | C | #include<stdio.h>
int main(){
int N, i, a, b, c;
scanf("%d",&N);
for(i=0; i<N; i++){
scanf("%d %d %d", &a, &b, &c);
if((a*a == b*b + c*c) || (b*b = c*c + a*a) || (c*c = a*a + b*b))
printf("YES\n");
else
printf("NO\n");
}
return 0;
} | main.c: In function 'main':
main.c:7:47: error: lvalue required as left operand of assignment
7 | if((a*a == b*b + c*c) || (b*b = c*c + a*a) || (c*c = a*a + b*b))
| ^
main.c:7:68: error: lvalue required as left operand of assignment
7 | if((a*a == b*b + c*c) || (b*b = c*c + a*a) || (c*c = a*a + b*b))
| ^
|
s176152608 | p00003 | C | #include<stdio.h>
int main(){
int N, i, a, b, c;
scanf("%d",&N);
for(i=0; i<N; i++){
scanf("%d %d %d", &a, &b, &c);
if(a*a == b*b + c*c)
printf("YES\n");
else if(b*b = c*c + a*a)
printf("YES\n");
else if(c*c = a*a + b*b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
} | main.c: In function 'main':
main.c:9:29: error: lvalue required as left operand of assignment
9 | else if(b*b = c*c + a*a)
| ^
main.c:11:29: error: lvalue required as left operand of assignment
11 | else if(c*c = a*a + b*b)
| ^
|
s710501227 | p00003 | C | int main(){
int a,b,c,i,j;
scanf("%d",&j);
for (i=1;i<=j;i++) {
scanf("%d %d %d",&a,&b,&c);
if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {
printf("Yes\n");}
else {printf("No\n");}
}
return 0;
} | main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | scanf("%d",&j);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | scanf("%d",&j);
| ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:42: error: lvalue required as left operand of assignment
6 | if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {
| ^
main.c:7:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | printf("Yes\n");}
| ^~~~~~
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
8 | else {printf("No\n");}
| ^~~~~~
main.c:8:7: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s154280938 | p00003 | C | int main(){
int a,b,c,i,j;
scanf("%d",&j);
for (i=1;i<=j;i++) {
scanf("%d %d %d",&a,&b,&c);
if (a*a+b*b=c*c) {printf("Yes\n");}
else if (b*b+c*c=a*a) {printf("Yes\n");}
else if (c*c+a*a=b*b) {printf("Yes\n");}
else {printf("No\n");}
}
return 0;
} | main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | scanf("%d",&j);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | scanf("%d",&j);
| ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:12: error: lvalue required as left operand of assignment
6 | if (a*a+b*b=c*c) {printf("Yes\n");}
| ^
main.c:6:19: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
6 | if (a*a+b*b=c*c) {printf("Yes\n");}
| ^~~~~~
main.c:6:19: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:19: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:19: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:17: error: lvalue required as left operand of assignment
7 | else if (b*b+c*c=a*a) {printf("Yes\n");}
| ^
main.c:7:24: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
7 | else if (b*b+c*c=a*a) {printf("Yes\n");}
| ^~~~~~
main.c:7:24: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:17: error: lvalue required as left operand of assignment
8 | else if (c*c+a*a=b*b) {printf("Yes\n");}
| ^
main.c:8:24: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
8 | else if (c*c+a*a=b*b) {printf("Yes\n");}
| ^~~~~~
main.c:8:24: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
9 | else {printf("No\n");}
| ^~~~~~
main.c:9:7: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s724035860 | p00003 | C | #include <stdio.h>
int main(){
int a,b,c,i,j;
scanf("%d",&j);
for (i=1;i<=j;i++) {
scanf("%d %d %d",&a,&b,&c);
if (a*a+b*b=c*c) {printf("Yes\n");}
else if (b*b+c*c=a*a) {printf("Yes\n");}
else if (c*c+a*a=b*b) {printf("Yes\n");}
else {printf("No\n");}
}
return 0;
} | main.c: In function 'main':
main.c:8:12: error: lvalue required as left operand of assignment
8 | if (a*a+b*b=c*c) {printf("Yes\n");}
| ^
main.c:9:17: error: lvalue required as left operand of assignment
9 | else if (b*b+c*c=a*a) {printf("Yes\n");}
| ^
main.c:10:17: error: lvalue required as left operand of assignment
10 | else if (c*c+a*a=b*b) {printf("Yes\n");}
| ^
|
s010061529 | p00003 | C | #include <stdio.h>
int main(){
int a,b,c,i,j;
scanf("%d",&j);
for (i=1;i<=j;i++) {
scanf("%d %d %d",&a,&b,&c);
if (a*a+b*b=c*c) {printf("YES\n");}
else if (b*b+c*c=a*a) {printf("YES\n");}
else if (c*c+a*a=b*b) {printf("YES\n");}
else {printf("NO\n");}
}
return 0;
} | main.c: In function 'main':
main.c:8:12: error: lvalue required as left operand of assignment
8 | if (a*a+b*b=c*c) {printf("YES\n");}
| ^
main.c:9:17: error: lvalue required as left operand of assignment
9 | else if (b*b+c*c=a*a) {printf("YES\n");}
| ^
main.c:10:17: error: lvalue required as left operand of assignment
10 | else if (c*c+a*a=b*b) {printf("YES\n");}
| ^
|
s675014487 | p00003 | C | int main(){
int a,b,c,i,j;
scanf("%d",&j);
for (i=1;i<=j;i++) {
scanf("%d %d %d",&a,&b,&c);
if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {printf("YES\n");}
else {printf("NO\n");}
}
return 0;
} | main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | scanf("%d",&j);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | scanf("%d",&j);
| ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:42: error: lvalue required as left operand of assignment
6 | if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {printf("YES\n");}
| ^
main.c:6:49: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
6 | if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {printf("YES\n");}
| ^~~~~~
main.c:6:49: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:49: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:49: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
7 | else {printf("NO\n");}
| ^~~~~~
main.c:7:7: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s834300405 | p00003 | C | #include <stdio.h>
int main(){
int a,b,c,i,j;
scanf("%d",&j);
for (i=0;i<j;i++) {
scanf("%d %d %d",&a,&b,&c);
if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {printf("YES\n");}
else {printf("NO\n");}
}
return 0;
} | main.c: In function 'main':
main.c:8:42: error: lvalue required as left operand of assignment
8 | if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {printf("YES\n");}
| ^
|
s769466109 | p00003 | C | int main(){
int a,b,c,i,j;
scanf("%d\n",&j);
for (i=1;i<=j;i++) {
scanf("%d %d %d\n",&a,&b,&c);
if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {printf("YES\n");}
else {printf("NO\n");}
}
return 0;
} | main.c: In function 'main':
main.c:3:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | scanf("%d\n",&j);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:3:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | scanf("%d\n",&j);
| ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:42: error: lvalue required as left operand of assignment
6 | if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {printf("YES\n");}
| ^
main.c:6:49: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
6 | if (a*a+b*b=c*c || b*b+c*c=a*a || c*c+a*a=b*b) {printf("YES\n");}
| ^~~~~~
main.c:6:49: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:49: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:49: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
7 | else {printf("NO\n");}
| ^~~~~~
main.c:7:7: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s916451270 | p00003 | C | #include <stdio.h>
#include <math.h>
int main(void){
int i,k;
scanf("%d",i);
for(k=0;k<i;k++){
scanf("%lf %lf %lf",a,b,c);
if(hypot(a,b) == c){
printf("YES");
}
else{
printf("NO");
}
}
return 0;
} | main.c: In function 'main':
main.c:8:29: error: 'a' undeclared (first use in this function)
8 | scanf("%lf %lf %lf",a,b,c);
| ^
main.c:8:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:31: error: 'b' undeclared (first use in this function)
8 | scanf("%lf %lf %lf",a,b,c);
| ^
main.c:8:33: error: 'c' undeclared (first use in this function)
8 | scanf("%lf %lf %lf",a,b,c);
| ^
|
s224377181 | p00003 | C | #include <stdio.h>
int main(void)
{ int n,a[1000],b[1000],c[1000],t;
for(t=0;t<n;t++){
scanf("%d %d %d",&a[],b[],c[]);
}
for(t=0;t<n;t++){
if((a<b+c) || (b<a+c) || (c<a+b)){
printf("YES");
}
else{
rpintf("NO");
}
}
return 0;
} | main.c: In function 'main':
main.c:6:37: error: expected expression before ']' token
6 | scanf("%d %d %d",&a[],b[],c[]);
| ^
main.c:10:24: error: invalid operands to binary + (have 'int *' and 'int *')
10 | if((a<b+c) || (b<a+c) || (c<a+b)){
| ~ ^
| | |
| | int *
| int *
main.c:10:35: error: invalid operands to binary + (have 'int *' and 'int *')
10 | if((a<b+c) || (b<a+c) || (c<a+b)){
| ~ ^
| | |
| | int *
| int *
main.c:10:46: error: invalid operands to binary + (have 'int *' and 'int *')
10 | if((a<b+c) || (b<a+c) || (c<a+b)){
| ~ ^
| | |
| | int *
| int *
main.c:14:25: error: implicit declaration of function 'rpintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
14 | rpintf("NO");
| ^~~~~~
| printf
|
s377277724 | p00003 | C | #include <stdio.h>
int main(void)
{ int n,a[1000],b[1000],c[1000],t;
for(t=0;t<n;t++){
scanf("%d %d %d",&a[t],&b[t],&c[t]);
}
for(t=0;t<n;t++){
if((a<b+c) || (b<a+c) || (c<a+b)){
printf("YES");
}
else{
rpintf("NO");
}
}
return 0;
} | main.c: In function 'main':
main.c:10:24: error: invalid operands to binary + (have 'int *' and 'int *')
10 | if((a<b+c) || (b<a+c) || (c<a+b)){
| ~ ^
| | |
| | int *
| int *
main.c:10:35: error: invalid operands to binary + (have 'int *' and 'int *')
10 | if((a<b+c) || (b<a+c) || (c<a+b)){
| ~ ^
| | |
| | int *
| int *
main.c:10:46: error: invalid operands to binary + (have 'int *' and 'int *')
10 | if((a<b+c) || (b<a+c) || (c<a+b)){
| ~ ^
| | |
| | int *
| int *
main.c:14:25: error: implicit declaration of function 'rpintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
14 | rpintf("NO");
| ^~~~~~
| printf
|
s827126569 | p00003 | C | #include <stdio.h>
#include <math.h>
int main(void)
{ int n,a[1000],b[1000],c[1000],t;
for(t=0;t<n;t++){
scanf("%d %d %d",&a[t],&b[t],&c[t]);
}
for(t=0;t<n;t++){
if((a < hypot(b,c)) || (b < hypot(a,c)) || (c < hypot(a,b))){
printf("YES");
}
else{
rpintf("NO");
}
}
return 0;
} | main.c: In function 'main':
main.c:12:31: error: incompatible type for argument 1 of 'hypot'
12 | if((a < hypot(b,c)) || (b < hypot(a,c)) || (c < hypot(a,b))){
| ^
| |
| int *
In file included from /usr/include/math.h:275,
from main.c:2:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:33: error: incompatible type for argument 2 of 'hypot'
12 | if((a < hypot(b,c)) || (b < hypot(a,c)) || (c < hypot(a,b))){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:51: error: incompatible type for argument 1 of 'hypot'
12 | if((a < hypot(b,c)) || (b < hypot(a,c)) || (c < hypot(a,b))){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:53: error: incompatible type for argument 2 of 'hypot'
12 | if((a < hypot(b,c)) || (b < hypot(a,c)) || (c < hypot(a,b))){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:71: error: incompatible type for argument 1 of 'hypot'
12 | if((a < hypot(b,c)) || (b < hypot(a,c)) || (c < hypot(a,b))){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:73: error: incompatible type for argument 2 of 'hypot'
12 | if((a < hypot(b,c)) || (b < hypot(a,c)) || (c < hypot(a,b))){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:16:25: error: implicit declaration of function 'rpintf'; did you mean 'rintf'? [-Wimplicit-function-declaration]
16 | rpintf("NO");
| ^~~~~~
| rintf
|
s357461096 | p00003 | C | #include <stdio.h>
#include <math.h>
int main(void)
{ int n,a[1000],b[1000],c[1000],t;
for(t=0;t<n;t++){
scanf("%d %d %d",&a[t],&b[t],&c[t]);
}
for(t=0;t<n;t++){
if(a == hypot(b,c) || b == hypot(a,c) || c == hypot(a,b)){
printf("YES");
}
else{
rpintf("NO");
}
}
return 0;
} | main.c: In function 'main':
main.c:12:31: error: incompatible type for argument 1 of 'hypot'
12 | if(a == hypot(b,c) || b == hypot(a,c) || c == hypot(a,b)){
| ^
| |
| int *
In file included from /usr/include/math.h:275,
from main.c:2:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:33: error: incompatible type for argument 2 of 'hypot'
12 | if(a == hypot(b,c) || b == hypot(a,c) || c == hypot(a,b)){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:50: error: incompatible type for argument 1 of 'hypot'
12 | if(a == hypot(b,c) || b == hypot(a,c) || c == hypot(a,b)){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:52: error: incompatible type for argument 2 of 'hypot'
12 | if(a == hypot(b,c) || b == hypot(a,c) || c == hypot(a,b)){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:69: error: incompatible type for argument 1 of 'hypot'
12 | if(a == hypot(b,c) || b == hypot(a,c) || c == hypot(a,b)){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:12:71: error: incompatible type for argument 2 of 'hypot'
12 | if(a == hypot(b,c) || b == hypot(a,c) || c == hypot(a,b)){
| ^
| |
| int *
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:180:1: note: expected 'double' but argument is of type 'int *'
180 | __MATHCALL_VEC (hypot,, (_Mdouble_ __x, _Mdouble_ __y));
| ^
main.c:16:25: error: implicit declaration of function 'rpintf'; did you mean 'rintf'? [-Wimplicit-function-declaration]
16 | rpintf("NO");
| ^~~~~~
| rintf
|
s168240101 | p00003 | C | #include <stdio.h>
int n, i, k;
scanf("%d", &n);
int l[n][3];
for(i=0; i<n; i++)
scanf("%d %d %d", &l[i][0], &l[i][1], &l[i][2]);
for(i=0; i<n; i++){
for(k=0; k<2; k++){
if(l[i][0]>l[i][1]){
temp=l[i][0];
l[i][0]=l[i][1];
l[i][1]=temp;
}
if(l[i][1]>l[i][2]){
temp=l[i][1];
l[i][1]=l[i][2];
l[i][2]=temp;
}
}
}
for(i=0; i<n; i++){
if((l[i][0])*(l[i][0])+(l[i][1])*(l[i][1])=(l[i][2])*(l[i][2]))
printf("YES\n");
else
printf("NO\n");
return 0;
} | main.c:5:7: error: expected declaration specifiers or '...' before string constant
5 | scanf("%d", &n);
| ^~~~
main.c:5:13: error: expected declaration specifiers or '...' before '&' token
5 | scanf("%d", &n);
| ^
main.c:7:5: error: variably modified 'l' at file scope
7 | int l[n][3];
| ^
main.c:9:1: error: expected identifier or '(' before 'for'
9 | for(i=0; i<n; i++)
| ^~~
main.c:9:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
9 | for(i=0; i<n; i++)
| ^
main.c:9:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
9 | for(i=0; i<n; i++)
| ^~
main.c:12:1: error: expected identifier or '(' before 'for'
12 | for(i=0; i<n; i++){
| ^~~
main.c:12:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
12 | for(i=0; i<n; i++){
| ^
main.c:12:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
12 | for(i=0; i<n; i++){
| ^~
main.c:31:1: error: expected identifier or '(' before 'for'
31 | for(i=0; i<n; i++){
| ^~~
main.c:31:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
31 | for(i=0; i<n; i++){
| ^
main.c:31:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
31 | for(i=0; i<n; i++){
| ^~
|
s673967054 | p00003 | C | #include <stdio.h>
int main(void){
int n, i, k;
scanf("%d", &n);
int l[n][3];
for(i=0; i<n; i++)
scanf("%d %d %d", &l[i][0], &l[i][1], &l[i][2]);
for(i=0; i<n; i++){
for(k=0; k<2; k++){
if(l[i][0]>l[i][1]){
temp=l[i][0];
l[i][0]=l[i][1];
l[i][1]=temp;
}
if(l[i][1]>l[i][2]){
temp=l[i][1];
l[i][1]=l[i][2];
l[i][2]=temp;
}
}
}
for(i=0; i<n; i++){
if((l[i][0])*(l[i][0])+(l[i][1])*(l[i][1])=(l[i][2])*(l[i][2]))
printf("YES\n");
else
printf("NO\n");
}
return 0;
} | main.c: In function 'main':
main.c:19:1: error: 'temp' undeclared (first use in this function)
19 | temp=l[i][0];
| ^~~~
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:43: error: lvalue required as left operand of assignment
34 | if((l[i][0])*(l[i][0])+(l[i][1])*(l[i][1])=(l[i][2])*(l[i][2]))
| ^
|
s203911267 | p00003 | C | #include <stdio.h>
int main(void){
int n, i, k;
scanf("%d", &n);
int l[n][3];
for(i=0; i<n; i++)
scanf("%d %d %d", &l[i][0], &l[i][1], &l[i][2]);
for(i=0; i<n; i++){
for(k=0; k<2; k++){
if(l[i][0]>l[i][1]){
int temp;
temp=l[i][0];
l[i][0]=l[i][1];
l[i][1]=temp;
}
if(l[i][1]>l[i][2]){
int temp;
temp=l[i][1];
l[i][1]=l[i][2];
l[i][2]=temp;
}
}
}
for(i=0; i<n; i++){
if((l[i][0])*(l[i][0])+(l[i][1])*(l[i][1])=(l[i][2])*(l[i][2]))
printf("YES\n");
else
printf("NO\n");
}
return 0;
} | main.c: In function 'main':
main.c:36:43: error: lvalue required as left operand of assignment
36 | if((l[i][0])*(l[i][0])+(l[i][1])*(l[i][1])=(l[i][2])*(l[i][2]))
| ^
|
s229231746 | p00003 | C | #include <stdio.h>
void right_triangle (int x, int y, int z)
{
if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){
printf("YES\n");
} else {
printf("NO\n");
}
}
int main(void)
{
int n;
scanf("%d", &n);
int i;
for (i = 0; i < n; ++i){
int x, y, z;
scanf("%d %d %d", &x, &y, &z);
right_triangle(x, y, z);
}
return 0;
} | main.c: In function 'right_triangle':
main.c:5:64: error: lvalue required as left operand of assignment
5 | if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){
| ^
|
s511251402 | p00003 | C | #include <stdio.h>
void right_triangle (int x, int y, int z)
{
if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){
printf("YES\n");
} else {
printf("NO\n");
}
}
int main(void)
{
int n;
scanf("%d", &n);
for (int i = 0; i < n; ++i){
int x, y, z;
scanf("%d %d %d", &x, &y, &z);
right_triangle(x, y, z);
}
return 0;
} | main.c: In function 'right_triangle':
main.c:5:64: error: lvalue required as left operand of assignment
5 | if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){
| ^
|
s342488472 | p00003 | C | #include<stdio.h>
int main()
{
int a,b,c;
int count,i;
scanf("%d",&count);
for(i=0;i<count;i++)
{
scanf("%d %d %d",&a,&b,&c)
if(((a*a+b*b)==c*c)||((a*a+c*c)==b*b)||((b*b+c*c)==a*a))printf("YES\n");
else printf("NO\n");
}
return 0;
} | main.c: In function 'main':
main.c:10:31: error: expected ';' before 'if'
10 | scanf("%d %d %d",&a,&b,&c)
| ^
| ;
11 |
12 | if(((a*a+b*b)==c*c)||((a*a+c*c)==b*b)||((b*b+c*c)==a*a))printf("YES\n");
| ~~
main.c:13:5: error: 'else' without a previous 'if'
13 | else printf("NO\n");
| ^~~~
|
s074514768 | p00003 | C | #include<stdio.h>
int main()
{
int a,b,c,test,i,f;
while(scanf("%d",&test)==1)
{
for(i=1;i<=test;i++) {
scanf("%d %d %d",&a,&b,&c);
if((c==sqrt(a*a+b*b)|| b==(c*c+a*a)|| a==(b*b+c*c)
printf("YES\n");
else
printf("NO\n")
}
}
return 0;
} | main.c: In function 'main':
main.c:9:14: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
9 | if((c==sqrt(a*a+b*b)|| b==(c*c+a*a)|| a==(b*b+c*c)
| ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
1 | #include<stdio.h>
+++ |+#include <math.h>
2 | int main()
main.c:9:14: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
9 | if((c==sqrt(a*a+b*b)|| b==(c*c+a*a)|| a==(b*b+c*c)
| ^~~~
main.c:9:14: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:9:57: error: expected ')' before 'printf'
9 | if((c==sqrt(a*a+b*b)|| b==(c*c+a*a)|| a==(b*b+c*c)
| ~ ^
| )
10 | printf("YES\n");
| ~~~~~~
main.c:12:27: error: expected ')' before '}' token
12 | printf("NO\n")
| ^
| )
13 | }
| ~
main.c:9:9: note: to match this '('
9 | if((c==sqrt(a*a+b*b)|| b==(c*c+a*a)|| a==(b*b+c*c)
| ^
main.c:13:6: error: expected expression before '}' token
13 | }
| ^
|
s151688386 | p00003 | C | #include<stdio.h>
int main()
{
int a,b,c,test,i,f;
while(scanf("%d",&test)==1)
{
for(i=1;i<test;i++) {
scanf("%d %d %d",&a,&b,&c);
if(c==sqrt(a*a+b*b)|| b==(c*c+a*a)|| a==(b*b+c*c))
printf("YES\n");
else
printf("NO\n")
}
}
return 0;
} | main.c: In function 'main':
main.c:9:13: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
9 | if(c==sqrt(a*a+b*b)|| b==(c*c+a*a)|| a==(b*b+c*c))
| ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
1 | #include<stdio.h>
+++ |+#include <math.h>
2 | int main()
main.c:9:13: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
9 | if(c==sqrt(a*a+b*b)|| b==(c*c+a*a)|| a==(b*b+c*c))
| ^~~~
main.c:9:13: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:12:27: error: expected ';' before '}' token
12 | printf("NO\n")
| ^
| ;
13 | }
| ~
|
s752627282 | p00003 | C | ##include<stdio.h>
int main()
{
int n,a,b,c,i;
while(scanf("%d",&n)==1){
for(i=0;i<n;i++){
scanf("%d%d%d",&a,&b,&c);
if(((a*a+b*b)==c*c)||((c*c+b*b)==a*a)||((a*a+c*c)==b*b))
printf("YES\n");
else
printf("NO\n");
}
}
return 0;
} | main.c:1:1: error: stray '##' in program
1 | ##include<stdio.h>
| ^~
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | ##include<stdio.h>
| ^
|
s428393494 | p00003 | C | #include<stdio.h>
int main()
{
int j,a,b,c,i;
while(scanf("%d",&n)==1){
for(i=0;i<j;i++){
scanf("%d%d%d",&a,&b,&c);
if(((a*a+b*b)==c*c)||((c*c+b*b)==a*a)||((a*a+c*c)==b*b))
printf("YES\n");
else
printf("NO\n");
}
}
return 0;
} | main.c: In function 'main':
main.c:5:23: error: 'n' undeclared (first use in this function)
5 | while(scanf("%d",&n)==1){
| ^
main.c:5:23: note: each undeclared identifier is reported only once for each function it appears in
|
s925023498 | p00003 | C | #include <stdio.h>
void sort_asc(int *v, int c){
int i, j;
int t;
for(i = 0; i < c - 1; i++){
if(v[i] > v[i+1]){
t = v[i+1];
v[i+1] = v[i];
v[i] = t;
for(j = i; j > 0; j--){
if(v[j] < v[j-1]){
t = v[j-1];
v[j-1] = v[j];
v[j] = t;
}else{
break;
}
}
}
}
return;
}
int main(){
int cnt, i;
int v[3];
scanf("%d", &cnt);
for(i = 0; i < cnt; i++){
scanf("%d %d %d", &v[0], &v[1], &v[2]);
sort_asc(v, 3);
if(v[2]^2 == v[0]^2 + v[1]^2){
print("YES");
}else{
print("NO");
}
}
return 0;
} | main.c: In function 'main':
main.c:35:13: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
35 | print("YES");
| ^~~~~
| printf
|
s242601901 | p00003 | C | #include<stdio.h>
int main(void) {
int N, i;
scanf_s("%d", &N);
int a[1000], b[1000], c[1000];
for (i = 0; i < N; i++) {
scanf_s("%d &d &d", &a[i], &b[i], &c[i]);
}
for (i = 0; i < N; i++) {
int A = a[i] * a[i];
int B = b[i] * b[i];
int C = c[i] * c[i];
if (A + B == C || B + C == A || C + A == B) {
printf("YES\n");
}
else
{
printf("NO\n");
}
}
return 0;
} | main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &N);
| ^~~~~~~
| scanf
|
s350188822 | p00003 | C | #include<stdio.h>
int main(void) {
int a, b, c, N, i;
scanf_s("%d",&N);
for (i = 0; i < N; i++) {
scanf_s("%d %d %d", &a, &b, &c);
int A = a*a;
int B = b*b;
int C = c*c;
if (A + B == C || B + A == C || C + A == B) {
printf("YES");
}
else
{
printf("NO");
}
}
return 0;
} | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d",&N);
| ^~~~~~~
| scanf
|
s320669054 | p00003 | C | #include<stdio.h>
int main(void) {
int a, b, c, N, i;
scanf_s("%d",&N);
for (i = 0; i < N; i++) {
scanf_s("%d %d %d", &a, &b, &c);
int A = a*a;
int B = b*b;
int C = c*c;
if ((A + B == C) || (B + A == C )|| (C + A == B)) {
printf("YES\n");
}
else
{
printf("NO\n");
}
}
return 0;
} | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d",&N);
| ^~~~~~~
| scanf
|
s446230729 | p00003 | C | #include<stdio.h>
int main(void) {
int a, b, c, n, i;
scanf("%d",&n);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &a, &b, &c);
int A = a*a;
int B = b*b;
int C = c*c;
if (A + B == C || B + A == C || C + A == B) {
printf("YES");
}
else
{
printf("NO");
}
}
return 0;
} | main.c: In function 'main':
main.c:8:25: error: 'N' undeclared (first use in this function)
8 | for (i = 0; i < N; i++) {
| ^
main.c:8:25: note: each undeclared identifier is reported only once for each function it appears in
|
s916801668 | p00003 | C | #include <stdio.h>
int main(void)
{
int N;
int a[1000], b[1000], c[1000];
int i;
for (i = 0; i < N; i++){
scanf("%d %d %d", &a[i], &b[i], &c[i]);
if ((a[i] * a[i]) + (b[i] * b[i]) == (c[i] * c[i])||(a[i] * a[i]) + (c[i] * c[i]) == (b[i] * b[i]))||(c[i] * c[i]) + (b[i] * b[i]) == (a[i] * a[i])){
printf("YES\n");
}
else {
printf("NO\n");
}
}
return (0);
} | main.c: In function 'main':
main.c:11:116: error: expected expression before '||' token
11 | if ((a[i] * a[i]) + (b[i] * b[i]) == (c[i] * c[i])||(a[i] * a[i]) + (c[i] * c[i]) == (b[i] * b[i]))||(c[i] * c[i]) + (b[i] * b[i]) == (a[i] * a[i])){
| ^~
main.c:11:164: error: expected statement before ')' token
11 | if ((a[i] * a[i]) + (b[i] * b[i]) == (c[i] * c[i])||(a[i] * a[i]) + (c[i] * c[i]) == (b[i] * b[i]))||(c[i] * c[i]) + (b[i] * b[i]) == (a[i] * a[i])){
| ^
main.c:14:17: error: 'else' without a previous 'if'
14 | else {
| ^~~~
|
s528015528 | p00003 | C | #include<stdio.h>
#include<string.h>
#include<math.h>
int main(){
int length[3];
int n;
fscanf(stdin, "%d", &n);
while ( (fscanf(stdin, "%d %d %d", &length[0], &length[1], &length[2])) != EOF){
// 1. ?????????????????¨??¨??????.
if (length[0] == length[1] ||
length[1] == length[2] ||
length[0] == length[2]){
printf("NO\n");
continue;
}
// 2. ??????????????????c??¨??????, c^2 = a^2 + b^2
int max_index = 0;
double tmp = 0;
for(int i=1; i<n; ++i){
if(length[max_index] < length[i]){
max_index = i;
}
}
for (int i=0; i<3; i++){
if (i != max_index){
tmp += pow((double)length[i], 2.0);
}
}
if (pow((double)length[max_index], 2.0) == tmp) {
printf("YES\n");
}else{
printf("NO\n");
}
}
return 0;
} | /usr/bin/ld: /tmp/cc3XTzqI.o: in function `main':
main.c:(.text+0xdb): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x11f): undefined reference to `pow'
collect2: error: ld returned 1 exit status
|
s158213980 | p00003 | C | // 20151005
#include<stdio.h>
int main() {
int N; // ????????????????????°
int a, b, c; // ??\???
/* ????????????????????°??\??? */
scanf("&d", N);
for (i = 0; i < N; i ++) {
/** 3 ?????????????????\??? **/
scanf("&d &d &d", a, b, c);
/*** ??¶?´??????? ***/
if (a < 1000 && b < 1000 && c < 1000) {
braak;
}
/**** 3 ?????????????????????????????????****/
if (a * a = b * b + c * c) {
san = 1;
}
if (b * b = c * c + a * a) {
san = 1;
}
if (c * c = a * a + b * b) {
san = 1;
}
/***** ??¨??? *****/
if (san = 1) {
printf("YES\n");
}
else {
printf("NO\n");
}
}
/* ?????? */
return 0;
} | main.c: In function 'main':
main.c:20:8: error: 'i' undeclared (first use in this function)
20 | for (i = 0; i < N; i ++) {
| ^
main.c:20:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:7: error: 'braak' undeclared (first use in this function)
25 | braak;
| ^~~~~
main.c:28:15: error: lvalue required as left operand of assignment
28 | if (a * a = b * b + c * c) {
| ^
main.c:29:7: error: 'san' undeclared (first use in this function)
29 | san = 1;
| ^~~
main.c:31:15: error: lvalue required as left operand of assignment
31 | if (b * b = c * c + a * a) {
| ^
main.c:34:15: error: lvalue required as left operand of assignment
34 | if (c * c = a * a + b * b) {
| ^
|
s003590886 | p00003 | C | #include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <math.h>
int data[1000][3];
/**------------ SUB ROUTIONE -------------*/
/**------------ SUB ROUTIONE -------------*/
int main()
{
int n,i,a,b,c;
char inp[96];
/**--init --**/
/**--input--**/
gets(inp);
sscanf_s(inp,"%d",&n);
for (i=0 ; i<n ; i++) {
gets(inp);
sscanf(inp,"%d %d %d",&(data[i][0]),&(data[i][1]),&(data[i][2]));
}
/**--CALC--**/
for (i=0 ; i<n ; i++) {
a = data[i][0];
b = data[i][1];
c = data[i][2];
if (((a*a)+(b*b)) == (c*c)) {
printf("YES\n");
}
else {
printf("NO\n");
}
}
return 0;
} | main.c: In function 'main':
main.c:19:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
19 | gets(inp);
| ^~~~
| fgets
main.c:20:9: error: implicit declaration of function 'sscanf_s'; did you mean 'sscanf'? [-Wimplicit-function-declaration]
20 | sscanf_s(inp,"%d",&n);
| ^~~~~~~~
| sscanf
|
s359747007 | p00003 | C | #include<stdio.h>
int Pita(int a, int b, int c);
int main(void){
int N, a, b, c, i, t;
scanf("%d", &N);
for(i = 0; i < N; i++){
scanf("%d%d%d", a, b, c);
t = Pita(a, b, c);
if(t == 1) printf("Yes\n");
else printf("No\n");
}
return 0;
}
int Pita(int a, int b, int c){
if(a > b && a > c){
if(a == (b * b + c * c))
return 1
else return 0;
}else(b > a && b > c){
if(b == (a * a + c * c))
return 1
else return 0;
}else if(c > a && c > b){
if(c == (a * a + b * b))
return 1
else return 0;
}else{
return 0;
}
} | main.c: In function 'Pita':
main.c:18:9: error: expected ';' before 'else'
18 | return 1
| ^
| ;
19 | else return 0;
| ~~~~
main.c:20:22: error: expected ';' before '{' token
20 | }else(b > a && b > c){
| ^
| ;
|
s555035954 | p00003 | C | #include<stdio.h>
int Pita(int a, int b, int c);
int main(void){
int N, a, b, c, i, t;
scanf("%d", &N);
for(i = 0; i < N; i++){
scanf("%d%d%d", a, b, c);
t = Pita(a, b, c);
if(t == 1){
printf("Yes\n");
}else{
printf("No\n");
}
}
return 0;
}
int Pita(int a, int b, int c){
if(a > b && a > c){
if(a == (b * b + c * c))
return 1
else return 0;
}else(b > a && b > c){
if(b == (a * a + c * c))
return 1
else return 0;
}else if(c > a && c > b){
if(c == (a * a + b * b))
return 1
else return 0;
}else{
return 0;
}
} | main.c: In function 'Pita':
main.c:21:9: error: expected ';' before 'else'
21 | return 1
| ^
| ;
22 | else return 0;
| ~~~~
main.c:23:22: error: expected ';' before '{' token
23 | }else(b > a && b > c){
| ^
| ;
|
s282186087 | p00003 | C | #include<stdio.h>
int Pita(int a, int b, int c);
int main(void){
int N, a, b, c, i, t;
scanf("%d", &N);
for(i = 0; i < N; i++){
scanf("%d%d%d", a, b, c);
t = Pita(a, b, c);
if(t == 1){
printf("Yes\n");
}else{
printf("No\n");
}
}
return 0;
}
int Pita(int a, int b, int c){
if(a > b && a > c){
if(a == (b * b + c * c))
return 1;
else return 0;
}else(b > a && b > c){
if(b == (a * a + c * c))
return 1;
else return 0;
}else if(c > a && c > b){
if(c == (a * a + b * b))
return 1
else return 0;
}else{
return 0;
}
} | main.c: In function 'Pita':
main.c:23:22: error: expected ';' before '{' token
23 | }else(b > a && b > c){
| ^
| ;
|
s475669095 | p00003 | C | #include<stdio.h>
int Pita(int a, int b, int c);
int main(void){
int N, a, b, c, i, t;
scanf("%d", &N);
for(i = 0; i < N; i++){
scanf("%d%d%d", a, b, c);
t = Pita(a, b, c);
if(t == 1){
printf("Yes\n");
}else{
printf("No\n");
}
}
return 0;
}
int Pita(int a, int b, int c){
if(a > b && a > c){
if(a == (b * b + c * c)){
return 1;
}else{
return 0;
}
}else(b > a && b > c){
if(b == (a * a + c * c)){
return 1;
}else{
return 0;
}
}else if(c > a && c > b){
if(c == (a * a + b * b)){
return 1;
}else
return 0;
}
}else{
return 0;
}
} | main.c: In function 'Pita':
main.c:25:22: error: expected ';' before '{' token
25 | }else(b > a && b > c){
| ^
| ;
main.c: At top level:
main.c:37:2: error: expected identifier or '(' before 'else'
37 | }else{
| ^~~~
main.c:40:1: error: expected identifier or '(' before '}' token
40 | }
| ^
|
s599002101 | p00003 | C | #include<stdio.h>
int Pita(int a, int b, int c);
int main(void){
int N, a, b, c, i, t;
scanf("%d", &N);
for(i = 0; i < N; i++){
scanf("%d%d%d", a, b, c);
t = Pita(a, b, c);
if(t == 1){
printf("Yes\n");
}else{
printf("No\n");
}
}
return 0;
}
int Pita(int a, int b, int c){
if(a > b && a > c){
if(a == (b * b + c * c)){
return 1;
}else{
return 0;
}
}else(b > a && b > c){
if(b == (a * a + c * c)){
return 1;
}else{
return 0;
}
}else if(c > a && c > b){
if(c == (a * a + b * b)){
return 1;
}else {
return 0;
}
}else{
return 0;
}
} | main.c: In function 'Pita':
main.c:25:22: error: expected ';' before '{' token
25 | }else(b > a && b > c){
| ^
| ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.