buggy_code
stringlengths 11
625k
| fixed_code
stringlengths 17
625k
| bug_type
stringlengths 2
4.45k
| language
int64 0
8
| token_count
int64 5
200k
| change_count
int64 0
100
|
|---|---|---|---|---|---|
s=[]
for i in range(10):
s.append(int(input()))
s.sort()
for i in range(3):
print(s[i])
|
s=[]
for i in range(10):
s.append(int(input()))
s.sort()
for i in range(3):
print(s[9-i])
|
[["+", 0, 652, 3, 4, 0, 206, 206, 657, 31, 612], ["+", 0, 652, 3, 4, 0, 206, 206, 657, 17, 33]]
| 5
| 43
| 2
|
heightOfMountains = []
for i in range(1, 11):
heightOfMountains.append(int(input()))
heightOfMountains.sort()
for i in range(1, 4):
print(heightOfMountains[-j])
|
heightOfMountains = []
for i in range(1, 11):
heightOfMountains.append(int(input()))
heightOfMountains.sort()
for i in range(1, 4):
print(heightOfMountains[-i])
|
[["-", 0, 652, 3, 4, 0, 206, 206, 664, 28, 22], ["+", 0, 652, 3, 4, 0, 206, 206, 664, 28, 22]]
| 5
| 48
| 2
|
mountain=[]
for s in range(0,10):
mountain.append(int(input()))
mountain.sort(reverse=true)
for s in range(0,3):
print(mountain[s])
|
mountain=[]
for s in range(0,10):
mountain.append(int(input()))
mountain.sort(reverse=True)
for s in range(0,3):
print(mountain[s])
|
[["-", 0, 1, 0, 652, 3, 4, 0, 653, 51, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 51, 146]]
| 5
| 50
| 2
|
ls = []
for i in range(0,10):
ls.append(int(input()))
ls.sort()
print(ls[7])
print(ls[8])
print(ls[9])
|
ls = []
for i in range(0,10):
ls.append(int(input()))
ls.sort()
print(ls[9])
print(ls[8])
print(ls[7])
|
[["-", 0, 1, 0, 652, 3, 4, 0, 206, 206, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 206, 206, 612]]
| 5
| 51
| 4
|
mountain = []
for _ in range(10):
mountain.append(int(input()))
mountain.sort()
mountain.reverse()
print(mountain[0], mountain[1], mountain[2])
|
mountain = []
for _ in range(10):
mountain.append(int(input()))
mountain.sort()
mountain.reverse()
print(mountain[0])
print(mountain[1])
print(mountain[2])
|
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]]
| 5
| 50
| 8
|
# coding: utf-8
# Here your code !
import sys
n = [int(input()) for i in range (1,11)]
#t = [int(input()) for i in range(n)]
n.sort()
n.reverse()
for j in range (1,4):
print(n[j])
|
# coding: utf-8
# Here your code !
import sys
n = [int(input()) for i in range (1,11)]
#t = [int(input()) for i in range(n)]
n.sort()
n.reverse()
for j in range (0,3):
print(n[j])
|
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
| 5
| 51
| 4
|
if __name__=="__main__":
dataset = []
for i in range(10):
a = int(input())
dataset.append(a)
print(dataset)
for j in range(3):
print(max(dataset))
dataset.remove(max(dataset))
|
if __name__=="__main__":
dataset = []
for i in range(10):
a = int(input())
dataset.append(a)
for j in range(3):
print(max(dataset))
dataset.remove(max(dataset))
|
[["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
| 5
| 61
| 4
|
l = []
for i in range(10):
inp = input()
l.append(int(inp))
l.sort().reverse()
for i in range(3):
print(l[i])
|
l = []
for i in range(10):
inp = input()
l.append(int(inp))
l.sort()
l.reverse()
for i in range(3):
print(l[i])
|
[["+", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22]]
| 5
| 50
| 1
|
import sys
data = []
for d in sys.stdin:
data.append(d)
data.sort(reverse=True)
for i in range(3):
print(data[i])
|
import sys
data = []
for d in sys.stdin:
data.append(int(d))
data.sort(reverse=True)
for i in range(3):
print(data[i])
|
[["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 42
| 3
|
h = []
for i in range(10):
h.append(input())
h.sort(reverse=True)
for i in range(3):
print(h[i])
|
h = []
for i in range(10):
h.append(int(input()))
h.sort(reverse=True)
for i in range(3):
print(h[i])
|
[["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 43
| 3
|
result = [0, 0, 0]
for i in range(10):
inp = int(input())
if result[2] >= inp:
continue
elif result[1] <= inp < result[2]:
result[2] = inp
elif result[0] <= inp < result[1]:
result[2] = result[1]
result[1] = inp
else:
result[2] = result[1]
result[1] = result[0]
result[0] = inp
for i in reange(3):
print(result[i])
|
result = [0, 0, 0]
for i in range(10):
inp = int(input())
if result[2] >= inp:
continue
elif result[1] >= inp > result[2]:
result[2] = inp
elif result[0] >= inp > result[1]:
result[2] = result[1]
result[1] = inp
else:
result[2] = result[1]
result[1] = result[0]
result[0] = inp
for i in range(3):
print(result[i])
|
[["-", 8, 196, 0, 57, 75, 665, 15, 666, 667, 19], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 667, 20], ["-", 8, 196, 0, 57, 75, 665, 15, 666, 667, 18], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 667, 47], ["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22]]
| 5
| 122
| 10
|
# -*- coding: utf-8 -*-
#a = [input() for i in range(N)]
#print a # [a1, a2, a3, ..., aN]
import sys
a = []
for line in sys.stdin:
a.append(int(line))
#print a # [a1, a2, a3, ...]
sorted(a, reverse=True)
print(a[0])
print(a[1])
print(a[2])
|
# -*- coding: utf-8 -*-
#a = [input() for i in range(N)]
#print a # [a1, a2, a3, ..., aN]
import sys
a = []
for line in sys.stdin:
a.append(int(line))
#print a # [a1, a2, a3, ...]
a.sort(reverse=True)
print(a[0])
print(a[1])
print(a[2])
|
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]]
| 5
| 55
| 6
|
N = 10
mnts = []
for i in range(N):
mnts.append(int(input()))
mnts.sort(reverse=True)
print(mnts)
for mnt in mnts[:3]:
print(mnt)
|
N = 10
mnts = []
for i in range(N):
mnts.append(int(input()))
mnts.sort(reverse=True)
for mnt in mnts[:3]:
print(mnt)
|
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
| 5
| 51
| 4
|
num = 10
top = 3
mountains = [input() for i in range(num)]
mountains = sorted(mountains, reverse=True)
for i in range(top):
print(mountains[i])
|
num = 10
top = 3
mountains = [int(input()) for i in range(num)]
mountains = sorted(mountains, reverse=True)
for i in range(top):
print(mountains[i])
|
[["+", 0, 1, 0, 662, 12, 658, 8, 652, 63, 22], ["+", 0, 662, 12, 658, 8, 652, 3, 4, 0, 24], ["+", 8, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 45
| 3
|
hills = [input() for _ in range(10)]
hills = list(map(int, hills))
hills.sort
for i in range(3):
print(hills.pop())
|
hills = [input() for _ in range(10)]
hills = list(map(int, hills))
hills.sort()
for i in range(3):
print(hills.pop())
|
[["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
| 5
| 44
| 2
|
m = [int(input()) for _ in range(10)]
m.sort()
[print(m[-i] for i in range(1, 4))]
|
m = [int(input()) for _ in range(10)]
m.sort()
[print(m[-i]) for i in range(1, 4)]
|
[["+", 0, 1, 0, 658, 8, 652, 3, 4, 0, 25], ["-", 3, 668, 0, 659, 12, 652, 3, 4, 0, 25]]
| 5
| 41
| 2
|
def main():
a=[]
for i in range(10):
a.append(int(input()))
a.sort()
for j in range(-1, -4, -1):
print(a[j])
|
a=[]
for i in range(10):
a.append(int(input()))
a.sort()
for j in range(-1, -4, -1):
print(a[j])
|
[["-", 36, 36, 36, 36, 0, 656, 0, 14, 0, 669], ["-", 36, 36, 36, 36, 0, 656, 0, 14, 141, 22], ["-", 36, 36, 0, 656, 0, 14, 54, 54, 0, 24], ["-", 36, 36, 0, 656, 0, 14, 54, 54, 0, 25], ["-", 36, 36, 36, 36, 0, 656, 0, 14, 0, 102]]
| 5
| 55
| 5
|
first = 0;
second = 0;
third = 0;
for var in range(0,10):
N = input()
if (N>first):
third = second
second = first
first = N
elif (N>second):
third = second
second = N
elif (N>third):
third = N
print (first)
print (second)
print (third)
|
first = 0;
second = 0;
third = 0;
for var in range(0,10):
N = int(input())
if (N>first):
third = second
second = first
first = N
elif (N>second):
third = second
second = N
elif (N>third):
third = N
print (first)
print (second)
print (third)
|
[["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 78
| 3
|
x = []
a = 1
while True:
if a != 10:
x.append(int(input()))
a += 1
continue
else:
break
x.sort()
print(x[9])
print(x[8])
print(x[7])
|
x = []
a = 1
while True:
if a != 11:
x.append(int(input()))
a += 1
continue
else:
break
x.sort()
print(x[9])
print(x[8])
print(x[7])
|
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 0, 612]]
| 5
| 59
| 2
|
import sys
for i in sorted(map(int,sys.stdin)[1:])[:-4:-1]:print(i)
|
import sys
for i in sorted(map(int,sys.stdin))[:-4:-1]:print(i)
|
[["-", 12, 206, 51, 652, 3, 4, 0, 206, 0, 70], ["-", 51, 652, 3, 4, 0, 206, 206, 663, 0, 612], ["-", 51, 652, 3, 4, 0, 206, 206, 663, 0, 102], ["-", 12, 206, 51, 652, 3, 4, 0, 206, 0, 73]]
| 5
| 33
| 4
|
#!/usr/bin/env python
def lot3h():
mounts = []
for i in range(10):
mounts.append(int(input()))
mounts.sort()
mounts.reverse()
for i in range(10):
print("%d\n" % mounts[i], end=' ')
return
if __name__ == "__main__":
lot3h()
|
#!/usr/bin/env python
def lot3h():
mounts = []
for i in range(10):
mounts.append(int(input()))
mounts.sort()
mounts.reverse()
for i in range(3):
print("%d\n" % mounts[i], end=' ')
return
if __name__ == "__main__":
lot3h()
|
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
| 5
| 76
| 2
|
a = [0 for i in range(10)]
for i in range(10):
a[i] = int(input())
a.sort().reverse()
print(a[0])
print(a[1])
print(a[2])
|
a = [0 for i in range(10)]
for i in range(10):
a[i] = int(input())
a.sort()
a.reverse()
print(a[0])
print(a[1])
print(a[2])
|
[["+", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22]]
| 5
| 61
| 1
|
heights = []
for n in range(10):
heights.append(int(input()))
heights = sorted(heights)[::-1]
for h in heights:
print(h)
|
heights = []
for n in range(10):
heights.append(int(input()))
heights = sorted(heights)[::-1]
for h in heights[:3]:
print(h)
|
[["+", 36, 36, 0, 656, 0, 7, 12, 206, 0, 70], ["+", 0, 656, 0, 7, 12, 206, 206, 663, 0, 102], ["+", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612], ["+", 36, 36, 0, 656, 0, 7, 12, 206, 0, 73]]
| 5
| 44
| 4
|
import sys
array = [0 for i in range(10)]
for i in range(10):
array[i] = input()
array.sort()
array.reverse()
for j in range(3):
print(str(array[j]))
sys.exit()
|
import sys
array = [0 for i in range(10)]
for i in range(10):
array[i] = int(input())
array.sort()
array.reverse()
for j in range(3):
print(str(array[j]))
sys.exit()
|
[["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 63
| 3
|
import java.io.*;
public class Main {
public static int[] sort(String s[]) {
int[] sides = new int[s.length];
for (int i = 0; i < s.length; i++) {
sides[i] = Integer.parseInt(s[i]);
}
for (int j = 1; j < sides.length; j++) {
if (sides[0] < sides[j]) {
int n = sides[0];
sides[0] = sides[j];
sides[j] = n;
}
}
return sides;
}
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
int num = Integer.parseInt(str);
while (num <= 0 || num > 1000) {
str = br.readLine();
num = Integer.parseInt(str);
}
String str1;
String side[][];
side = new String[num][];
int sides[][];
sides = new int[num][];
int a = 0;
while (a != num) {
str1 = br.readLine();
side[a] = str1.split(" ", 3);
sides[a] = sort(side[a]);
a++;
}
for (int k = 0; k < num; k++) {
if (sides[k][0] * sides[k][0] ==
sides[k][2] * sides[k][2] + sides[k][1] * sides[k][1]) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
}
|
import java.io.*;
public class Main {
public static int[] sort(String s[]) {
int[] sides = new int[s.length];
for (int i = 0; i < s.length; i++) {
sides[i] = Integer.parseInt(s[i]);
}
for (int j = 1; j < sides.length; j++) {
if (sides[0] < sides[j]) {
int n = sides[0];
sides[0] = sides[j];
sides[j] = n;
}
}
return sides;
}
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str = br.readLine();
int num = Integer.parseInt(str);
while (num <= 0 || num > 1000) {
str = br.readLine();
num = Integer.parseInt(str);
}
String str1;
String side[][];
side = new String[num][];
int sides[][];
sides = new int[num][];
int a = 0;
while (a != num) {
str1 = br.readLine();
side[a] = str1.split(" ", 3);
sides[a] = sort(side[a]);
a++;
}
for (int k = 0; k < num; k++) {
if (sides[k][0] * sides[k][0] ==
sides[k][2] * sides[k][2] + sides[k][1] * sides[k][1]) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
}
|
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
| 3
| 392
| 4
|
import java.io.*;
import java.util.*;
import java.util.stream.*;
class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
br.lines()
.skip(1)
.parallel()
.map(line
-> Stream.of(line.split(" "))
.mapToInt(Integer::parseInt)
.map(n -> n * n)
.sorted()
.toArray())
.map(ar -> (ar[0] + ar[1] == ar[2]) ? "YES" : "NO")
.forEach(System.out::println);
}
}
|
import java.io.*;
import java.util.*;
import java.util.stream.*;
class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
br.lines()
.skip(1)
.parallel()
.map(line
-> Stream.of(line.split(" "))
.mapToInt(Integer::parseInt)
.map(n -> n * n)
.sorted()
.toArray())
.map(ar -> (ar[0] + ar[1] == ar[2]) ? "YES" : "NO")
.sequential()
.forEach(System.out::println);
}
}
|
[["+", 8, 196, 0, 1, 0, 492, 500, 492, 141, 22], ["+", 0, 1, 0, 492, 500, 492, 3, 4, 0, 24], ["+", 0, 1, 0, 492, 500, 492, 3, 4, 0, 25], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 0, 131]]
| 3
| 151
| 4
|
import java.util.Scanner;
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 b = sc.nextInt();
int c = sc.nextInt();
int a2 = a * a;
int b2 = b * b;
int c2 = c * c;
if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
System.out.println("Yes");
} else
System.out.println("No");
}
sc.close();
}
}
|
import java.util.Scanner;
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 b = sc.nextInt();
int c = sc.nextInt();
int a2 = a * a;
int b2 = b * b;
int c2 = c * c;
if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
System.out.println("YES");
} else
System.out.println("NO");
}
sc.close();
}
}
|
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
| 3
| 159
| 4
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[]) throws IOException {
InputStreamReader inputStreamReader = new InputStreamReader(System.in);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
int n = Integer.parseInt(bufferedReader.readLine());
StringBuilder answer = new StringBuilder();
for (int i = 0; i < n; i++) {
String[] dataSet = bufferedReader.readLine().split(" ");
double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
if (x + y == z || x + z == y || y + z == x) {
answer.append("YES\n");
}
answer.append("NO\n");
}
System.out.println(answer);
}
}
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[]) throws IOException {
InputStreamReader inputStreamReader = new InputStreamReader(System.in);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
int n = Integer.parseInt(bufferedReader.readLine());
StringBuilder answer = new StringBuilder();
for (int i = 0; i < n; i++) {
String[] dataSet = bufferedReader.readLine().split(" ");
double x = Math.pow(Integer.parseInt(dataSet[0]), 2);
double y = Math.pow(Integer.parseInt(dataSet[1]), 2);
double z = Math.pow(Integer.parseInt(dataSet[2]), 2);
if (x + y == z || x + z == y || y + z == x) {
answer.append("YES\n");
} else {
answer.append("NO\n");
}
}
System.out.print(answer);
}
}
|
[["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 196, 0, 45], ["+", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22]]
| 3
| 227
| 5
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
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[] tmp = buf.readLine().split(" ");
int array[] = new int[3];
for (int j = 0; j < 3; j++) {
array[i] = Integer.parseInt(tmp[j]);
}
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");
}
}
}
}
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
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[] tmp = buf.readLine().split(" ");
int array[] = new int[3];
for (int j = 0; j < 3; j++) {
array[j] = Integer.parseInt(tmp[j]);
}
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");
}
}
}
}
|
[["-", 8, 196, 0, 1, 0, 11, 31, 504, 71, 22], ["+", 8, 196, 0, 1, 0, 11, 31, 504, 71, 22]]
| 3
| 221
| 2
|
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
for (int i = 0; i < n; i++) {
int a, b, c;
a = scn.nextInt();
b = scn.nextInt();
c = scn.nextInt();
if (Math.abs(a * a - b * a) == c * c || a * a + b * b == c * c) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
}
|
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
for (int i = 0; i < n; i++) {
int a, b, c;
a = scn.nextInt();
b = scn.nextInt();
c = scn.nextInt();
if (Math.abs(a * a - b * b) == c * c || a * a + b * b == c * c) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
}
|
[["-", 31, 492, 3, 4, 0, 16, 12, 16, 12, 22], ["+", 31, 492, 3, 4, 0, 16, 12, 16, 12, 22]]
| 3
| 148
| 2
|
import static java.util.Arrays.*;
import java.util.*;
public class Main {
static int n;
static int[] edges = new int[3];
static Scanner sc = new Scanner(System.in);
static void read() {
for (int i = 0; i < 3; i++) {
edges[i] = sc.nextInt();
}
}
static String solve() {
sort(edges);
int a, b, c;
a = edges[0];
b = edges[1];
c = edges[2];
if ((a * a + b * b) == (c * c)) {
return "YES";
} else {
return "NO";
}
}
public static void main(String[] args) {
n = sc.nextInt();
while (n-- > 0) {
System.out.println(solve());
}
}
}
|
/**
* @author yuichirw
*
*/
import static java.util.Arrays.*;
import java.util.*;
public class Main {
static int n;
static int[] edges = new int[3];
static Scanner sc = new Scanner(System.in);
static void read() {
for (int i = 0; i < 3; i++) {
edges[i] = sc.nextInt();
}
}
static String solve() {
sort(edges);
int a, b, c;
a = edges[0];
b = edges[1];
c = edges[2];
if ((a * a + b * b) == (c * c)) {
return "YES";
} else {
return "NO";
}
}
public static void main(String[] args) {
n = sc.nextInt();
while (n-- > 0) {
read();
System.out.println(solve());
}
}
}
|
[["+", 0, 52, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 25], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35]]
| 3
| 197
| 4
|
import java.util.Scanner;
public class Main {
Scanner sc = new Scanner(System.in);
void run() {
int n = sc.nextInt();
for (int i = 0; i < n; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if (a * a + b * b == c * c || a * a + c * c == b ||
a * a == b * b + c * c) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
public static void main(String[] args) {
Main m = new Main();
m.run();
}
}
|
import java.util.Scanner;
public class Main {
Scanner sc = new Scanner(System.in);
void run() {
int n = sc.nextInt();
for (int i = 0; i < n; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if (a * a + b * b == c * c || a * a + c * c == b * b ||
a * a == b * b + c * c) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
public static void main(String[] args) {
Main m = new Main();
m.run();
}
}
|
[["+", 0, 16, 31, 16, 12, 16, 12, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 12, 22]]
| 3
| 170
| 2
|
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(in.readLine());
for (int i = 0; i < T; i++) {
String[] sar = in.readLine().split(" ");
int[] side = new int[3];
for (int j = 0; j < 3; j++) {
side[j] = Integer.parseInt(sar[0]);
}
Arrays.sort(side);
if (side[0] * side[0] + side[1] * side[1] == side[2] * side[2]) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(in.readLine());
for (int i = 0; i < T; i++) {
String[] sar = in.readLine().split(" ");
int[] side = new int[3];
for (int j = 0; j < 3; j++) {
side[j] = Integer.parseInt(sar[j]);
}
Arrays.sort(side);
if (side[0] * side[0] + side[1] * side[1] == side[2] * side[2]) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[["-", 0, 11, 12, 492, 3, 4, 0, 504, 71, 499], ["+", 0, 11, 12, 492, 3, 4, 0, 504, 71, 22]]
| 3
| 218
| 2
|
import java.util.Scanner;
public class Main {
public static void main(String arg[]) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
for (int i = 0; i < n; i++) {
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
if (a * a == b * b + c * c)
System.out.println("Yes");
else if (b * b == a * a + c * c)
System.out.println("Yes");
else if (c * c == a * a + b * b)
System.out.println("Yes");
else
System.out.println("No");
}
}
}
|
import java.util.Scanner;
public class Main {
public static void main(String arg[]) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
for (int i = 0; i < n; i++) {
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
if (a * a == b * b + c * c)
System.out.println("YES");
else if (b * b == a * a + c * c)
System.out.println("YES");
else if (c * c == a * a + b * b)
System.out.println("YES");
else
System.out.println("NO");
}
}
}
|
[["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
| 3
| 176
| 8
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
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");
}
}
}
}
|
import java.util.Arrays;
import java.util.Scanner;
public class Main {
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[2]);
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");
}
}
}
}
|
[["-", 0, 11, 12, 492, 3, 4, 0, 504, 71, 499], ["+", 0, 11, 12, 492, 3, 4, 0, 504, 71, 499]]
| 3
| 221
| 2
|
#include <stdio.h>
void swapc(int *, int *);
int main() {
int a, b, c, n, i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
swapc(&a, &c);
swapc(&b, &c);
if (a * a + b * b == c * c) {
printf("YES\n");
} else {
printf("No\n");
}
}
return 0;
}
void swapc(int *x, int *c) {
int temp;
if (*x > *c) {
temp = *x;
*x = *c;
*c = temp;
}
}
|
#include <stdio.h>
void swapc(int *, int *);
int main() {
int a, b, c, n, i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
swapc(&a, &c);
swapc(&b, &c);
if (a * a + b * b == c * c) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
void swapc(int *x, int *c) {
int temp;
if (*x > *c) {
temp = *x;
*x = *c;
*c = temp;
}
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 168
| 2
|
#include <stdio.h>
int i, j, n, a[5], b[5];
int main() {
scanf("%d", n);
for (i = 0; i < n; i++) {
scanf("\n%d %d %d", &a[0], &a[1], &a[2]);
for (j = 0; j < 3; j++)
b[j] = a[j] * a[j];
if (b[0] == b[1] + b[2])
printf("YES\n");
else if (b[1] == b[2] + b[0])
printf("YES\n");
else if (b[2] == b[0] + b[1])
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
#include <stdio.h>
int i, j, n, a[5], b[5];
int main() {
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("\n%d %d %d", &a[0], &a[1], &a[2]);
for (j = 0; j < 3; j++)
b[j] = a[j] * a[j];
if (b[0] == b[1] + b[2])
printf("YES\n");
else if (b[1] == b[2] + b[0])
printf("YES\n");
else if (b[2] == b[0] + b[1])
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
| 0
| 192
| 1
|
#include <stdio.h>
int main() {
int n, i, j, m, tmp;
int a[3];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a[0], &a[1], &a[2]);
if (a[0] > a[1]) {
tmp = a[0];
a[0] = a[1];
a[1] = tmp;
}
if (a[0] > a[2]) {
tmp = a[0];
a[0] = a[2];
a[2] = tmp;
}
if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int n, i, j, m, tmp;
int a[3];
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a[0], &a[1], &a[2]);
if (a[0] < a[1]) {
tmp = a[0];
a[0] = a[1];
a[1] = tmp;
}
if (a[0] < a[2]) {
tmp = a[0];
a[0] = a[2];
a[2] = tmp;
}
if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 72], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 72]]
| 0
| 207
| 8
|
#include <stdio.h>
int main(void) {
int N;
int array[3];
int i;
int j;
int k;
int swap;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &array[0], &array[1], &array[2]);
for (j = 0; j < 2; j++) {
for (k = 0; k < 2; k++) {
if (array[k] > array[k + 1]) {
swap = array[k];
array[k] = array[k + 1];
array[k + 1] = swap;
}
}
}
if ((array[0] * array[0]) + (array[1] * array[1]) == array[2] * array[2]) {
printf("YES\n");
} else {
printf("No\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int N;
int array[3];
int i;
int j;
int k;
int swap;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &array[0], &array[1], &array[2]);
for (j = 0; j < 2; j++) {
for (k = 0; k < 2; k++) {
if (array[k] > array[k + 1]) {
swap = array[k];
array[k] = array[k + 1];
array[k + 1] = swap;
}
}
}
if ((array[0] * array[0]) + (array[1] * array[1]) == array[2] * array[2]) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 214
| 2
|
#include <stdio.h>
int main(void) {
int kosu = 0;
int a = 0, b = 0, c = 0;
scanf("%d", &kosu);
for (; kosu > 0; --kosu) {
scanf("%d%d%d", a, b, c);
if (a * a == b * b + c * c || b * b == a * a + c * c ||
c * c == a * a + b * b)
puts("YES");
else
puts("NO");
a = 0;
b = 0;
c = 0;
}
return (0);
}
|
#include <stdio.h>
int main(void) {
int kosu = 0;
int a = 0, b = 0, c = 0;
scanf("%d", &kosu);
for (; kosu > 0; --kosu) {
scanf("%d%d%d", &a, &b, &c);
if (a * a == b * b + c * c || b * b == a * a + c * c ||
c * c == a * a + b * b)
puts("YES");
else
puts("NO");
a = 0;
b = 0;
c = 0;
}
return (0);
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
| 0
| 132
| 3
|
#include <stdio.h>
typedef enum { FALSE, TRUE } bool_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 square(int input) { return input * input; }
// length[] should be sorted
// assuming number of elements of length[] is 3
bool_t alg(int *length) {
if (square(length[0]) == square(length[1]) + square(length[3]))
return TRUE;
else
return FALSE;
}
int main(void) {
bool_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;
}
|
#include <stdio.h>
typedef enum { FALSE, TRUE } bool_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 square(int input) { return input * input; }
// length[] should be sorted
// assuming number of elements of length[] is 3
bool_t alg(int *length) {
if (square(length[0]) == square(length[1]) + square(length[2]))
return TRUE;
else
return FALSE;
}
int main(void) {
bool_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;
}
|
[["-", 12, 16, 12, 2, 3, 4, 0, 69, 71, 13], ["+", 12, 16, 12, 2, 3, 4, 0, 69, 71, 13]]
| 0
| 265
| 2
|
#include <stdio.h>
int isRightTriangle(int a, int b, int c) {
int res = 0;
if (a <= b) {
if (b <= c) {
if (c * c == (a * a + b * b)) {
res = 1;
} else {
res = 0;
}
} else {
if (b * b == (a * a + c * c)) {
res = 1;
} else {
res = 0;
}
}
} else {
if (a <= c) {
if (c * c == (b * b + a * a)) {
res = 1;
} else {
res = 0;
}
} else {
if (a * a == (b * b + c * c)) {
res = 1;
} else {
res = 0;
}
}
}
return res;
}
int main(void) {
int i;
int n;
int a, b, c;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d%d%d", &a, &b, &c);
if (isRightTriangle(a, b, c)) {
printf("Yes\n");
} else {
printf("No\n");
}
}
return 0;
}
|
#include <stdio.h>
int isRightTriangle(int a, int b, int c) {
int res = 0;
if (a <= b) {
if (b <= c) {
if (c * c == (a * a + b * b)) {
res = 1;
} else {
res = 0;
}
} else {
if (b * b == (a * a + c * c)) {
res = 1;
} else {
res = 0;
}
}
} else {
if (a <= c) {
if (c * c == (b * b + a * a)) {
res = 1;
} else {
res = 0;
}
} else {
if (a * a == (b * b + c * c)) {
res = 1;
} else {
res = 0;
}
}
}
return res;
}
int main(void) {
int i;
int n;
int a, b, c;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d%d%d", &a, &b, &c);
if (isRightTriangle(a, b, c)) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 269
| 4
|
#include <stdio.h>
void swap(long *a, long *b) {
long tmp;
tmp = *a;
*a = *b;
*b = tmp;
}
int main() {
long n, a, b, c;
long i;
scanf("%ld", &n);
for (i = 0; i < n; i++) {
scanf("%ld %ld %ld", &a, &b, &c);
if (a < b)
swap(&a, &b);
if (a < c)
swap(&a, &c);
if (b < c)
swap(&a, &c);
if (b * b + c * c == a * a) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
void swap(long *a, long *b) {
long tmp;
tmp = *a;
*a = *b;
*b = tmp;
}
int main() {
long n, a, b, c;
long i;
scanf("%ld", &n);
for (i = 0; i < n; i++) {
scanf("%ld %ld %ld", &a, &b, &c);
if (a < b)
swap(&a, &b);
if (a < c)
swap(&a, &c);
if (b < c)
swap(&b, &c);
if (b * b + c * c == a * a) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["+", 64, 1, 0, 2, 3, 4, 0, 66, 28, 22]]
| 0
| 176
| 2
|
#include <stdio.h>
int main(int argc, const char *argv[]) {
int a, b, c, n, c2, ab, i, tmp;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a > c) {
tmp = a;
a = c;
c = tmp;
} else if (b > c) {
tmp = b;
b = c;
c = tmp;
}
c2 = c * c;
ab = a * a + b * b;
if (ab != c2) {
printf("NO\n");
} else {
printf("YES\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(int argc, const char *argv[]) {
int a, b, c, n, c2, ab, i, tmp;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a > c) {
tmp = a;
a = c;
c = tmp;
}
if (b > c) {
tmp = b;
b = c;
c = tmp;
}
c2 = c * c;
ab = a * a + b * b;
if (ab != c2) {
printf("NO\n");
} else {
printf("YES\n");
}
}
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]]
| 0
| 162
| 1
|
#include <stdio.h>
int main() {
int a[1000][3], i, n, j, t, b;
scanf("%d", &n);
for (i = 0; i < n; i++) {
for (j = 0; j < 3; j++) {
scanf("%d", &a[i][j]);
}
for (b = 0; b < 2; b++) {
for (j = 2; j > b; j--) {
if (a[i][j] < a[i][j - 1]) {
t = a[i][j];
a[i][j] = a[i][j - 1];
a[i][j - 1] = t;
}
}
}
if ((a[i][2] * a[i][2]) == (a[i][0] * a[i][0]) + (a[i][1] * a[i][1])) {
printf("yes\n");
} else {
printf("no\n");
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int a[1000][3], i, n, j, t, b;
scanf("%d", &n);
for (i = 0; i < n; i++) {
for (j = 0; j < 3; j++) {
scanf("%d", &a[i][j]);
}
for (b = 0; b < 2; b++) {
for (j = 2; j > b; j--) {
if (a[i][j] < a[i][j - 1]) {
t = a[i][j];
a[i][j] = a[i][j - 1];
a[i][j - 1] = t;
}
}
}
if ((a[i][2] * a[i][2]) == (a[i][0] * a[i][0]) + (a[i][1] * a[i][1])) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 255
| 4
|
#include <stdio.h>
int main(void) {
int j, N, len[3], a[3], b[3], i;
scanf("%d", &N);
for (j = 0; j < N; j++) {
scanf("%d%d%d", &len[0], &len[1], &len[2]);
for (i = 0; i < 3; i++) {
a[i] = len[i] * len[i];
}
b[0] = a[0] + a[1];
b[1] = a[0] + a[2];
b[2] = a[1] + a[2];
if (b[0] == a[2] || b[1] == a[1] || b[2] == a[0]) {
printf("YES");
} else {
printf("NO");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int j, N, len[3], a[3], b[3], i;
scanf("%d", &N);
for (j = 0; j < N; j++) {
scanf("%d%d%d", &len[0], &len[1], &len[2]);
for (i = 0; i < 3; i++) {
a[i] = len[i] * len[i];
}
b[0] = a[0] + a[1];
b[1] = a[0] + a[2];
b[2] = a[1] + a[2];
if (b[0] == a[2] || b[1] == a[1] || b[2] == a[0]) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 210
| 2
|
#include <stdio.h>
int main(void) {
int n;
int a, b, c;
int i;
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 * b == b * b) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return (0);
}
|
#include <stdio.h>
int main(void) {
int n;
int a, b, c;
int i;
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);
}
|
[["-", 15, 23, 0, 16, 31, 16, 12, 16, 12, 22], ["+", 15, 23, 0, 16, 31, 16, 12, 16, 12, 22]]
| 0
| 153
| 2
|
#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);
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;
}
|
#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);
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;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 129
| 4
|
#include <stdio.h>
int main(void) {
int h[3][1000], n, i, temp;
scanf("%d", &i);
for (n = 0; n < i; n++) {
scanf("%d %d %d", &h[0][n], &h[1][n], &h[2][n]);
if (h[0][n] <= h[1][n]) {
temp = h[0][n];
h[0][n] = h[1][n];
h[1][n] = temp;
}
if (h[0][n] <= h[2][n]) {
temp = h[0][n];
h[0][n] = h[2][n];
h[2][n] = temp;
}
}
for (n = 0; n < i; n++) {
if ((h[0][n] * h[0][n]) == (h[1][n] * h[1][n] + h[2][n] * h[2][n])) {
printf("YES");
} else
printf("NO");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int h[3][1000], n, i, temp;
scanf("%d", &i);
for (n = 0; n < i; n++) {
scanf("%d %d %d", &h[0][n], &h[1][n], &h[2][n]);
if (h[0][n] <= h[1][n]) {
temp = h[0][n];
h[0][n] = h[1][n];
h[1][n] = temp;
}
if (h[0][n] <= h[2][n]) {
temp = h[0][n];
h[0][n] = h[2][n];
h[2][n] = temp;
}
}
for (n = 0; n < i; n++) {
if ((h[0][n] * h[0][n]) == (h[1][n] * h[1][n] + h[2][n] * h[2][n])) {
printf("YES\n");
} else
printf("NO\n");
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 284
| 2
|
#include <math.h>
#include <stdio.h>
int main(void) {
int i, j, t, e;
double x;
int san[3];
scanf("%d", &t);
for (e = 0; e < t; e++) {
for (i = 0; i < 3; i++) {
scanf("%d", &san[i]);
}
for (i = 0; i < 3; i++) {
for (j = i + 1; j < 3; j++) {
if (san[i] < san[j]) {
t = san[i];
san[i] = san[j];
san[j] = t;
}
}
}
x = sqrt(pow(san[1], 2) + pow(san[2], 2));
if (san[0] == x)
puts("YES");
else
puts("NO");
}
return 0;
}
|
#include <math.h>
#include <stdio.h>
int main(void) {
int i, j, t, e, y;
double x;
int san[3];
scanf("%d", &t);
for (e = 0; e < t; e++) {
for (i = 0; i < 3; i++) {
scanf("%d", &san[i]);
}
for (i = 0; i < 3; i++) {
for (j = i + 1; j < 3; j++) {
if (san[i] < san[j]) {
y = san[i];
san[i] = san[j];
san[j] = y;
}
}
}
x = sqrt(pow(san[1], 2) + pow(san[2], 2));
if (san[0] == x)
puts("YES");
else
puts("NO");
}
return 0;
}
|
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22]]
| 0
| 204
| 6
|
#include <stdio.h>
int main(void) {
int n, i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
int a, b, c;
int s;
scanf("%d %d %d", &a, &b, &c);
a *= a;
b *= b;
c *= c;
s = a + b + c;
if (s == 2 * a || s == 2 * b || s == 2 * c) {
printf("Yes\n");
} else {
printf("No\n");
}
}
return (0);
}
|
#include <stdio.h>
int main(void) {
int n, i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
int a, b, c;
int s;
scanf("%d %d %d", &a, &b, &c);
a *= a;
b *= b;
c *= c;
s = a + b + c;
if (s == 2 * a || s == 2 * b || s == 2 * c) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return (0);
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 131
| 4
|
#include <stdio.h>
int main(void) {
int x, y, z, n, i;
scanf("%d", &n);
for (i = 0; i <= n; i++) {
scanf("%d %d %d", &x, &y, &z);
if (x * x + y * y == z * z || x * x + z * z == y * y ||
y * y + z * z == x * x) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int x, y, z, n, i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &x, &y, &z);
if (x * x + y * y == z * z || x * x + z * z == y * y ||
y * y + z * z == x * x) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
| 0
| 123
| 2
|
#include <stdio.h>
int main() {
int num, n[3];
int i, j, max, sum;
scanf("%d", &num);
for (i = 0; i < num; i++) {
if (scanf("%d %d %d", &n[0], &n[1], &n[2]) == EOF) {
break;
}
max = 0;
sum = 0;
for (j = 0; j < 3; j++) {
if (max < n[i]) {
max = n[i];
}
sum += n[i] * n[i];
}
if (sum == (max * max) * 2) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int num, n[3];
int i, j, max, sum;
scanf("%d", &num);
for (i = 0; i < num; i++) {
if (scanf("%d %d %d", &n[0], &n[1], &n[2]) == EOF) {
break;
}
max = 0;
sum = 0;
for (j = 0; j < 3; j++) {
if (max < n[j]) {
max = n[j];
}
sum += n[j] * n[j];
}
if (sum == (max * max) * 2) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 69, 71, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 69, 71, 22], ["-", 0, 1, 0, 11, 12, 16, 31, 69, 71, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 69, 71, 22], ["-", 0, 1, 0, 11, 12, 16, 12, 69, 71, 22], ["+", 0, 1, 0, 11, 12, 16, 12, 69, 71, 22]]
| 0
| 172
| 8
|
#include <stdio.h>
int main() {
int a[3];
int n;
int i, j;
int tmp;
scanf("%d", &n);
while (n > 0) {
scanf("%d %d %d", &a[0], &a[1], &a[2]);
for (i = 0; i < 3; i++) {
for (j = 3; j > i; j--) {
if (a[j] < a[j - 1]) {
tmp = a[j];
a[j] = a[j - 1];
a[j - 1] = tmp;
}
}
}
if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
printf("YES\n");
else
printf("NO\n");
n--;
}
return 0;
}
|
#include <stdio.h>
int main() {
int a[3];
int n;
int i, j;
int tmp;
scanf("%d", &n);
while (n > 0) {
scanf("%d %d %d", &a[0], &a[1], &a[2]);
for (i = 0; i < 3; i++) {
for (j = 2; j > i; j--) {
if (a[j] < a[j - 1]) {
tmp = a[j];
a[j] = a[j - 1];
a[j - 1] = tmp;
}
}
}
if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
printf("YES\n");
else
printf("NO\n");
n--;
}
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]]
| 0
| 197
| 2
|
// Triangle
#include <stdio.h>
int main(void) {
int i, a, b, c, n;
scanf("%d", &n);
for (i = 0; i < n; 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;
}
|
// Triangle
#include <stdio.h>
int main(void) {
int i, a, b, c, n;
scanf("%d", &n);
for (i = 0; i < n; 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;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 124
| 4
|
#include <stdio.h>
int main() {
int n;
int a, b, c;
int i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
a *= a;
b *= b;
c *= c;
if (a == b + c || b == a + c || c == a + b)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}
|
#include <stdio.h>
int main() {
int n;
int a, b, c;
int i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
a *= a;
b *= b;
c *= c;
if (a == b + c || b == a + c || c == a + b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 114
| 4
|
#include <stdio.h>
int main(void) {
long long i, n, a, b, c;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
if (a * a + b * b == c * c || c * c + a * a == b * b ||
b * b + c * c == a * a)
printf("YES\n");
else
printf("NO\n");
}
}
|
#include <stdio.h>
int main(void) {
int i, n, a, b, c;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
if (a * a + b * b == c * c || c * c + a * a == b * b ||
b * b + c * c == a * a)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]]
| 0
| 131
| 6
|
#include <stdio.h>
int main() {
int N, i;
double a, b, c, d, obliqueline, baseline, height;
scanf("%d", &N);
for (i = 1; i <= N; i++) {
scanf("%d %d %lf", &baseline, &height, &obliqueline);
a = pow(baseline, 2);
b = pow(height, 2);
d = pow(obliqueline, 2);
c = sqrt(a + b);
if (c == obliqueline) {
printf("YES\n");
} else if ((c = sqrt(a + d)) == height) {
printf("YES\n");
} else if ((c = sqrt(b + d)) == baseline) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int N, i;
double a, b, c, d, obliqueline, baseline, height;
scanf("%d", &N);
for (i = 1; i <= N; i++) {
scanf("%lf %lf %lf", &baseline, &height, &obliqueline);
a = pow(baseline, 2);
b = pow(height, 2);
d = pow(obliqueline, 2);
c = sqrt(a + b);
if (c == obliqueline) {
printf("YES\n");
} else if ((c = sqrt(a + d)) == height) {
printf("YES\n");
} else if ((c = sqrt(b + d)) == baseline) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 187
| 2
|
#include <stdio.h>
int main(void) {
int a, b, c, N;
int i;
int tmp;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a > b) {
tmp = a;
a = b;
b = tmp;
}
if (b > c) {
tmp = b;
b = c;
c = tmp;
}
if (a > b) {
tmp = a;
a = b;
b = tmp;
}
if (a * a + b * b == c * c)
puts("Yes");
else
puts("No");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int a, b, c, N;
int i;
int tmp;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a > b) {
tmp = a;
a = b;
b = tmp;
}
if (b > c) {
tmp = b;
b = c;
c = tmp;
}
if (a > b) {
tmp = a;
a = b;
b = tmp;
}
if (a * a + b * b == c * c)
puts("YES");
else
puts("NO");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 157
| 4
|
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int a, b, c, n;
scanf("%d", &n);
while (n > 0) {
scanf("%d %d %d", &a, &b, &c);
if (a >= b && a >= c) {
if (a * a == b * b + c * c)
printf("Yes\n");
else
printf("No\n");
} else if (b >= a && b >= c) {
if (b * b == a * a + c * c)
printf("Yes\n");
else
printf("No\n");
} else if (c >= a && c >= a) {
if (c * c == b * b + a * a)
printf("Yes\n");
else
printf("No\n");
}
n--;
}
return 0;
}
|
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int a, b, c, n;
scanf("%d", &n);
while (n > 0) {
scanf("%d %d %d", &a, &b, &c);
if (a >= b && a >= c) {
if (a * a == b * b + c * c)
printf("YES\n");
else
printf("NO\n");
} else if (b >= a && b >= c) {
if (b * b == a * a + c * c)
printf("YES\n");
else
printf("NO\n");
} else if (c >= a && c >= a) {
if (c * c == b * b + a * a)
printf("YES\n");
else
printf("NO\n");
}
n--;
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 193
| 12
|
#include <stdio.h>
#include <stdlib.h>
int main() {
int i, n;
int 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 == a * a + c * c ||
c * c == a * a + b * b)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
int main() {
int i, n;
int 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 == a * a + c * c ||
c * c == a * a + b * b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 121
| 4
|
#include <stdio.h>
void swap(int *a, int *b);
int main(void) {
int n, a, b, c;
int i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d%d%d", &a, &b, &c);
if (a < b) {
swap(&a, &b);
}
if (a < c) {
swap(&a, &c);
}
if (a * a == b * b + c * c) {
printf("Yes\n");
} else {
printf("No\n");
}
}
return 0;
}
void swap(int *a, int *b) {
int temp;
temp = *a;
*a = *b;
*b = temp;
}
|
#include <stdio.h>
void swap(int *a, int *b);
int main(void) {
int n, a, b, c;
int i;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d%d%d", &a, &b, &c);
if (a < b) {
swap(&a, &b);
}
if (a < c) {
swap(&a, &c);
}
if (a * a == b * b + c * c) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
void swap(int *a, int *b) {
int temp;
temp = *a;
*a = *b;
*b = temp;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 178
| 4
|
#include <stdio.h>
int main(void) {
int N, i, a, b, c;
scanf("%d", &N);
for (i = 1; i == N; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a * a == b * b + c * c || b * b == a * a + c * c ||
c * c == a * a + b * b) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int N, i, a, b, c;
scanf("%d", &N);
for (i = 1; i <= N; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a * a == b * b + c * c || b * b == a * a + c * c ||
c * c == a * a + b * b) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 60], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
| 0
| 123
| 2
|
/*
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003
Is it a Right Triangle?
*/
#include <stdio.h>
int main(void) {
int a, b, c;
int n, i;
scanf("%d", &n);
for (i = 0; i < n && i < 1000; 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;
}
|
/*
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003
Is it a Right Triangle?
*/
#include <stdio.h>
int main(void) {
int a, b, c;
int n, i;
scanf("%d", &n);
for (i = 0; i < n && i < 1000; 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;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 129
| 4
|
#include <stdio.h>
int main() {
int i, loop, h, w, s;
scanf("%d", &loop);
for (i = 0; i < loop; i++) {
scanf("%d %d %d", &h, &w, &s);
if ((h * h == w * w + s * s || w * w == h * h + s * s ||
s * s == w * w + h * h))
printf("Yes\n");
else
printf("No\n");
}
return 0;
}
|
#include <stdio.h>
int main() {
int i, loop, h, w, s;
scanf("%d", &loop);
for (i = 0; i < loop; i++) {
scanf("%d %d %d", &h, &w, &s);
if ((h * h == w * w + s * s || w * w == h * h + s * s ||
s * s == w * w + h * h))
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 120
| 4
|
#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);
if (a > b) {
if (a > c) {
if (a * a == b * b + c * c)
printf("YES\n");
else
printf("NO\n");
} else {
if (c * c == a * a + b * b)
printf("YES\n");
else
printf("NO\n");
}
} else {
if (b > c) {
if (b * b == a * a + c * c)
printf("YES\n");
else
printf("NO");
} else {
if (c * c == a * a + b * b)
printf("YES\n");
else
printf("NO\n");
}
}
}
return 0;
}
|
#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);
if (a > b) {
if (a > c) {
if (a * a == b * b + c * c)
printf("YES\n");
else
printf("NO\n");
} else {
if (c * c == a * a + b * b)
printf("YES\n");
else
printf("NO\n");
}
} else {
if (b > c) {
if (b * b == a * a + c * c)
printf("YES\n");
else
printf("NO\n");
} else {
if (c * c == a * a + b * b)
printf("YES\n");
else
printf("NO\n");
}
}
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 220
| 1
|
#include <stdio.h>
int main(void) {
int n, i;
int 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;
}
|
#include <stdio.h>
int main(void) {
int n, i;
int 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;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 142
| 8
|
#include <stdio.h>
int main(void) {
int N, i, a, b, c, d;
scanf("%d\n", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d\n", &a, &b, &c);
if (a > b)
d = a, a = b, b = d;
if (b > c)
d = b, b = c, c = d;
if (c * c == a * a + b * b)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int N, i, a, b, c, d;
scanf("%d\n", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d\n", &a, &b, &c);
if (a > b)
d = a, a = b, b = d;
if (b > c)
d = b, b = c, c = d;
if (c * c == a * a + b * b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 135
| 4
|
#include <stdio.h>
#include <stdlib.h>
int comp(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
int x;
int num[3];
int i;
scanf("%d", &x);
for (i = 0; i < x; i++) {
scanf("%d %d %d", &num[0], &num[1], &num[2]);
}
qsort(num, 3, sizeof(int), comp);
if (num[0] * num[0] + num[1] * num[1] == num[2] * num[2])
printf("YES\n");
else
printf("NO\n");
return (0);
}
|
#include <stdio.h>
#include <stdlib.h>
int comp(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
int x;
int num[3];
int i;
scanf("%d", &x);
for (i = 0; i < x; i++) {
scanf("%d %d %d", &num[0], &num[1], &num[2]);
qsort(num, 3, sizeof(int), comp);
if (num[0] * num[0] + num[1] * num[1] == num[2] * num[2])
printf("YES\n");
else
printf("NO\n");
}
return (0);
}
|
[["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
| 0
| 170
| 2
|
#include <stdio.h>
/*
??´?§?????§???¢
3????????£?????´??°?????\?????????????????????????????????3?????¨??????????§???¢?????´?§?????§???¢??§????????´?????????
YES ??????????????´????????? NO
??¨????????????????????°?????????????????????????????????
Input
?????°?????????????????????????????????????????????1?????????????????????????????°???
N ?????????????????????????¶??????? N
????????\?????????????????????????????????3????????´??°???1????????????????????§????????????????????????????????????
Constraints
1 ? 1???????????? ? 1,000
N ? 1,000
Output
??????????????????????????¨??????YES ????????? NO
???1??????????????????????????????
*/
int main(void) {
int a, b, c, w, num, i;
scanf("%d", &num);
for (i = 0; i < num; i++) {
scanf("%d %d", &a, &b, &c);
if (a < b) {
w = a;
a = b;
b = w;
}
if (a < c) {
w = a;
a = c;
c = w;
}
if ((a * a) == ((b * b) + (c * c))) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
/*
??´?§?????§???¢
3????????£?????´??°?????\?????????????????????????????????3?????¨??????????§???¢?????´?§?????§???¢??§????????´?????????
YES ??????????????´????????? NO
??¨????????????????????°?????????????????????????????????
Input
?????°?????????????????????????????????????????????1?????????????????????????????°???
N ?????????????????????????¶??????? N
????????\?????????????????????????????????3????????´??°???1????????????????????§????????????????????????????????????
Constraints
1 ? 1???????????? ? 1,000
N ? 1,000
Output
??????????????????????????¨??????YES ????????? NO
???1??????????????????????????????
*/
int main(void) {
int a, b, c, w, num, i;
scanf("%d", &num);
for (i = 0; i < num; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a < b) {
w = a;
a = b;
b = w;
}
if (a < c) {
w = a;
a = c;
c = w;
}
if ((a * a) == ((b * b) + (c * c))) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 150
| 2
|
#include <stdio.h>
int main(void) {
int a, b, c, num, i, tmp;
scanf("%d", num);
for (i = 0; i < num; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a < b) {
tmp = a;
a = b;
b = tmp;
}
if (a < c) {
tmp = a;
a = c;
c = tmp;
}
if (a * a == b * b + c * c) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int a, b, c, num, i, tmp;
scanf("%d", &num);
for (i = 0; i < num; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a < b) {
tmp = a;
a = b;
b = tmp;
}
if (a < c) {
tmp = a;
a = c;
c = tmp;
}
if (a * a == b * b + c * c) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
| 0
| 140
| 1
|
#include <stdio.h>
int main(void) {
int a, b, c, i, n;
scanf("%d", &n);
for (i = 0; i <= n; i++) {
scanf("%d %d %d", &a, &b, &c);
if (((a * a) + (b * b)) == (c * c) || ((a * a) + (c * c)) == (b * b) ||
((c * c) + (b * b)) == (a * a)) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return (0);
}
|
#include <stdio.h>
int main(void) {
int a, b, c, i, n;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
if (((a * a) + (b * b)) == (c * c) || ((a * a) + (c * c)) == (b * b) ||
((c * c) + (b * b)) == (a * a)) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return (0);
}
|
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
| 0
| 149
| 2
|
#include <stdio.h>
int main(void) {
int x, tri[3], i, j, maxi, n;
scanf("%d", &n);
for (i = 0; i < n; i++) {
maxi = 0;
x = 0;
for (j = 0; j < 3; j++) {
scanf("%d", &tri[i]);
tri[i] *= tri[i];
if (tri[maxi] < tri[i]) {
maxi = j;
}
}
for (j = 0; j < 3; j++) {
if (j != maxi) {
x += tri[j];
}
}
if (tri[maxi] == x) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int x, tri[3], i, j, maxi, n;
scanf("%d", &n);
for (i = 0; i < n; i++) {
maxi = 0;
x = 0;
for (j = 0; j < 3; j++) {
scanf("%d", &tri[j]);
tri[j] *= tri[j];
if (tri[maxi] < tri[j]) {
maxi = j;
}
}
for (j = 0; j < 3; j++) {
if (j != maxi) {
x += tri[j];
}
}
if (tri[maxi] == x) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 2, 3, 4, 0, 66, 28, 69, 71, 22], ["+", 0, 2, 3, 4, 0, 66, 28, 69, 71, 22], ["-", 8, 9, 0, 1, 0, 11, 31, 69, 71, 22], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 71, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 69, 71, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 69, 71, 22], ["-", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22]]
| 0
| 177
| 8
|
#include <stdio.h>
int main() {
int a, b, c, d, i, j;
scanf("%d\n", &d);
for (i = 1; i < d; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a < b) {
j = a;
a = b;
b = j;
}
if (a < c) {
j = a;
a = c;
c = j;
}
if (a * a == b * b + c * c)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
#include <stdio.h>
int main() {
int a, b, c, d, i, j;
scanf("%d\n", &d);
for (i = 0; i < d; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a < b) {
j = a;
a = b;
b = j;
}
if (a < c) {
j = a;
a = c;
c = j;
}
if (a * a == b * b + c * c)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
| 0
| 137
| 2
|
#include <stdio.h>
int main(void) {
int a, b, c, i, n;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
a = a * a;
b = b * b;
c = c * c;
if (a + b == c || b + c == a || c + a == b)
printf("YES");
else
printf("NO");
}
}
|
#include <stdio.h>
int main(void) {
int a, b, c, i, n;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
a = a * a;
b = b * b;
c = c * c;
if (a + b == c || b + c == a || c + a == b)
printf("YES\n");
else
printf("NO\n");
}
}
|
[["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 114
| 2
|
#include <stdio.h>
int main(void) {
int a, b, c, n, i;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%d %d %d", &a, &b, &c);
a *= a;
b *= b;
c *= c;
if (a + b == c || b + c == a || c + a == b)
printf("YES");
else
printf("NO");
}
}
|
#include <stdio.h>
int main(void) {
int a, b, c, n, i;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%d %d %d", &a, &b, &c);
a *= a;
b *= b;
c *= c;
if (a + b == c || b + c == a || c + a == b)
printf("YES\n");
else
printf("NO\n");
}
}
|
[["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 108
| 2
|
#include <stdio.h>
int main(void) {
int i, N;
int a, b, c, a2, b2, c2;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &a, &b, &c);
a2 = a * a;
b2 = b * b;
c2 = c * c;
if (a2 == b2 + c2 || b2 == c2 + a2 || c2 == a2 + b2) {
printf("Yes\n");
} else {
printf("No\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int i, N;
int a, b, c, a2, b2, c2;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &a, &b, &c);
a2 = a * a;
b2 = b * b;
c2 = c * c;
if (a2 == b2 + c2 || b2 == c2 + a2 || c2 == a2 + b2) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 130
| 4
|
#include <stdio.h>
int main(void) {
int N, a, b, c, i, k;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a > b) {
k = a;
a = b;
b = k;
}
if (b > c) {
k = b;
b = c;
c = k;
}
if (c * c == a * a + b * b) {
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
}
}
|
#include <stdio.h>
int main(void) {
int N, a, b, c, i, k;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a > b) {
k = a;
a = b;
b = k;
}
if (b > c) {
k = b;
b = c;
c = k;
}
if (c * c == a * a + b * b) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
| 0
| 141
| 2
|
#include <stdio.h>
int main(void) {
int n;
int i;
int 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) {
puts("Yes\n");
} else {
puts("No\n");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int n;
int i;
int 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) {
puts("YES");
} else {
puts("NO");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 125
| 6
|
#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);
if (a * a == b * b + c * c || b * b == a * a + c * c ||
c * c == a * a + b * b)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}
|
#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);
if (a * a == b * b + c * c || b * b == a * a + c * c ||
c * c == a * a + b * b)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 119
| 10
|
main() {
int n, a, b, c, t;
scanf("%d", &n);
while (n--) {
scanf("%d%d%d", &a, &b, &c);
if (a > c)
t = a, a = c, c = t;
if (b > c)
t = b, b = c, b = t;
if (a * a + b * b == c * c)
puts("YES");
else
puts("NO");
}
exit(0);
}
|
main() {
int n, a, b, c, t;
scanf("%d", &n);
while (n--) {
scanf("%d%d%d", &a, &b, &c);
if (a > c)
t = a, a = c, c = t;
if (b > c)
t = b, b = c, c = t;
if (a * a + b * b == c * c)
puts("YES");
else
puts("NO");
}
exit(0);
}
|
[["-", 64, 1, 0, 34, 12, 34, 12, 11, 31, 22], ["+", 64, 1, 0, 34, 12, 34, 12, 11, 31, 22]]
| 0
| 119
| 2
|
#include <stdio.h>
int main(void) {
int n, a, b, c, i;
scanf("%d", &n);
for (i = 0; i < n; 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");
} else {
printf("NO");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int n, a, b, c, i;
scanf("%d", &n);
for (i = 0; i < n; 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;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 127
| 2
|
#include <stdio.h>
int max_return(int a, int b, int c) {
int max;
max = a;
if (max < b)
max = b;
if (max < c)
max = c;
return max;
}
int main() {
int n, nn;
int a[10000], b[10000], c[10000], d[10000], e;
scanf("%d", &n);
for (nn = 0; nn < n; nn++) {
scanf("%d %d %d", &a[nn], &b[nn], &c[nn]);
d[nn] = max_return(a[nn], b[nn], c[nn]);
if (a[nn] == d[nn]) {
a[nn] = 0;
goto out;
}
if (b[nn] == d[nn]) {
b[nn] = 0;
goto out;
}
if (c[nn] == d[nn]) {
c[nn] = 0;
goto out;
}
}
out:
for (nn = 0; nn < n; nn++) {
if (d[nn] * d[nn] == a[nn] * a[nn] + b[nn] * b[nn] + c[nn] * c[nn]) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
int max_return(int a, int b, int c) {
int max;
max = a;
if (max < b)
max = b;
if (max < c)
max = c;
return max;
}
int main() {
int n, nn;
int a[10000], b[10000], c[10000], d[10000], e;
scanf("%d", &n);
for (nn = 0; nn < n; nn++) {
scanf("%d %d %d", &a[nn], &b[nn], &c[nn]);
d[nn] = max_return(a[nn], b[nn], c[nn]);
if (a[nn] == d[nn]) {
a[nn] = 0;
goto out;
}
if (b[nn] == d[nn]) {
b[nn] = 0;
goto out;
}
if (c[nn] == d[nn]) {
c[nn] = 0;
goto out;
}
out:;
}
for (nn = 0; nn < n; nn++) {
if (d[nn] * d[nn] == a[nn] * a[nn] + b[nn] * b[nn] + c[nn] * c[nn]) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 97, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
| 0
| 308
| 3
|
a, b, c, n;
main() {
for (scanf("%d", &n); n--;
puts(a + b - c & a + c - b & b + c - a ? "NO" : "YES")) {
scanf("%d%d%d", &a, &b, &c);
a *= a;
b *= b;
c *= c;
}
exit(0);
}
|
a, b, c, n;
main() {
for (scanf("%d", &n); n--;
puts(a + b - c && a + c - b && b + c - a ? "NO" : "YES")) {
scanf("%d%d%d", &a, &b, &c);
a *= a;
b *= b;
c *= c;
}
exit(0);
}
|
[["-", 3, 4, 0, 41, 15, 16, 31, 16, 17, 67], ["+", 3, 4, 0, 41, 15, 16, 31, 16, 17, 98], ["-", 26, 2, 3, 4, 0, 41, 15, 16, 17, 67], ["+", 26, 2, 3, 4, 0, 41, 15, 16, 17, 98]]
| 0
| 93
| 4
|
main(a, b, c) {
for (scanf("%*d"); ~scanf("%d%d%d", &a, &b, &c);
puts(a * a + b * b - c * c && a * a - b * b + c * c &&
b * b + c * c - a * a
? "No"
: "Yes"))
;
}
|
main(a, b, c) {
for (scanf("%*d"); ~scanf("%d%d%d", &a, &b, &c);
puts(a * a + b * b - c * c && a * a - b * b + c * c &&
b * b + c * c - a * a
? "NO"
: "YES"))
;
}
|
[["-", 26, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["+", 26, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["-", 26, 2, 3, 4, 0, 41, 75, 5, 0, 6], ["+", 26, 2, 3, 4, 0, 41, 75, 5, 0, 6]]
| 0
| 85
| 4
|
#include <math.h>
#include <stdio.h>
int isRightTriangle(int a, int b, int c) {
if (a * a == b * b + c * c) {
return 1;
}
return 0;
}
int isRT(int a, int b, int c) {
return isRightTriangle(a, b, c) || isRightTriangle(b, c, a) ||
isRightTriangle(c, a, b);
}
int main() {
int n, m, i;
int a, b, c;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
if (isRT(a, b, c))
puts("yes");
else
puts("no");
}
return 0;
}
|
#include <math.h>
#include <stdio.h>
int isRightTriangle(int a, int b, int c) {
if (a * a == b * b + c * c) {
return 1;
}
return 0;
}
int isRT(int a, int b, int c) {
return isRightTriangle(a, b, c) || isRightTriangle(b, c, a) ||
isRightTriangle(c, a, b);
}
int main() {
int n, m, i;
int a, b, c;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d %d", &a, &b, &c);
if (isRT(a, b, c))
puts("YES");
else
puts("NO");
}
return 0;
}
|
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 172
| 4
|
#include <stdio.h>
int main(void) {
int a, b, c, s, temp, f1;
scanf("%d", &s);
for (f1 = 0; f1 < s; f1++) {
scanf("%d %d %d", &a, &b, &c);
if (a < b) {
temp = a;
a = b;
b = temp;
} else if (a < c) {
temp = a;
a = c;
c = temp;
}
if (a * a == b * b + c * c)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int a, b, c, s, temp, f1;
scanf("%d", &s);
for (f1 = 0; f1 < s; f1++) {
scanf("%d %d %d", &a, &b, &c);
if (a < b) {
temp = a;
a = b;
b = temp;
}
if (a < c) {
temp = a;
a = c;
c = temp;
}
if (a * a == b * b + c * c)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]]
| 0
| 138
| 1
|
#include <stdio.h>
int main() {
int x, N, L1, L2, L3, max, kaitou[1000] = {0};
scanf("%d", &N);
for (x = 0; x < N; x++) {
max = 1;
scanf("%d %d %d", &L1, &L2, &L3);
if (L1 < L2) {
max = 2;
if (L2 < L3)
max = 3;
}
if (L1 < L3)
max = 3;
if (max == 1) {
if (L1 * L1 == L2 * L2 + L3 * L3)
kaitou[x] = 1;
else
kaitou[x] = 2;
}
if (max == 2) {
if (L2 * L2 == L1 * L1 + L3 * L3)
kaitou[x] = 1;
else
kaitou[x] = 2;
}
if (max == 3) {
if (L3 * L3 == L2 * L2 + L1 * L1)
kaitou[x] = 1;
else
kaitou[x] = 2;
}
}
for (x = 0; x < 1000; x++) {
if (kaitou[x] == 0)
break;
if (kaitou[x] == 1)
printf("YES\n");
if (kaitou[x] == 2)
printf("NO\n");
}
return 0;
}
|
#include <stdio.h>
int main() {
int x, N, L1, L2, L3, max, kaitou[1000] = {0};
scanf("%d", &N);
for (x = 0; x < N; x++) {
max = 1;
scanf("%d %d %d", &L1, &L2, &L3);
if (L1 < L2) {
max = 2;
if (L2 < L3)
max = 3;
} else if (L1 < L3)
max = 3;
if (max == 1) {
if (L1 * L1 == L2 * L2 + L3 * L3)
kaitou[x] = 1;
else
kaitou[x] = 2;
}
if (max == 2) {
if (L2 * L2 == L1 * L1 + L3 * L3)
kaitou[x] = 1;
else
kaitou[x] = 2;
}
if (max == 3) {
if (L3 * L3 == L2 * L2 + L1 * L1)
kaitou[x] = 1;
else
kaitou[x] = 2;
}
}
for (x = 0; x < 1000; x++) {
if (kaitou[x] == 0)
break;
if (kaitou[x] == 1)
printf("YES\n");
if (kaitou[x] == 2)
printf("NO\n");
}
return 0;
}
|
[["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]]
| 0
| 281
| 1
|
#include <stdio.h>
int main(void) {
unsigned N = 0;
unsigned a[1001] = {0}, b[1001] = {0}, c[1001] = {0};
unsigned soto = 0;
unsigned i = 0;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &a[i], &b[i], &c[i]);
if (a[i] < b[i]) {
soto = a[i];
a[i] = b[i];
b[i] = soto;
}
if (a[i] < c[i]) {
soto = a[i];
a[i] = c[i];
c[i] = soto;
}
}
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");
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int N = 0;
int a[1001] = {0}, b[1001] = {0}, c[1001] = {0};
int soto = 0;
int i = 0;
scanf("%d", &N);
for (i = 0; i < N; i++) {
scanf("%d %d %d", &a[i], &b[i], &c[i]);
if (a[i] < b[i]) {
soto = a[i];
a[i] = b[i];
b[i] = soto;
}
if (a[i] < c[i]) {
soto = a[i];
a[i] = c[i];
c[i] = soto;
}
}
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");
}
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 87], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 249
| 12
|
a[3];
main(i, m, n) {
for (scanf("%d", &i); ~scanf("%d%d%d", a, a + 1, a + 2);
puts(a[0] * a[0] + a[1] * a[1] + a[2] * a[2] - m ? "NO" : "YES"))
for (m = i = 0; i < 2; i++)
if (n = 2 * a[i] * a[i], m < n)
m = n;
exit(0);
}
|
a[3];
main(i, m, n) {
for (scanf("%d", &i); ~scanf("%d%d%d", a, a + 1, a + 2);
puts(a[0] * a[0] + a[1] * a[1] + a[2] * a[2] - m ? "NO" : "YES"))
for (m = i = 0; i < 3; i++)
if (n = 2 * a[i] * a[i], m < n)
m = n;
exit(0);
}
|
[["-", 0, 9, 0, 7, 8, 7, 15, 16, 12, 13], ["+", 0, 9, 0, 7, 8, 7, 15, 16, 12, 13]]
| 0
| 133
| 13
|
#include <stdio.h>
int main() {
int n, i;
scanf("%d", &n);
int a, b, c, aa, bb, cc;
for (i = 0; i < n; i += 1) {
scanf("%d %d %d", &a, &b, &c);
aa = a * a;
bb = b * b;
cc = c * c;
if (aa == bb + cc || bb == cc + aa || cc == aa + bb) {
printf("YES\n");
} else {
printf("NO\n");
break;
};
};
return 0;
}
|
#include <stdio.h>
int main() {
int n, i;
scanf("%d", &n);
int a, b, c, aa, bb, cc;
for (i = 0; i < n; i += 1) {
scanf("%d %d %d", &a, &b, &c);
aa = a * a;
bb = b * b;
cc = c * c;
if (aa == bb + cc || bb == cc + aa || cc == aa + bb) {
printf("YES\n");
} else {
printf("NO\n");
};
};
return 0;
}
|
[["-", 0, 57, 75, 76, 0, 9, 0, 93, 0, 94], ["-", 0, 57, 75, 76, 0, 9, 0, 93, 0, 35]]
| 0
| 134
| 2
|
#include <stdio.h>
int main(void) {
int a[3], s, i, j, k, x;
scanf("%d", &s);
for (i = 0; i < s; i++) {
for (j = 0; j < 3; j++) {
scanf("%d", &a[j]);
for (k = 0; k < j; k++) {
if (a[j] > a[k]) {
x = a[k];
a[k] = a[j];
a[j] = x;
}
}
}
if (a[0] * a[0] == (a[1] * a[1]) + (a[2] * a[2])) {
printf("OK\n");
} else
printf("NO\n");
}
return 0;
}
|
#include <stdio.h>
int main(void) {
int a[3], s, i, j, k, x;
scanf("%d", &s);
for (i = 0; i < s; i++) {
for (j = 0; j < 3; j++) {
scanf("%d", &a[j]);
for (k = 0; k < j; k++) {
if (a[j] > a[k]) {
x = a[k];
a[k] = a[j];
a[j] = x;
}
}
}
if (a[0] * a[0] == (a[1] * a[1]) + (a[2] * a[2])) {
printf("YES\n");
} else
printf("NO\n");
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 189
| 2
|
#include <math.h>
#include <stdio.h>
int main(int argc, const char *argv[]) {
int n;
int a, b, c;
scanf("%d", &n);
while (n > 0) {
scanf("%d %d %d", &a, &b, &c);
if ((a == sqrt(b * b + c * c)) || (b == sqrt(c * c + a * a)) ||
(c == sqrt(a * a + b * b))) {
printf("Yes\n");
} else {
printf("No\n");
}
n--;
}
return 0;
}
|
#include <math.h>
#include <stdio.h>
int main(int argc, const char *argv[]) {
int n;
int a, b, c;
scanf("%d", &n);
while (n > 0) {
scanf("%d %d %d", &a, &b, &c);
if ((a == sqrt(b * b + c * c)) || (b == sqrt(c * c + a * a)) ||
(c == sqrt(a * a + b * b))) {
printf("YES\n");
} else {
printf("NO\n");
}
n--;
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 137
| 4
|
#include <stdio.h>
int main() {
int i, j, n[3], tempmax, rowcount;
long temp;
scanf("%d\n", &rowcount);
for (i = 0; i < rowcount; i++) {
scanf("%d%d%d\n", &n[0], &n[1], &n[2]);
tempmax = 0;
for (j = 1; j < 3; j++) {
if (n[tempmax] < n[j])
tempmax = j;
}
switch (tempmax) {
case 0:
temp = (n[1] * n[1]) + (n[2] * n[2]);
case 1:
temp = (n[0] * n[0]) + (n[2] * n[2]);
case 2:
temp = (n[0] * n[0]) + (n[1] * n[1]);
}
if (n[tempmax] * n[tempmax] == temp) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int i, j, n[3], tempmax, rowcount;
long temp;
scanf("%d\n", &rowcount);
for (i = 0; i < rowcount; i++) {
scanf("%d%d%d", &n[0], &n[1], &n[2]);
tempmax = 0;
for (j = 1; j < 3; j++) {
if (n[tempmax] < n[j])
tempmax = j;
}
switch (tempmax) {
case 0:
temp = (n[1] * n[1]) + (n[2] * n[2]);
break;
case 1:
temp = (n[0] * n[0]) + (n[2] * n[2]);
break;
case 2:
temp = (n[0] * n[0]) + (n[1] * n[1]);
}
if (n[tempmax] * n[tempmax] == temp) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 99, 8, 9, 0, 100, 0, 93, 0, 94], ["+", 0, 99, 8, 9, 0, 100, 0, 93, 0, 35], ["+", 0, 99, 8, 9, 0, 100, 0, 1, 0, 35]]
| 0
| 243
| 5
|
#include <stdio.h>
int main(void) {
int ds;
int a;
int b;
int c;
int i;
scanf("%d", &ds);
for (i = 1; i <= ds; i++) {
scanf("%d %d %d", &a, &b, &c);
if (a * a + b * b == c * c || a * a + c * c == b * c ||
b * b + c * c == a * a) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return (0);
}
|
#include <stdio.h>
int main(void) {
int ds;
int a;
int b;
int c;
int i;
scanf("%d", &ds);
for (i = 1; i <= ds; 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);
}
|
[["-", 0, 16, 31, 16, 12, 16, 12, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 12, 22]]
| 0
| 129
| 2
|
#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);
if (a * a == b * b + c * c) {
printf("YES\n");
}
if (b * b == a * a + c * c) {
printf("YES\n");
}
if (c * c == b * b + a * a) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
#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);
if (a * a == b * b + c * c) {
printf("YES\n");
} else if (b * b == a * a + c * c) {
printf("YES\n");
} else if (c * c == b * b + a * a) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]]
| 0
| 147
| 4
|
#include <stdio.h>
int main() {
int a;
int b;
int c;
int d;
int i;
scanf("%d", &d);
for (i = 0; i < d; i++) {
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
if (a * a == b * b + c * c) {
printf("Yes\n");
} else if (b * b == a * a + c * c) {
printf("Yes\n");
} else if (c * c == a * a + b * b) {
printf("Yes\n");
} else {
printf("No\n");
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int a;
int b;
int c;
int d;
int i;
scanf("%d", &d);
for (i = 0; i < d; i++) {
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
if (a * a == b * b + c * c) {
printf("YES\n");
} else if (b * b == a * a + c * c) {
printf("YES\n");
} else if (c * c == a * a + b * b) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 0
| 166
| 8
|
#include <stdio.h>
main() {
int set;
scanf("%d", &set);
int a[set], b[set], c[set], i;
for (i = 0; i < set; i++) {
scanf("%d%d%d", &a[i], &b[i], &c[i]);
}
for (i = 0; i < set; i++) {
if (b[i] > a[i] && b[i] > c[i]) {
b[i] = b[i] * b[i];
if (b[i] == a[i] * a[i] + c[i] * c[i]) {
printf("YES\n");
} else
printf("NO\n");
} else if (a[i] > b[i] && a[i] > c[i]) {
a[i] = a[i] * a[i];
if (a[i] == b[i] * b[i] + c[i] * c[i]) {
printf("YES\n");
} else
printf("NO\n");
} else if (c[i] > a[i] && c[i] > b[i]) {
c[i] = c[i] * c[i];
if (c[i] == a[i] * a[i] + b[i] * b[i]) {
printf("YES\n");
} else
printf("NO\n");
}
}
return 0;
}
|
#include <stdio.h>
main() {
int set;
scanf("%d", &set);
int a[set], b[set], c[set], i;
for (i = 0; i < set; i++) {
scanf("%d%d%d", &a[i], &b[i], &c[i]);
}
for (i = 0; i < set; i++) {
if (b[i] >= a[i] && b[i] >= c[i]) {
b[i] = b[i] * b[i];
if (b[i] == a[i] * a[i] + c[i] * c[i]) {
printf("YES\n");
} else
printf("NO\n");
} else if (a[i] > b[i] && a[i] >= c[i]) {
a[i] = a[i] * a[i];
if (a[i] == b[i] * b[i] + c[i] * c[i]) {
printf("YES\n");
} else
printf("NO\n");
} else if (c[i] > a[i] && c[i] > b[i]) {
c[i] = c[i] * c[i];
if (c[i] == a[i] * a[i] + b[i] * b[i]) {
printf("YES\n");
} else
printf("NO\n");
}
}
return 0;
}
|
[["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 20]]
| 0
| 354
| 6
|
#include <stdio.h>
int main() {
int n, i;
int 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");
} else if (b * b == a * a + c * c) {
printf("YES");
} else if (c * c == a * a + b * b) {
printf("YES");
} else {
printf("NO");
}
}
return 0;
}
|
#include <stdio.h>
int main() {
int n, i;
int 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 == a * a + c * c) {
printf("YES\n");
} else if (c * c == a * a + b * b) {
printf("YES\n");
} else {
printf("NO\n");
}
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 0
| 145
| 4
|
#include <stdio.h>
int main() {
int i, j, n, max, sum, r; // rは記憶のr
int x[1000][3];
scanf("%d", &n);
for (i = 0; i < n; i++) {
max = 0;
scanf("%d %d %d", &x[i][0], &x[i][1], &x[i][2]);
for (j = 0; j < 3; j++) {
if (max < x[i][j]) {
max = x[i][j];
r = j;
}
}
x[i][r] = 0;
sum = x[i][0] * x[i][0] + x[i][1] * x[i][1] + x[i][2] + x[i][2];
if (max * max == sum)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
#include <stdio.h>
int main() {
int i, j, n, max, sum, r; // rは記憶
int x[1000][3];
scanf("%d", &n);
for (i = 0; i < n; i++) {
max = 0;
scanf("%d %d %d", &x[i][0], &x[i][1], &x[i][2]);
for (j = 0; j < 3; j++) {
if (max < x[i][j]) {
max = x[i][j];
r = j;
}
}
x[i][r] = 0;
sum = x[i][0] * x[i][0] + x[i][1] * x[i][1] + x[i][2] * x[i][2];
if (max * max == sum)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
|
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 17, 48]]
| 0
| 225
| 2
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.