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 |
|---|---|---|---|---|---|
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int t, n[3];
cin >> t;
while (t--) {
cin >> n[0] >> n[1] >> n[2];
sort(n, n + 2);
for (int i = 0; i < 3; i++)
n[i] *= n[i];
if (n[2] - n[0] - n[1])
cout << "NO" << endl;
else
cout << "YES" << endl;
... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int t, n[3];
cin >> t;
while (t--) {
cin >> n[0] >> n[1] >> n[2];
sort(n, n + 3);
for (int i = 0; i < 3; i++)
n[i] *= n[i];
if (n[2] - n[0] - n[1])
cout << "NO" << endl;
else
cout << "YES" << endl;
... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 120 | 2 |
#include <algorithm>
#include <iostream>
int main() {
using namespace std;
int num;
int line[1000][3];
cin >> num;
for (int i = 0; i < num; i++) {
cin >> line[i][0] >> line[i][1] >> line[i][2];
sort(line[i], line[i] + 3);
}
for (int i = 0; i < num; i++) {
if (((line[i][0] * line[i][0]) + (li... | #include <algorithm>
#include <iostream>
int main() {
using namespace std;
int num;
int line[1000][3];
cin >> num;
for (int i = 0; i < num; i++) {
cin >> line[i][0] >> line[i][1] >> line[i][2];
sort(line[i], line[i] + 3);
}
for (int i = 0; i < num; i++) {
if (((line[i][0] * line[i][0]) + (li... | [["-", 12, 23, 0, 16, 31, 69, 341, 342, 0, 13], ["+", 12, 23, 0, 16, 31, 69, 341, 342, 0, 13], ["-", 12, 23, 0, 16, 12, 69, 341, 342, 0, 13], ["+", 12, 23, 0, 16, 12, 69, 341, 342, 0, 13]] | 1 | 181 | 4 |
#include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int deta;
//データ数をもらう
scanf("%d", &deta);
//データ数だけ3辺の値をもらう
for (int i = 0; i < deta; i++) {
int hen1, hen2, hen3;
scanf("%d", &hen1);
scanf("%d", &hen2);
scanf("%d", &hen3);
//直角三角形の判定
if (hen1 * hen1 + hen... | #include <iostream>
#include <stdio.h>
using namespace std;
int main(void) {
int deta;
//データ数をもらう
scanf("%d", &deta);
//データ数だけ3辺の値をもらう
for (int i = 0; i < deta; i++) {
int hen1, hen2, hen3;
scanf("%d", &hen1);
scanf("%d", &hen2);
scanf("%d", &hen3);
//直角三角形の判定
if (hen1 * hen1 + hen... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 146 | 4 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, a[3];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[0] >> a[1] >> a[2];
std::sort(a, a + 2);
cout << (a[0] * a[0] + a[1] * a[1] == a[2] * a[2] ? "YES" : "NO") << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n, a[3];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[0] >> a[1] >> a[2];
std::sort(a, a + 3);
cout << (a[0] * a[0] + a[1] * a[1] == a[2] * a[2] ? "YES" : "NO") << endl;
}
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 117 | 2 |
#include <stdio.h>
int main(void) {
int dsnum, length[3], i;
scanf("%d", &dsnum);
while (dsnum > 0) {
scanf("%d%d%d", &length[0], &length[1], &length[2]);
for (i = 0; i < 3; i++) {
if (length[i] * length[i] + length[(i + 1) % 3] * length[(i + 1) % 3] ==
length[(i + 2) % 3] * length[(i ... | #include <stdio.h>
int main(void) {
int dsnum, length[3], i;
scanf("%d", &dsnum);
while (dsnum > 0) {
scanf("%d%d%d", &length[0], &length[1], &length[2]);
for (i = 0; i < 3; i++) {
if (length[i] * length[i] + length[(i + 1) % 3] * length[(i + 1) % 3] ==
length[(i + 2) % 3] * length[(i ... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 163 | 2 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int i, b, c, d;
vector<int> a;
cin >> i;
for (int j = 0; j < i; j++) {
cin >> b >> c >> d;
a.push_back(b);
a.push_back(c);
a.push_back(d);
sort(a.begin(), a.end());
if (a[0] * a[0] + a[1] * a[1... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int i, b, c, d;
vector<int> a;
cin >> i;
for (int j = 0; j < i; j++) {
cin >> b >> c >> d;
a.push_back(b);
a.push_back(c);
a.push_back(d);
sort(a.begin(), a.end());
if (a[0] * a[0] + a[1] * a[1... | [["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 148 | 6 |
#include <algorithm>
#include <deque>
#include <iostream>
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(), e... | #include <algorithm>
#include <deque>
#include <iostream>
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(), e... | [["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 161 | 6 |
#include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <iterator>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> tri(3);
while (n > 0) {
cin >> tri[0] >> tri[1] >> tri[2];
sort(tri... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <iterator>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> tri(3);
while (n > 0) {
cin >> tri[0] >> tri[1] >> tri[2];
sort(tri... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 139 | 4 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
bool judge[n];
for (int i = 0; i < n; i++) {
int length[3];
for (int j = 0; j < 3; j++) {
cin >> length[j];
}
sort(length, length + 2);
if (length[0] * length[0] + length[1] * length[1] ==
... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
bool judge[n];
for (int i = 0; i < n; i++) {
int length[3];
for (int j = 0; j < 3; j++) {
cin >> length[j];
}
sort(length, length + 3);
if (length[0] * length[0] + length[1] * length[1] ==
... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 178 | 2 |
#include <iostream>
using namespace std;
bool solve(int x, int y, int z) {
if ((x * x) == (y * y + z * z)) {
return true;
}
return false;
}
int main() {
int N;
cin >> N;
bool ans = false;
for (int i = 0; i < N; i++) {
int a, b, c;
cin >> a >> b >> c;
if (a > b) {
if (a > c) // ... | #include <iostream>
using namespace std;
bool solve(int x, int y, int z) {
if ((x * x) == (y * y + z * z)) {
return true;
}
return false;
}
int main() {
int N;
cin >> N;
bool ans = false;
for (int i = 0; i < N; i++) {
int a, b, c;
cin >> a >> b >> c;
if (a >= b) {
if (a >= c) /... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 222 | 6 |
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
int num;
cin >> num;
for (int i = 0; i < num; i++) {
cin >> a >> b >> c;
if (a >= b && a >= c) {
(a * a == b * b + c * c) ? cout << "Yes\n" : cout << "No\n";
} else if (b >= a && b >= c) {
... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
int num;
cin >> num;
for (int i = 0; i < num; i++) {
cin >> a >> b >> c;
if (a >= b && a >= c) {
(a * a == b * b + c * c) ? cout << "YES\n" : cout << "NO\n";
} else if (b >= a && b >= c) {
... | [["-", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 64, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 41, 75, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 41, 75, 16, 12, 5, 0, 6]] | 1 | 179 | 12 |
#include <stdio.h>
int main() {
int N = 0, a = 0, b = 0, c = 0, 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 (a * a + c * c == b * b) {
printf("YES\n");
} else if (b * b + c * c == a * a) {
p... | #include <stdio.h>
int main() {
int N = 0, a = 0, b = 0, c = 0, 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 (a * a + c * c == b * b) {
printf("YES\n");
} else if (b * b + c * c == a * a) {
... | [["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]] | 1 | 153 | 3 |
#include <iostream>
inline bool is_right_triangle(const u_int a, const u_int b, const u_int c) {
return (a * a == b * b + c * c || b * b == c * c + a * a ||
c * c == a * a + b * b);
}
int main(void) {
u_int n, a, b, c;
std::cin >> n;
for (u_int i = 0; i < n; ++i) {
std::cin >> a >> b >> c;
... | #include <iostream>
inline bool is_right_triangle(const u_int a, const u_int b, const u_int c) {
return (a * a == b * b + c * c || b * b == c * c + a * a ||
c * c == a * a + b * b);
}
int main(void) {
u_int n, a, b, c;
std::cin >> n;
for (u_int i = 0; i < n; ++i) {
std::cin >> a >> b >> c;
... | [["+", 8, 9, 0, 1, 0, 16, 12, 23, 0, 24], ["+", 8, 9, 0, 1, 0, 16, 12, 23, 0, 25]] | 1 | 133 | 2 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
while (N--) {
int i[3], c;
int max;
cin >> i[0] >> i[1] >> i[2];
sort(i, i + 2);
if (i[0] * i[0] + i[1] * i[1] == i[2] * i[2])
cout << "YES\n";
else
cout << "NO\n";
}
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
while (N--) {
int i[3], c;
int max;
cin >> i[0] >> i[1] >> i[2];
sort(i, i + 3);
if (i[0] * i[0] + i[1] * i[1] == i[2] * i[2])
cout << "YES\n";
else
cout << "NO\n";
}
} | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 112 | 2 |
n = gets
while line = gets
a = Array.new(3) { |i| }
a[0], a[1], a[2] = line.split.map(&:to_i)
a.sort
if a[2]**2 == a[1]**2 + a[0]**2
puts 'YES'
else
puts 'NO'
end
end
| n = gets
while line = gets
a = Array.new(3) { |i| }
a[0], a[1], a[2] = line.split.map(&:to_i)
a = a.sort
if a[2]**2 == a[1]**2 + a[0]**2
puts 'YES'
else
puts 'NO'
end
end
| [["+", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 486, 22]] | 4 | 79 | 2 |
num = []
(0...gets.to_i).each do |_i|
a = gets
num = a.split(nil)
num.collect!(&:to_i)
num.sort!
if num[2]**2 == num[0]**2 + num[1]**2
puts 'Yes'
else
puts 'No'
end
end
| num = []
(0...gets.to_i).each do |_i|
a = gets
num = a.split(nil)
num.collect!(&:to_i)
num.sort!
if num[2]**2 == (num[0]**2) + (num[1]**2)
puts 'YES'
else
puts 'NO'
end
end
| [["+", 0, 121, 15, 738, 12, 738, 31, 739, 0, 24], ["+", 0, 121, 15, 738, 12, 738, 31, 739, 0, 25], ["+", 0, 121, 15, 738, 12, 738, 12, 739, 0, 24], ["+", 0, 121, 15, 738, 12, 738, 12, 739, 0, 25], ["-", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 75, 95, 0, 652, 3, 4, 0, 557,... | 4 | 70 | 8 |
n = gets.to_i
n.times do
a, b, c = gets.split.map(&:to_i).sort
if c**2 == b**2 + c**2
puts 'YES'
else
puts 'NO'
end
end
| n = gets.to_i
n.times do
a, b, c = gets.split.map(&:to_i).sort
if c**2 == b**2 + a**2
puts 'YES'
else
puts 'NO'
end
end
| [["-", 0, 121, 15, 738, 12, 738, 12, 738, 31, 22], ["+", 0, 121, 15, 738, 12, 738, 12, 738, 31, 22]] | 4 | 49 | 2 |
dataset_count = $stdin.gets.to_i
dataset_count.times do |_i|
point = $stdin.gets.split(' ')
point.map!(&:to_i)
a, b, c = point
if a**2 + b**2 == c**2
puts 'YES'
else
puts 'NO'
end
end
| dataset_count = $stdin.gets.to_i
dataset_count.times do |_i|
point = $stdin.gets.split(' ')
point.map!(&:to_i)
a, b, c = point.sort
if a**2 + b**2 == c**2
puts 'YES'
else
puts 'NO'
end
end
| [["+", 196, 737, 8, 736, 0, 662, 12, 652, 17, 131], ["+", 196, 737, 8, 736, 0, 662, 12, 652, 735, 22]] | 4 | 63 | 2 |
num = gets.split.length
(1..num).each do |_i|
abc = gets.split.map(&:to_i)
abc.sort!
if abc[0]**2 + abc[1]**2 == abc[2]**2
puts('YES')
else
puts('NO')
end
end
| num = gets.to_i
(1..num).each do |_i|
abc = gets.split.map(&:to_i)
abc.sort!
if abc[0]**2 + abc[1]**2 == abc[2]**2
puts('YES')
else
puts('NO')
end
end
| [["-", 0, 493, 0, 662, 12, 652, 486, 652, 735, 22], ["-", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 68 | 4 |
require 'English'
gets
while gets
a, b, c = $LAST_READ_LINE.split.map(&:to_i)
puts a * a + b * b == c * c ? 'YES' : 'NO'
end
| require 'English'
gets
while gets
a, b, c = $LAST_READ_LINE.split.map(&:to_i).sort
puts a * a + b * b == c * c ? 'YES' : 'NO'
end
| [["+", 0, 89, 8, 170, 0, 662, 12, 652, 17, 131], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22]] | 4 | 43 | 2 |
n = gets.chomp.to_i
n.times do
i = gets
a, b, c = i.chomp
a = a.to_i
b = b.to_i
c = c.to_i
if a**2 == (b**2 + c**2) || b**2 == (a**2 + c**2) || c**2 == (a**2 + b**2)
puts 'YES'
else
puts 'NO'
end
end
| n = gets.chomp.to_i
n.times do
i = gets
a, b, c = i.chomp.split
a = a.to_i
b = b.to_i
c = c.to_i
if a**2 == (b**2 + c**2) || b**2 == (a**2 + c**2) || c**2 == (a**2 + b**2)
puts 'YES'
else
puts 'NO'
end
end
| [["+", 196, 737, 8, 736, 0, 662, 12, 652, 17, 131], ["+", 196, 737, 8, 736, 0, 662, 12, 652, 735, 22]] | 4 | 91 | 2 |
gets
ARGF.each_line do |line|
a, b, c = line.split.map(&:to_i)
if (a**2 + b**2) == c**2
puts 'YES'
else
puts 'NO'
end
end
| gets
ARGF.each_line do |line|
a, b, c = line.split.map(&:to_i).sort
if (a**2 + b**2) == c**2
puts 'YES'
else
puts 'NO'
end
end
| [["+", 196, 737, 8, 736, 0, 662, 12, 652, 17, 131], ["+", 196, 737, 8, 736, 0, 662, 12, 652, 735, 22]] | 4 | 48 | 2 |
# Is it a Right Triangle?
ARGF.gets # skip
while line = ARGF.gets
a, b, c = line.aplit.map(&:to_i).sort
res = (a**2) + (b**2) == c**2
puts res ? 'YES' : 'NO'
end
| # Is it a Right Triangle?
ARGF.gets # skip
while line = ARGF.gets
a, b, c = line.split.map(&:to_i).sort
res = (a**2) + (b**2) == c**2
puts res ? 'YES' : 'NO'
end
| [["-", 0, 662, 12, 652, 486, 652, 486, 652, 735, 22], ["+", 0, 662, 12, 652, 486, 652, 486, 652, 735, 22]] | 4 | 56 | 2 |
gets.chomp.to_i.times do
a, b, c = gets.split.map(&:to_i).sort
if c**2 == a**2 + b**2
puts 'Yes'
else
puts 'No'
end
end
| gets.chomp.to_i.times do
a, b, c = gets.split.map(&:to_i).sort
if c**2 == a**2 + b**2
puts 'YES'
else
puts 'NO'
end
end
| [["-", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 48 | 4 |
num = gets
(1..(num.to_i)).each do |_j|
data = gets
puts data
triangle = data.split(' ').map(&:to_i).sort
if triangle[0]**2 + triangle[1]**2 == triangle[2]**2
puts 'YES'
else
puts 'NO'
end
end
| num = gets
(1..(num.to_i)).each do |_j|
data = gets
triangle = data.split(' ').map(&:to_i).sort
if triangle[0]**2 + triangle[1]**2 == triangle[2]**2
puts 'YES'
else
puts 'NO'
end
end
| [["-", 0, 652, 196, 737, 8, 736, 0, 652, 735, 22], ["-", 196, 737, 8, 736, 0, 652, 3, 4, 0, 22]] | 4 | 73 | 2 |
inputArray = []
rows = gets.to_i
i = 0
rows.times do
temp = gets
inputArray[i], inputArray[i + 1], inputArray[i + 2] = temp.split(' ').map(&:to_i)
i += 3
end
i = 0
inputArray.map! { |n| n**2 }
test = []
rows.times do
test = [inputArray[i], inputArray[i + 1], inputArray[i + 2]]
test.sort!
if test[0] + test[1... | inputArray = []
rows = gets.to_i
i = 0
rows.times do
temp = gets
inputArray[i], inputArray[i + 1], inputArray[i + 2] = temp.split(' ').map(&:to_i)
i += 3
end
i = 0
inputArray.map! { |n| n**2 }
test = []
rows.times do
test = [inputArray[i], inputArray[i + 1], inputArray[i + 2]]
test.sort!
if test[0] + test[1... | [["-", 0, 121, 15, 738, 12, 742, 0, 738, 31, 22], ["-", 0, 121, 15, 738, 12, 742, 0, 738, 17, 72]] | 4 | 134 | 2 |
cnt = gets.to_i
ss = []
cnt.times do |_i|
ss = gets.to_s.split(' ').map(&:to_i)
if (ss[0] * ss[0] + ss[1] * ss[1] - ss[2] * ss[2]).zero? || (ss[0] * ss[0] - ss[1] * ss[1] + ss[2] * ss[2]).zero? || (-ss[0] * ss[0] + ss[1] * ss[1] + ss[2] * ss[2]).zero?
p 'YES'
else
p 'NO'
end
end
| cnt = gets.to_i
ss = []
cnt.times do |_i|
ss = gets.to_s.split(' ').map(&:to_i)
if (ss[0] * ss[0] + ss[1] * ss[1] - ss[2] * ss[2]).zero? || (ss[0] * ss[0] - ss[1] * ss[1] + ss[2] * ss[2]).zero? || (-ss[0] * ss[0] + ss[1] * ss[1] + ss[2] * ss[2]).zero?
puts 'YES'
else
puts 'NO'
end
end
| [["-", 8, 736, 0, 121, 64, 749, 0, 652, 735, 22], ["+", 8, 736, 0, 121, 64, 749, 0, 652, 735, 22], ["-", 8, 736, 0, 121, 75, 95, 0, 652, 735, 22], ["+", 8, 736, 0, 121, 75, 95, 0, 652, 735, 22]] | 4 | 148 | 4 |
num = []
i = 0
roop = gets.to_i
while i < roop
a = gets
num = []
num = a.split(nil)
num = num.map(&:to_i)
num.sort!
if (num[2]**2) == ((num[1]**2) + (num[0]**2))
puts 'yes'
else
puts 'no'
end
i += 1
end
| num = []
i = 0
roop = gets.to_i
while i < roop
a = gets
num = []
num = a.split(nil)
num = num.map(&:to_i)
num.sort!
if (num[2]**2) == ((num[1]**2) + (num[0]**2))
puts 'YES'
else
puts 'NO'
end
i += 1
end
| [["-", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6]] | 4 | 86 | 4 |
while str = gets
array = str.chomp.split(' ').map(&:to_i)
array = array.sort
if array[2] * array[2] == array[1] * array[1] + array[0] * array[0]
puts 'YES'
else
puts 'NO'
end
end
| gets
while str = gets
array = str.chomp.split(' ').map(&:to_i)
array = array.sort
if array[2] * array[2] == array[1] * array[1] + array[0] * array[0]
puts 'YES'
else
puts 'NO'
end
end
| [["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 22]] | 4 | 68 | 1 |
n = gets.to_i
n.times do
input = gets.split(' ')
a = input[0].to_i
b = input[1].to_i
c = input[2].to_i
a **= 2
b **= 2
c **= 2
if a = b + c || b = a + c || c = a + b
puts 'yes'
else
puts 'no'
end
end
| n = gets.to_i
n.times do
input = gets.split(' ')
a = input[0].to_i
b = input[1].to_i
c = input[2].to_i
a **= 2
b **= 2
c **= 2
if a == b + c || b == a + c || c == a + b
puts 'YES'
else
puts 'NO'
end
end
| [["-", 196, 737, 8, 736, 0, 121, 15, 662, 0, 32], ["+", 0, 121, 15, 738, 31, 738, 31, 738, 17, 60], ["-", 0, 121, 15, 662, 12, 738, 12, 662, 0, 32], ["+", 0, 121, 15, 738, 31, 738, 12, 738, 17, 60], ["-", 12, 738, 12, 662, 12, 738, 12, 662, 0, 32], ["+", 8, 736, 0, 121, 15, 738, 12, 738, 17, 60], ["-", 64, 749, 0, 652,... | 4 | 81 | 10 |
if __FILE__ == $PROGRAM_NAME
n = gets.to_i
n.times do
args = gets.split(' ').map(&:to_i)
result = (((args[0]**2) + (args[1]**2)) == args[2]**2)
if result
puts 'YES'
else
puts 'NO'
end
end
end
| if __FILE__ == $PROGRAM_NAME
n = gets.to_i
n.times do
args = gets.split(' ').map(&:to_i).sort
result = (((args[0]**2) + (args[1]**2)) == args[2]**2)
if result
puts 'YES'
else
puts 'NO'
end
end
end
| [["+", 196, 737, 8, 736, 0, 662, 12, 652, 17, 131], ["+", 196, 737, 8, 736, 0, 662, 12, 652, 735, 22]] | 4 | 73 | 2 |
#!/usr/local/bin/ruby
a = []
N = gets.to_i
N.times do
a << gets.split(' ').map(&:to_i)
end
a.each do |x, y, z|
if z**2 == x**2 + y**2
puts 'YES'
else
puts 'NO'
end
end
| #!/usr/local/bin/ruby
a = []
N = gets.to_i
N.times do
a << gets.split(' ').map(&:to_i).sort
end
a.each do |x, y, z|
if z**2 == x**2 + y**2
puts 'YES'
else
puts 'NO'
end
end
| [["+", 196, 737, 8, 736, 0, 738, 12, 652, 17, 131], ["+", 196, 737, 8, 736, 0, 738, 12, 652, 735, 22]] | 4 | 65 | 2 |
n = gets.chomp.to_i
n.times do |_i|
a = gets
break if a.nil?
b = a.split(' ')
b.map!(&:to_i)
b.sort!
if (b[2]**2) == (b[1]**2) + (b[0]**2)
p 'YES'
else
p 'NO'
end
end
| n = gets.chomp.to_i
n.times do |_i|
a = gets
break if a.nil?
b = a.split(' ')
b.map!(&:to_i)
b.sort!
if (b[2]**2) == (b[1]**2) + (b[0]**2)
puts 'YES'
else
puts 'NO'
end
end
| [["-", 8, 736, 0, 121, 64, 749, 0, 652, 735, 22], ["+", 8, 736, 0, 121, 64, 749, 0, 652, 735, 22], ["-", 8, 736, 0, 121, 75, 95, 0, 652, 735, 22], ["+", 8, 736, 0, 121, 75, 95, 0, 652, 735, 22]] | 4 | 80 | 4 |
count = $stdin.gets.chomp.to_i
while count != 0
sannpenn = $stdin.gets.chomp.split("\s")
sannpenn.map!(&:to_i).sort
count += -1
if (sannpenn[0]**2 + sannpenn[1]**2) == sannpenn[2]**2
puts 'YES'
else
puts 'NO'
end
end
| count = $stdin.gets.chomp.to_i
while count != 0
sannpenn = $stdin.gets.chomp.split("\s")
sannpenn.map!(&:to_i)
sannpenn.sort!
count += -1
if (sannpenn[0]**2 + sannpenn[1]**2) == sannpenn[2]**2
puts 'YES'
else
puts 'NO'
end
end
| [["+", 0, 493, 0, 89, 8, 170, 0, 652, 486, 22], ["-", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22]] | 4 | 74 | 3 |
n=int(input())
for i in range(n):
p=list(map(int,input().split()))
p.sort()
a=x[0]
b=x[1]
c=x[2]
if a*a+b*b==c*c:
print('YES')
else:
print('NO')
| n=int(input())
for i in range(n):
p=list(map(int,input().split()))
p.sort()
a=p[0]
b=p[1]
c=p[2]
if a*a+b*b==c*c:
print('YES')
else:
print('NO')
| [["-", 8, 196, 0, 1, 0, 662, 12, 206, 51, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 206, 51, 22]] | 5 | 83 | 6 |
n=int(input())
for i in range(n):
a,b,c = input().split()
x = int(a)
y = int(b)
z = int(c)
p = [a,b,c]
p.sort()
if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
print('YES')
else:
print('NO')
| n=int(input())
for i in range(n):
a,b,c = input().split()
x = int(a)
y = int(b)
z = int(c)
p = [x,y,z]
p.sort()
if pow(p[0],2) + pow(p[1],2) == pow(p[2],2):
print('YES')
else:
print('NO')
| [["-", 8, 196, 0, 1, 0, 662, 12, 634, 0, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 634, 0, 22]] | 5 | 106 | 6 |
for i in range(int(input())):
values = sorted(map(lambda x: int(x)^2, input().split(' ')))
if values[2] == values[1] + values[0]:
print('YES')
else:
print('NO')
| # -*- coding: utf-8 -*-
for i in range(int(input())):
values = sorted(map(lambda x: int(x)**2, input().split(' ')))
if values[2] == values[1] + values[0]:
print("YES")
else:
print("NO")
| [["-", 0, 652, 3, 4, 0, 670, 8, 657, 17, 140], ["+", 0, 652, 3, 4, 0, 670, 8, 657, 17, 578], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655]] | 5 | 71 | 10 |
n = int(input())
for i in range(n):
x, y, z =map(int, input().split())
if x*x + y*y == z*z or y*y + z*z == x*x or x*x + z*z == y*y :
print("Yes")
else:
print("No")
| n = int(input())
for i in range(n):
x, y, z =map(int, input().split())
if x*x + y*y == z*z or y*y + z*z == x*x or x*x + z*z == y*y :
print("YES")
else:
print("NO")
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 85 | 4 |
#!/usr/bin/python
#-coding:utf-8-
import sys
data_list = []
for s in sys.stdin:
data_list.append( list(map(int,s.split())) )
print(data_list)
for e in data_list[1:]:
e.sort()
if e[0]*e[0] + e[1]*e[1] == e[2] * e[2]:
print("YES")
else:
print("NO")
| #!/usr/bin/python
#-coding:utf-8-
import sys
data_list = []
for s in sys.stdin:
data_list.append( list(map(int,s.split())) )
for e in data_list[1:]:
e.sort()
if e[0]*e[0] + e[1]*e[1] == e[2] * e[2]:
print("YES")
else:
print("NO")
| [["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 96 | 4 |
def check_right_triangle(side1, side2, side3):
pow = 2
if side1**pow == side2**pow + side3**pow:
return True
if side2**pow == side3**pow + side1**pow:
return True
if side3**pow == side1**pow + side2**pow:
return True
return False
def check():
for i in range(int(input())):
sides = list(map(int, input().s... | def check_right_triangle(side1, side2, side3):
pow = 2
if side1**pow == side2**pow + side3**pow:
return True
if side2**pow == side3**pow + side1**pow:
return True
if side3**pow == side1**pow + side2**pow:
return True
return False
def check():
for i in range(int(input())):
sides = list(map(int, input().s... | [["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102]] | 5 | 137 | 2 |
n = int(input())
for k in range(n):
[a,b,c] = list(map(int,input().split()))
a,b,c = sorted([a,b,c])
if a**2 + b**2 == c**2:
print("YES")
else:
print("No") | n = int(input())
for k in range(n):
[a,b,c] = list(map(int,input().split()))
a,b,c = sorted([a,b,c])
if a**2 + b**2 == c**2:
print("YES")
else:
print("NO") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 82 | 2 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
n = int(input())
for i in range(n):
x = list(map(int, input().split()))
x.sort()
if x[0]**2 + x[1]**2 == x[2]**2:
print('Yes')
else:
print('No') | #!/usr/bin/env python
# -*- coding: utf-8 -*-
n = int(input())
for i in range(n):
x = list(map(int, input().split()))
x.sort()
if x[0]**2 + x[1]**2 == x[2]**2:
print('YES')
else:
print('NO') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 76 | 4 |
N = int(input())
for i in range(N):
a = list(range(3))
a[0],a[1],a[2] = list(map(int, input().split()))
a.sort()
if a[0]^2 + a[1]^2 == a[2]^2:
print("YES")
else:
print("NO") | N = int(input())
for i in range(N):
a = list(range(3))
a[0],a[1],a[2] = list(map(int, input().split()))
a.sort()
if a[0]**2 + a[1]**2 == a[2]**2:
print("YES")
else:
print("NO") | [["-", 0, 57, 15, 666, 0, 657, 31, 657, 17, 140], ["+", 0, 57, 15, 666, 0, 657, 31, 657, 17, 578], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 140], ["+", 0, 57, 15, 666, 0, 657, 12, 657, 17, 578], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 578]] | 5 | 96 | 6 |
import math
def main():
data = []
while 1:
try:
n = input().split()
a = int(n[0])
b = int(n[1])
ans = int(math.log10(a+b)+1)
data.append(ans)
except IndexError:
#EOF
break
for i in data:
... | import math
def main():
data = []
while 1:
try:
n = input().split()
a = int(n[0])
b = int(n[1])
ans = int(math.log10(a+b)+1)
data.append(ans)
except EOFError:
break
for i in data:
print(i)
if __name__ == "__ma... | [["-", 0, 52, 8, 196, 0, 246, 0, 671, 0, 22], ["+", 0, 52, 8, 196, 0, 246, 0, 671, 0, 22]] | 5 | 88 | 2 |
import sys
import math
for line in sys.stdin:
a, b = [int(i) for i in line.split()]
print(int(math.log10(a * b) + 1)) | import sys
import math
for line in sys.stdin:
try:
a, b = [int(i) for i in line.split()]
print(int(math.log10(a + b) + 1))
except:
break | [["+", 0, 656, 0, 7, 8, 196, 0, 246, 0, 247], ["+", 0, 656, 0, 7, 8, 196, 0, 246, 0, 102], ["-", 0, 657, 31, 652, 3, 4, 0, 657, 17, 48], ["+", 0, 657, 31, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 8, 196, 0, 246, 0, 671, 0, 672], ["+", 0, 7, 8, 196, 0, 246, 0, 671, 0, 102], ["+", 0, 246, 0, 671, 0, 196, 0, 93, 0, 94]] | 5 | 45 | 7 |
def main():
while True:
try:
a, b = (int(x) for x in input().split())
print(len(str(a+b)))
except EOFError:
break
| def main():
while True:
try:
a, b = (int(x) for x in input().split())
print(len(str(a+b)))
except EOFError:
break
main()
| [["+", 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, 25]] | 5 | 46 | 3 |
while True:
try:
a, b = (int(x) for x in input().split())
print(a + b)
except:
break;
| while True:
try:
a, b = (int(x) for x in input().split())
print(len(str(a + b)))
except:
break;
| [["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 35 | 6 |
import sys, math
def run():
N = []
for n in sys.stdin:
a,b = map(int, n.split())
N.append((a,b))
for a,b in N:
print(math.ceil(math.log10(a+b)))
if __name__ == '__main__':
run()
| import sys, math
def run():
N = []
for n in sys.stdin:
a,b = map(int, n.split())
N.append((a,b))
for a,b in N:
print(math.floor(math.log10(a+b)) + 1)
if __name__ == '__main__':
run()
| [["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 3, 4, 0, 657, 31, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 77 | 4 |
import sys
print("\n".join([len(str(sum([int(x) for x in l.split(' ')]))) for l in sys.stdin])) | import sys
print("\n".join(str(len(str(sum(int(x) for x in l.split(' '))))) for l in sys.stdin)) | [["-", 3, 4, 0, 652, 3, 4, 0, 658, 0, 70], ["+", 3, 4, 0, 652, 3, 668, 8, 652, 63, 22], ["+", 0, 652, 3, 668, 8, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 652, 3, 4, 0, 658, 0, 73], ["+", 0, 652, 3, 668, 8, 652, 3, 4, 0, 25]] | 5 | 46 | 7 |
while True:
try:
a, b = [int(i) for i in input().split()]
print(a + b)
except EOFError:
break | while True:
try:
a, b = [int(i) for i in input().split()]
print(len(str(a + b)))
except EOFError:
break | [["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 35 | 6 |
try:
a, b = list(map(int,input().split()))
print(len(str(a+b)))
except:
pass | try:
while True:
a, b = list(map(int,input().split()))
print(len(str(a+b)))
except:
pass | [["+", 0, 656, 0, 246, 8, 196, 0, 52, 0, 89], ["+", 0, 656, 0, 246, 8, 196, 0, 52, 15, 146], ["+", 0, 656, 0, 246, 8, 196, 0, 52, 0, 102]] | 5 | 36 | 3 |
# -*- coding: utf-8 -*-
for line in sys.stdin.readlines():
a, b = list(map(int, line.strip().split()))
n = a + b
ans = 1
while(n >= 10):
n /= 10
ans += 1
print(ans) | # -*- coding: utf-8 -*-
import sys
for line in sys.stdin.readlines():
a, b = list(map(int, line.strip().split()))
n = a + b
ans = 1
while(n >= 10):
n /= 10
ans += 1
print(ans) | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]] | 5 | 58 | 2 |
import sys
for jk in sys.stdin:
j,k=list(map(int,jk.split()))
print(len(j+k)) | import sys
for jk in sys.stdin:
j,k=list(map(int,jk.split()))
print(len(str(j+k))) | [["+", 3, 4, 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 | 35 | 3 |
while True:
try:
a,b = map(int,input().split(" "))
print(a+b)
except: break | while True:
try:
a,b = map(int,input().split(" "))
print(len(str(a+b)))
except: break | [["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 33 | 6 |
while True:
try:
line = input()
except:
break
a, b = map(int, input().strip().split())
print(len(str(a + b))) | while True:
try:
line = input()
except:
break
a, b = map(int, line.strip().split())
print(len(str(a + b))) | [["-", 63, 319, 500, 652, 63, 319, 500, 652, 63, 22], ["-", 500, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["-", 500, 652, 63, 319, 500, 652, 3, 4, 0, 25], ["+", 0, 652, 63, 319, 500, 652, 63, 319, 500, 22]] | 5 | 45 | 4 |
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr = (input.trim()).split("\n");
Arr.shift();
Arr.forEach(function(v) {
var arr = v.split(" ").map(Number);
arr.sort(function(a, b) { return b - a; });
var a = arr[0];
var b = arr[1];
var c = arr[2];
var str = "";
str = (c * c == a * a + b... | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr = (input.trim()).split("\n");
Arr.shift();
Arr.forEach(function(v) {
var arr = v.split(" ").map(Number);
arr.sort(function(a, b) { return a - b; });
var a = arr[0];
var b = arr[1];
var c = arr[2];
var str = "";
str = (c * c == a * a + b... | [["-", 0, 63, 8, 556, 0, 37, 0, 16, 31, 22], ["-", 0, 63, 8, 556, 0, 37, 0, 16, 17, 33], ["+", 0, 63, 8, 556, 0, 37, 0, 16, 17, 33], ["+", 0, 63, 8, 556, 0, 37, 0, 16, 12, 22]] | 2 | 154 | 4 |
process.stdin
.on("data",
function(c) {
(c + "").trim().split("\n").some(function(a) {
var n = a.split(" ")
.map(function(x) { return x * x })
.sort(function(x, y) { return x - y });
console.log(n[0] + n[1] === n[2] ? 'YES' : ... | process.stdin
.on("data",
function(c) {
(c + "").trim().split("\n").slice(1).some(function(a) {
var n = a.split(" ")
.map(function(x) { return x * x })
.sort(function(x, y) { return x - y });
console.log(n[0] + n[1] === n[2] ?... | [["+", 0, 2, 63, 558, 500, 2, 63, 558, 559, 560], ["+", 0, 2, 63, 558, 500, 2, 3, 3, 0, 24], ["+", 0, 2, 63, 558, 500, 2, 3, 3, 0, 555], ["+", 0, 2, 63, 558, 500, 2, 3, 3, 0, 25], ["+", 8, 556, 0, 1, 0, 2, 63, 558, 0, 131]] | 2 | 120 | 5 |
<?php
$n = trim(fgets(STDIN));
for ($i = 0; $i < $n; $i++) {
$stdin = explode(" ", trim(fgets(STDIN)));
asort($stdin);
//var_dump($stdin);
if($stdin[0]*$stdin[0] + $stdin[1]*$stdin[1] ==
$stdin[2]*$stdin[2]){
echo "YES". PHP_EOL;
}else{
echo "NO". PHP_EOL;
}
} | <?php
$n = trim(fgets(STDIN));
for ($i = 0; $i < $n; $i++) {
$stdin = explode(' ', trim(fgets(STDIN)));
sort($stdin);
//var_dump($stdin);
if($stdin[0]*$stdin[0] + $stdin[1]*$stdin[1] ==
$stdin[2]*$stdin[2]){
echo "YES". PHP_EOL;
}else{
echo "NO". PHP_EOL;
}
} | [["-", 12, 613, 3, 3, 0, 28, 0, 609, 0, 62], ["+", 12, 613, 3, 3, 0, 28, 0, 557, 0, 104], ["-", 0, 7, 0, 9, 0, 1, 0, 613, 63, 141], ["+", 0, 7, 0, 9, 0, 1, 0, 613, 63, 141]] | 6 | 113 | 6 |
<?php
$rest=trim(fgets(STDIN));
while(!$line=fgets(STDIN)){
$num[]=trim($line);
}
foreach($num as $ele2){
$trinum=explode(" ",$ele2);
$maxnum=max($trinum);
$key=array_search($maxnum,$trinum);
unset($trinum[$key]);
$sum=0;
foreach($trinum as $ele){
$sum+=pow($ele,2);
}
/... | <?php
$rest=fgets(STDIN);
while($line=fgets(STDIN)){
$num[]=trim($line);
}
foreach($num as $ele2){
$trinum=explode(" ",$ele2);
$maxnum=max($trinum);
$key=array_search($maxnum,$trinum);
unset($trinum[$key]);
$sum=0;
foreach($trinum as $ele){
$sum+=pow($ele,2);
}
/* echo ... | [["-", 0, 493, 0, 1, 0, 11, 12, 613, 63, 141], ["-", 0, 1, 0, 11, 12, 613, 3, 3, 0, 24], ["-", 3, 3, 0, 28, 0, 613, 3, 3, 0, 25], ["-", 0, 493, 0, 52, 15, 23, 0, 616, 0, 111]] | 6 | 146 | 4 |
<?php
$n=trim(fgets(STDIN));
for($i=0;$i<$n;$i++){
list($a,$b,$c)=explode(' ',trim(fgets(STDIN)));
if($b<$a){$d=$a;$a=$b;$b=$d;}
if($c<$b){$d=$b;$b=$c;$c=$d;}
$e=$a*$a+$b*$b-$c*c;
echo (!$e)?'YES':'NO',PHP_EOL;
} | <?php
$n=trim(fgets(STDIN));
for($i=0;$i<$n;$i++){
list($a,$b,$c)=explode(' ',trim(fgets(STDIN)));
if($b<$a){$d=$a;$a=$b;$b=$d;}
if($c<$b){$d=$b;$b=$c;$c=$d;}
$e=$a*$a+$b*$b-$c*$c;
echo (!$e)?'YES':'NO',PHP_EOL;
} | [["+", 0, 11, 12, 16, 12, 16, 12, 606, 0, 607]] | 6 | 151 | 10 |
<?php
fscanf( STDIN, "%d", $count );
for($i=0;$i<$count;$i++){
fscanf( STDIN, "%d %d %d", $a, $b, $c );
if( $b < $a ) list( $b, $a ) = [ $a, $b ];#a,b??§?????§???b
if( $c < $b ) list( $c, $b ) = [ $b, $c ];#a,b,c??§?????§???c
$answer = ( $a * $a + $b * $b == $b * $b ) ? 'YES' : 'NO';
printf("%s\n",$answer);
}
?> | <?php
fscanf( STDIN, "%d", $count );
for($i=0;$i<$count;$i++){
fscanf( STDIN, "%d %d %d", $a, $b, $c );
if( $b < $a ) list( $b, $a ) = [ $a, $b ];#a,b??§?????§???b
if( $c < $b ) list( $c, $b ) = [ $b, $c ];#a,b,c??§?????§???c
$answer = ( $a * $a + $b * $b == $c * $c ) ? 'YES' : 'NO';
printf("%s\n",$answer);
} | [["-", 15, 23, 0, 16, 12, 16, 31, 606, 0, 141], ["+", 15, 23, 0, 16, 12, 16, 31, 606, 0, 141], ["-", 15, 23, 0, 16, 12, 16, 12, 606, 0, 141], ["+", 15, 23, 0, 16, 12, 16, 12, 606, 0, 141], ["-", 36, 36, 36, 36, 36, 36, 0, 493, 0, 611]] | 6 | 145 | 5 |
fscanf(STDIN, "%d", $count);
for( $i = 0; $i < $count; $i++){
fscanf(STDIN, "%d %d %d", $data[0], $data[1], $data[2]);
rsort($data);
$long = $data[0]*$data[0];
$other = $data[1]*$data[1] + $data[2]*$data[2];
if($long == $other){
echo "YES\n";
}
else{
echo "NO\n";
}
} | <?php
fscanf(STDIN, "%d", $count);
for( $i = 0; $i < $count; $i++){
fscanf(STDIN, "%d %d %d", $data[0], $data[1], $data[2]);
rsort($data);
$long = $data[0]*$data[0];
$other = $data[1]*$data[1] + $data[2]*$data[2];
if($long == $other){
echo "YES\n";
}
else{
echo "NO\n";
}
} | [["+", 36, 36, 36, 36, 36, 36, 0, 493, 0, 605]] | 6 | 131 | 1 |
import java.util.Arrays;
import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int[] inputs = new int[3];
String result;
for (int i = 0; i < n; i++) {
for (int j = 0; j < 3; j++) {
int m = s.nextInt();
... | import java.util.Arrays;
import java.util.Scanner;
class Main {
public static void main(String[] a) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int[] inputs = new int[3];
String result;
for (int i = 0; i < n; i++) {
for (int j = 0; j < 3; j++) {
int m = s.nextInt();
... | [["-", 0, 1, 0, 11, 12, 510, 64, 5, 0, 491], ["+", 0, 1, 0, 11, 12, 510, 64, 5, 0, 491], ["-", 0, 1, 0, 11, 12, 510, 75, 5, 0, 491], ["+", 0, 1, 0, 11, 12, 510, 75, 5, 0, 491]] | 3 | 155 | 4 |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int[] data = new int[3];
while (scan.hasNext()) {
int n = scan.nextInt();
for (int i = 0; i < n; i++) {
for (int j = 0; j < 3; j++) {
data[j] = scan.nextInt... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int[] data = new int[3];
while (scan.hasNext()) {
int n = scan.nextInt();
for (int i = 0; i < n; i++) {
for (int j = 0; j < 3; j++) {
data[j] = scan.nextInt... | [["-", 0, 57, 15, 15, 0, 16, 31, 504, 71, 22], ["+", 0, 57, 15, 15, 0, 16, 31, 504, 71, 22], ["-", 64, 196, 0, 1, 0, 11, 12, 504, 71, 22], ["+", 64, 196, 0, 1, 0, 11, 12, 504, 71, 22], ["-", 64, 196, 0, 1, 0, 11, 31, 504, 71, 22], ["+", 64, 196, 0, 1, 0, 11, 31, 504, 71, 22]] | 3 | 237 | 6 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Queue;
import java.util.Scanner;
import java... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Queue;
import java.util.Scanner;
import java... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 49, 200, 51, 492, 3, 4, 0, 492, 141, 22], ["+", 51, 492, 3, 4, 0, 492, 3, 4, 0, 24], ["+", 0, 503, 49, 200, 51, 492, 3, 4, 0, 25], ["+", 0, 7, 8, 196, 0, 1, 0, 492, 500, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 492, 0, 1... | 3 | 684 | 7 |
import java.util.Scanner;
public class Main {
void run() {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int a, b, c;
for (int i = 0; i < N; i++) {
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
a = a * a;
b = b * b;
c = c * c;
if ... |
import java.util.Scanner;
public class Main {
void run() {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int a, b, c;
for (int i = 0; i < N; i++) {
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
a = a * a;
b = b * b;
c = c * c;
if... | [["+", 8, 196, 0, 57, 75, 57, 75, 57, 0, 95], ["+", 0, 57, 75, 57, 75, 57, 75, 196, 0, 45], ["+", 0, 57, 75, 57, 75, 57, 75, 196, 0, 46]] | 3 | 200 | 3 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main {
private StringTokenizer st;
private BufferedReader bf;
private int w;
Main() { readData(); }
private void readData() {
try {
... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main {
private StringTokenizer st;
private BufferedReader bf;
private int w;
Main() { readData(); }
private void readData() {
try {
... | [["-", 8, 196, 0, 1, 0, 11, 31, 504, 71, 499], ["+", 8, 196, 0, 1, 0, 11, 31, 504, 71, 499]] | 3 | 318 | 2 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in))... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in))... | [["-", 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 | 237 | 4 |
import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
class Main {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
for (int i = 0; i < n; i++) {
ArrayList<Integer> intArr = new Arr... | import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
class Main {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
for (int i = 0; i < n; i++) {
ArrayList<Integer> intArr = new Arr... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 44]] | 3 | 208 | 2 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int i[];
i = new int[3];
for (int count = 0; count < n; count++) {
for (int d = 0; d < 3; d++) {
i[d] = sc.nextInt();
}
Arrays.sort... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int i[];
i = new int[3];
for (int count = 0; count < n; count++) {
for (int d = 0; d < 3; d++) {
i[d] = sc.nextInt();
}
Arrays.sort... | [["-", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 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], ["+", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46]] | 3 | 170 | 6 |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
for (int i = 1; i < number; i++) {
int[] a = new int[3];
a[0] = sc.nextInt();
a[1] = sc.nextInt();
a[2] =... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
for (int i = 0; i < number; i++) {
int[] a = new int[3];
a[0] = sc.nextInt();
a[1] = sc.nextInt();
a[2] =... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 177 | 2 |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws Exception {
// Here your code !
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws Exception {
// Here your code !
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
... | [["-", 49, 200, 51, 492, 3, 4, 0, 5, 0, 491], ["+", 49, 200, 51, 492, 3, 4, 0, 5, 0, 491]] | 3 | 233 | 2 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<String> ynJudge = new ArrayList<>();
int N = sc.nextInt();
int sideA, sideB, sideC;
int cnt = 0;
for (int i = 0; i < N; i++) {
sideA = sc.nextInt();
sideB = s... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<String> ynJudge = new ArrayList<>();
int N = sc.nextInt();
int sideA, sideB, sideC;
int cnt = 0;
for (int i = 0; i < N; i++) {
sideA = sc.nextInt();
sideB = s... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 205 | 4 |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final int cnt = sc.nextInt();
for (int i = 0; i < cnt; i++) {
Integer side[] = new Integer[3];
side[0] = sc.nextInt();
side[1] = sc.nextIn... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final int cnt = sc.nextInt();
for (int i = 0; i < cnt; i++) {
Integer side[] = new Integer[3];
side[0] = sc.nextInt();
side[1] = sc.nextInt... | [["-", 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 | 184 | 4 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String[] strTemp;
int numberOfTriangle, data1, data2, data... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String[] strTemp;
int numberOfTriangle, data1, data2, data... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 375 | 4 |
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt(); // the number of data set
int a, b, c; // length
for (int i = 0; i < N; i++) {
a = scan.nextInt();
b = scan.nextInt();
c = scan.... | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt(); // the number of data set
int a, b, c; // length
for (int i = 0; i < N; i++) {
a = scan.nextInt();
b = scan.nextInt();
c = scan.... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 163 | 2 |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a, b, c, n, temp;
Boolean is_changed = true;
n = in.nextInt();
for (int i = 0; i < n; i++) {
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
while... |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a, b, c, n, temp;
Boolean is_changed = true;
n = in.nextInt();
for (int i = 0; i < n; i++) {
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
whil... | [["+", 0, 7, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 11, 12, 146], ["+", 8, 196, 0, 7, 8, 196, 0, 1, 0, 35]] | 3 | 201 | 4 |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
boolean tri[] = new boolean[N];
int a, b, c, x;
for (int i = 0; i < N; i++) {
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
... |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
boolean tri[] = new boolean[N];
int a, b, c, x;
for (int i = 0; i < N; i++) {
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 233 | 4 |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int x, y, z;
int yn[] = new int[n];
for (int i = 0; i < n; i++) {
x = scan.nextInt();
y = scan.nextInt();
z = scan.nextInt();
i... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int x, y, z;
int yn[] = new int[n];
for (int i = 0; i < n; i++) {
x = scan.nextInt();
y = scan.nextInt();
z = scan.nextInt();
i... | [["-", 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 | 194 | 4 |
import static java.util.stream.Collectors.*;
import java.io.*;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println(
br.lines()
.skip(1)
... | import static java.util.stream.Collectors.*;
import java.io.*;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println(
br.lines()
.skip(1)
... | [["+", 3, 4, 0, 218, 8, 492, 500, 492, 141, 22], ["+", 0, 218, 8, 492, 500, 492, 3, 4, 0, 24], ["+", 0, 218, 8, 492, 500, 492, 3, 4, 0, 25], ["+", 500, 492, 3, 4, 0, 218, 8, 492, 0, 131]] | 3 | 176 | 4 |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.rea... | import java.io.BufferedReader;
// import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)
throws NumberFormatException, IOException {
// System.setIn(new FileInputStream("./input.txt"));
BufferedReader br... | [["-", 0, 16, 12, 16, 12, 16, 12, 16, 12, 22], ["+", 0, 16, 12, 16, 12, 16, 12, 16, 12, 22], ["-", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22]] | 3 | 230 | 4 |
/* Volume0_3 */
import java.io.*;
import java.util.Arrays;
class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int N = Integer.parseInt(br.readLine());
int[] edges = n... | /* Volume0_3 */
import java.io.*;
import java.util.Arrays;
class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb = new StringBuilder();
int N = Integer.parseInt(br.readLine());
int[] edges = n... | [["-", 0, 492, 500, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 492, 500, 492, 3, 4, 0, 5, 0, 491]] | 3 | 254 | 4 |
import java.util.*;
class Main {
public static void main(String[] a) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int[] hen = new int[3];
for (int i = 0; i < N; i++) {
for (int x = 0; x < 3; x++) {
hen[x] = scanner.nextInt();
}
Arrays.sort(hen);
... | import java.util.*;
class Main {
public static void main(String[] a) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int[] hen = new int[3];
for (int i = 0; i < N; i++) {
for (int x = 0; x < 3; x++) {
hen[x] = scanner.nextInt();
}
Arrays.sort(hen);
... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 167 | 4 |
#include <stdio.h>
int main() {
double a, b, c, d, e, f;
double x, y;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
if ((x = (1 / (a * e - d * b)) * (e * c + -b * f)) == -0.000000)
x = 0.000000;
if ((y = (1 / (a * e - d * b)) * (-d * c + a * f)) == -0.000000)
y ... | #include <stdio.h>
int main() {
double a, b, c, d, e, f;
double x, y;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
if ((x = (1 / (a * e - d * b)) * (e * c + -b * f)) == -0.000000)
x = 0.000000;
if ((y = (1 / (a * e - d * b)) * (-d * c + a * f)) == -0.000000)
y ... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 146 | 2 |
#include <stdio.h>
int main(void) {
double x, y, a, b, c, d, e, f;
while (fscanf(stdin, "%lf %lf %lf %lf %lf %lf\n", &a, &b, &c, &d, &e, &f) >=
0) {
x = (f - e * c / b) / (d - e * a / b);
y = (f - d * c / a) / (e - d * b / a);
x = (x == -0.0) ? 0.0 : x; //-0.0??????
y = (y == -0.0) ? 0.0 :... | #include <stdio.h>
int main(void) {
double x, y, a, b, c, d, e, f;
while (fscanf(stdin, "%lf %lf %lf %lf %lf %lf\n", &a, &b, &c, &d, &e, &f) >=
0) {
x = (f - e * c / b) / (d - e * a / b);
y = (f - d * c / a) / (e - d * b / a);
x = (x == -0.0) ? 0.0 : x; //-0.0??????
y = (y == -0.0) ? 0.0 :... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 144 | 2 |
#include <stdio.h>
int main(void) {
int a[6] = {};
int i = 0;
double x, y;
while (scanf("%d", &a[0]) != EOF) {
for (i = 1; i < 6; i++)
scanf("%d", &a[i]);
y = 1.0 * (a[3] * a[2] - a[0] * a[5]) / (a[3] * a[1] - a[0] * a[4]);
x = 1.0 * (a[2] - a[1] * y) / a[0];
printf("%.3f %.3f", x, y);
... | #include <stdio.h>
int main(void) {
int a[6] = {};
int i = 0;
double x, y;
while (scanf("%d", &a[0]) != EOF) {
for (i = 1; i < 6; i++)
scanf("%d", &a[i]);
y = 1.0 * (a[3] * a[2] - a[0] * a[5]) / (a[3] * a[1] - a[0] * a[4]);
x = 1.0 * (a[2] - a[1] * y) / a[0];
printf("%.3f %.3f\n", x, y)... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 158 | 1 |
#include <stdio.h>
int main() {
int a, b, c, d, e, f;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
float x = (c * e - b * f) / (a * e - b * d);
if (x == 0)
x = 0;
float y = (float)(c * d - a * f) / (b * d - e * a);
if (y == 0)
y = 0;
printf("%.3f %.3f\n", x, y)... | #include <stdio.h>
int main() {
int a, b, c, d, e, f;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
float x = (float)(c * e - b * f) / (a * e - b * d);
if (x == 0)
x = 0;
float y = (float)(c * d - a * f) / (b * d - e * a);
if (y == 0)
y = 0;
printf("%.3f %.3f\n"... | [["+", 49, 50, 51, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 43, 49, 50, 51, 16, 31, 74, 0, 25], ["+", 49, 50, 51, 16, 31, 74, 51, 23, 0, 24]] | 0 | 136 | 3 |
#include <stdio.h>
int main(void) {
double a, b, c, d, e, f;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) > 0) {
f = (f - c / a * d) - (e - b / a * d);
c = c / a - f * b / a;
printf("%.3f %.3f\n", c, f);
}
return 0;
} | #include <stdio.h>
int main() {
double a, b, c, d, e, f;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) > 0) {
f = (f - c / a * d) / (e - b / a * d);
c = c / a - f * b / a;
printf("%.3f %.3f\n", c, f);
}
return 0;
} | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85]] | 0 | 102 | 3 |
#include <stdio.h>
int main(void) {
double a, b, c, d, e, f;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
f = (f - c / a * d) - (e - b / a * d);
c = c / a - f * b / a;
printf("%.3f %.3f\n", c, f);
}
return 0;
} | #include <stdio.h>
int main(void) {
double a, b, c, d, e, f;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
f = (f - c / a * d) / (e - b / a * d);
c = c / a - f * b / a;
printf("%.3f %.3f\n", c, f);
}
return 0;
} | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85]] | 0 | 102 | 2 |
#include <stdio.h>
int main(void) {
float x, y;
int a, b, c, d, e, f;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
x = (c * e - b * f) / (a * e - b * d);
y = (d * c - a * f) / (b * d - a * e);
if (x <= 0 && -0.0005 < x)
x = 0;
if (y <= 0 && -0.0005 < y)
y = 0;
... | #include <stdio.h>
int main(void) {
float x, y;
int a, b, c, d, e, f;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
x = (float)(c * e - b * f) / (a * e - b * d);
y = (float)(d * c - a * f) / (b * d - a * e);
if (x <= 0 && -0.0005 < x)
x = 0;
if (y <= 0 && -0.0005 < y)... | [["+", 0, 11, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 25], ["+", 0, 11, 12, 16, 31, 74, 51, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 24]] | 0 | 145 | 6 |
#include <stdio.h>
#include <stdlib.h>
int main() {
int a, b, c, d, e, f;
float x, y;
while (scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF) {
/*if((b>=0&&e>=0)||(b<0&&e<0)){
x=(c*abs(e)-f*abs(b))/(a*abs(e)-d*abs(b));
y=(d*abs(c)-f*abs(a))/(b*abs(d)-e*abs(a));
}
else{
... | #include <stdio.h>
#include <stdlib.h>
int main() {
int a, b, c, d, e, f;
float x, y;
while (scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF) {
/*if((b>=0&&e>=0)||(b<0&&e<0)){
x=(c*abs(e)-f*abs(b))/(a*abs(e)-d*abs(b));
y=(d*abs(c)-f*abs(a))/(b*abs(d)-e*abs(a));
}
else{
... | [["+", 0, 11, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 25], ["+", 0, 11, 12, 16, 31, 74, 51, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 24]] | 0 | 147 | 6 |
#include <stdio.h>
int main(void) {
int a, b, c, d, e, f;
float x, y;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
x = (float)(c * e - f * b) / (a * e - d * b);
y = (float)(c * d - f * a) / (b * d - e * a);
if (x == -0.0) {
x = 0.0;
}
if (y == -0.0) {
y = 0.... | #include <stdio.h>
int main(void) {
int a, b, c, d, e, f;
float x, y;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
x = (float)(c * e - f * b) / (a * e - d * b);
y = (float)(c * d - f * a) / (b * d - e * a);
if (x == -0.0) {
x = 0.0;
}
if (y == -0.0) {
y = 0.... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 146 | 1 |
#include <stdio.h>
int main(void) {
int a, b, c, d, e, f;
double x, y;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
x = (c * e - b * f) / (a * e - d * b);
y = (a * f - c * d) / (a * e - d * b);
if (-0.0005 < x && x < 0.0005)
x = 0;
if (-0.0005 < y && y < 0.0005)
... | #include <stdio.h>
int main(void) {
int a, b, c, d, e, f;
double x, y;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
x = (float)(c * e - b * f) / (a * e - d * b);
y = (float)(a * f - c * d) / (a * e - d * b);
if (-0.0005 < x && x < 0.0005)
x = 0;
if (-0.0005 < y && ... | [["+", 0, 11, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 25], ["+", 0, 11, 12, 16, 31, 74, 51, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 24]] | 0 | 145 | 6 |
#include <stdio.h>
int main(void) {
float a, b, c, d, e, f, x, y;
while (scanf("%f%f%f%f%f%f", &a, &b, &c, &d, &e, &f) != EOF) {
y = (c * d - f * a) / (b * d - e * a);
x = (c - b * y) / a;
printf("%.3f %.3f", x, y);
}
return 0;
}
| #include <stdio.h>
int main(void) {
float a, b, c, d, e, f, x, y;
while (scanf("%f%f%f%f%f%f", &a, &b, &c, &d, &e, &f) != EOF) {
y = (c * d - f * a) / (b * d - e * a);
x = (c - b * y) / a;
printf("%.3f %.3f\n", x, y);
}
return 0;
}
| [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 105 | 1 |
#include <stdio.h>
int main(void) {
float x, y, a, b, c, d, e, f;
while (scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF) {
y = (((d * c) - (a * f)) / ((d * b) - (a * e)));
x = (c - (b * y)) / a;
printf("%f %f\n", x, y);
}
return 0;
}
| #include <stdio.h>
int main(void) {
float x, y, a, b, c, d, e, f;
while (scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF) {
y = (((d * c) - (a * f)) / ((d * b) - (a * e)));
x = (c - (b * y)) / a;
printf("%.3f %.3f\n", x, y);
}
return 0;
}
| [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 118 | 2 |
float d, b, f, e, c, a;
main(x) {
for (; ~scanf("%f", &a + x);)
if (--x == -6)
d = a * d - f * e,
x = !printf("%.3f %.3f\n", (e - c * d) / a, d /= a * b - c * f);
exit(0);
} | float d, b, f, e, c, a;
X;
main() {
for (; ~scanf("%f", &a + X);)
if (--X == -6)
d = a * d - f * e,
X = !printf("%.3f %.3f\n", (e - c * d) / a, d /= a * b - c * f);
exit(0);
} | [["+", 36, 36, 36, 36, 0, 30, 0, 1, 0, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 1, 0, 35], ["-", 36, 36, 0, 30, 0, 14, 49, 65, 0, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 15, 91, 28, 2, 3, 4, 0, 16, 12, 22], ["+", 15, 91, 28, 2, 3, 4, 0, 16, 12, 22], ["-", 8, 57, 15, 23, 0, 16, 31, 27, 28, 22], ["+", 8, 57, 15, 23... | 0 | 89 | 10 |
#include <stdio.h>
int main() {
int a, b, c, d, e, f;
while (scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF) {
printf("%lf %lf\n", (double)(c * e - b * f) / (a * e - b * d) + 1e-15,
(double)(a * f - c * d) / (a * e - b * d) + 1e-15);
}
return 0;
} | #include <stdio.h>
int main() {
int a, b, c, d, e, f;
while (scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF) {
printf("%.3lf %.3lf\n", (double)(c * e - b * f) / (a * e - b * d) + 1e-15,
(double)(a * f - c * d) / (a * e - b * d) + 1e-15);
}
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 113 | 2 |
main() {
double a, b, c, d, e, f, g, h;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != -1) {
g = (b * f - c * e) / (b * d - a * e);
h = (a * f - c * d) / (a * e - b * d);
if (0.0005 > g)
if (g > -0.0005)
g = 0.0;
if (0.0005 > h)
if (h > -0.0005)
h = 0.... | main() {
double a, b, c, d, e, f, g, h;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != -1) {
g = (b * f - c * e) / (b * d - a * e);
h = (a * f - c * d) / (a * e - b * d);
if (0.0005 > g)
if (g > -0.0005)
g = 0.0;
if (0.0005 > h)
if (h > -0.0005)
h = 0.... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 144 | 2 |
#include <stdio.h>
int main(void) {
int xs[2], ys[2], eqs[2];
float x, y;
while (~scanf("%d %d %d %d %d %d", xs, ys, eqs, xs + 1, ys + 1, eqs + 1)) {
x = (eqs[0] * ys[1] - eqs[1] * ys[0]) / (xs[0] * ys[1] - xs[1] * ys[0]);
y = (eqs[1] * xs[0] - eqs[0] * xs[1]) / (xs[0] * ys[1] - xs[1] * ys[0]);
if ... | #include <stdio.h>
int main(void) {
int xs[2], ys[2], eqs[2];
float x, y;
while (~scanf("%d %d %d %d %d %d", xs, ys, eqs, xs + 1, ys + 1, eqs + 1)) {
x = 1. * (eqs[0] * ys[1] - eqs[1] * ys[0]) /
(xs[0] * ys[1] - xs[1] * ys[0]);
y = 1. * (eqs[1] * xs[0] - eqs[0] * xs[1]) /
(xs[0] * ys[1] ... | [["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48]] | 0 | 189 | 4 |
#include <stdio.h>
int main(void) {
int xs[2], ys[2], eqs[2];
float x, y;
while (~scanf("%d %d %d %d %d %d", xs, ys, eqs, xs + 1, ys + 1, eqs + 1)) {
x = -1. * (eqs[0] * ys[1] + eqs[1] * ys[0]) /
(xs[0] * ys[1] - xs[1] * ys[0]);
y = 1. * (eqs[1] * xs[0] - eqs[0] * xs[1]) /
(xs[0] * ys[1]... | #include <stdio.h>
int main(void) {
int xs[2], ys[2], eqs[2];
float x, y;
while (~scanf("%d %d %d %d %d %d", xs, ys, eqs, xs + 1, ys + 1, eqs + 1)) {
x = 1. * (eqs[0] * ys[1] - eqs[1] * ys[0]) /
(xs[0] * ys[1] - xs[1] * ys[0]);
y = 1. * (eqs[1] * xs[0] - eqs[0] * xs[1]) /
(xs[0] * ys[1] ... | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 13], ["-", 12, 16, 31, 16, 12, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 16, 12, 23, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 41, 0, 101], ["+", 0, 1, 0, 2, 3, 4, 0, 41, 0, 102], ["+", 0, 1, 0, 2, 3, 4, 0, 41, 75, 13]] | 0 | 174 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.