submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s557911366 | p00003 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <math.h>
using namespace std;
int main(){
double a[1010], n, s, k=0, i=0;
cin >> n;
for(i=0; i<n;i++){
cin>>a[0]>>a[1]>>a[2];
sort(a, a+3);
k=(a[1]*a[1])+(a[0]*a[0]);
if(... | a.cc: In function 'int main()':
a.cc:12:14: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
12 | sort(a, a+3);
| ^~~~
| sqrt
|
s335837422 | p00003 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int num[3],n;
cin>>n;
for(int i=0;i<n;i++){
cin>>num[0]>>num[1]>>cnum[2];
sort(num,num+3);
if(num[0]*num[0]+num[1]*num[1]==num[2]*num[2]){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:22: error: 'cnum' was not declared in this scope; did you mean 'num'?
8 | cin>>num[0]>>num[1]>>cnum[2];
| ^~~~
| num
|
s624513829 | p00003 | C++ | #include <stdlib.h>
#include <stdio.h>
typedef struct triangle_cont {
int sideOne;
int sideTwo;
int sideThree;
} triangle;
int main () {
int numberOfTriangles, i;
scanf("%d", &numberOfTriangles);
if (numberOfTriangles > 1000)
return;
triangle x[numberOfTriangles];
for (i = 0; i < numberOfTriangles; i++) {
... | a.cc: In function 'int main()':
a.cc:14:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
14 | return;
| ^~~~~~
|
s640756733 | p00003 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
long dd(int n){
return n*n;
}
int main(){
int n, t[3];
cin >> n;
for(int i=0; i<n; ++i){
for(int j=0; j<3; ++j)
scanf(" %d", &t[j]);
sort(t, t+3);
if( dd(t[2]) == dd(t[0])+dd(t[1]) ) printf("YES\n");
else printf("NO\n");... | a.cc: In function 'int main()':
a.cc:19:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
19 | sort(t, t+3);
| ^~~~
| sqrt
|
s171800021 | p00003 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main () {
int v[3]; cin >> v[0];
while (cin >> v[0] >> v[1] >> v[2])
sort (v, v+3), cout << (*v**v + *(v+1)**(v+1) == *(v+2)**(v+2) ? "YES" : "NO") << endl;
} | a.cc:4:12: error: extended character is not valid in an identifier
4 | int main () {
| ^
a.cc:4:12: error: expected initializer before '\U00003000'
4 | int main () {
| ^~
|
s360139762 | p00003 | C++ | #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];
sort(a,a+3);//a[0]<=a[1]<=a[2]
if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'sort' was not declared in this scope; did you mean 'short'?
8 | sort(a,a+3);//a[0]<=a[1]<=a[2]
| ^~~~
| short
|
s590237179 | p00003 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main()
{
int ignore;
cin >> ignore;
int fi;
int se;
int th;
vector<int> v;
while(cin >> fi >> se >> th)
{
v.push_back(fi);
v.push_back(se);
v.push_back(th);
sort(v.begin(), v.end(), greater<... | a.cc: In function 'int main()':
a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'short'?
20 | sort(v.begin(), v.end(), greater<int>());
| ^~~~
| short
|
s533242587 | p00003 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
using namespace std;
int main()
{
int n;
cin >>n;
for(int i=0;i<n;i++){
int a,b,c;
cin >>a >>b >>c;
int tmp;
if(b>=a && b>=c){
tmp = b;
b = a;
a = tmp;
}else if(c>=a && c>=b){
tmp = c;
c = a;
a = tmp;
}
if(a*a = b*b + c*c){
cout <<"YES" <<en... | a.cc: In function 'int main()':
a.cc:24:13: error: lvalue required as left operand of assignment
24 | if(a*a = b*b + c*c){
| ~^~
a.cc:32:2: error: expected '}' at end of input
32 | }
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s919978022 | p00003 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
int i, n, a, b, c;
vector<int> triangle;
cin >> n;
for (i = 0; i < n; i++) {
cin >> a;
cin >> b;
cin >> c;
triangle.push_back(a);
triangle.push_back(b);
trian... | a.cc: In function 'int main()':
a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'?
21 | sort(triangle.begin(), triangle.end());
| ^~~~
| short
|
s323435979 | p00003 | C++ | #include<iostream>
#include<math.h>
using namespace std;
void main()
{
/*FILE *a;
char b[20],op;
int p,cod,caso;
float c;
do
{
fflush(stdin);
cout<<"\nLa Cato S.A"<<endl;
cout<<"\nA.Crear archivo.\nB.Ingresar Cliente. \nC.Mostrar Clientes. \nD.Salir del programa"<<endl;
cin>>op;
switch (op)
{
case '... | a.cc:4:1: error: '::main' must return 'int'
4 | void main()
| ^~~~
|
s083135633 | p00003 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
for (int i = 0; i < n; i++) {
String[] array = sc.nextLine().split("[\\s]");
int n1 = Integer.parse... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s759945170 | p00003 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int n;
int t[3];
cin >> n;
for(int i=0;i<n;i++){
for(int j=0;j<3;j++) cin >> t[j];
sort(t,t+3); //昇順
if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2]) cout << "YES" << endl;
else
cout << "NO" <<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:8: error: 'a' was not declared in this scope
13 | if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2]) cout << "YES" << endl;
| ^
|
s259919828 | p00003 | C++ | #include <iostream>
#incude <cmath>
using namespace std;
int main () {
int n, a,b,c,i;
for(i=0;i<n;i++){
cin >> a >> b >> c;
if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "Yes" << endl;
else cout << " No" << endl;
}
} | a.cc:2:2: error: invalid preprocessing directive #incude; did you mean #include?
2 | #incude <cmath>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:9:12: error: 'hypot' was not declared in this scope
9 | if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "Yes" << endl;
... |
s886903860 | p00003 | C++ | #include <iostream>
#include <cmath>
using namespace std;
int main () {
int n,i;
float a,b,c
for(i=0;i<n;i++){
cin >> a >> b >> c;
if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "YES" << endl;
else cout << " NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'for'
8 | for(i=0;i<n;i++){
| ^~~
a.cc:8:20: error: expected ';' before ')' token
8 | for(i=0;i<n;i++){
| ^
| ;
|
s386746972 | p00003 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
ci<<n;
while(n--){
vector<int> v(3);
for (int i = 0; i < 3; ++i){
cin>>v[i];
}
sort(v.begin(), v.end());
if (v[2]*v[2] == v[0]*v[0] + v[1]*v[1])
cout<<"YES";
else
cout<<"NO";
cout<<endl... | a.cc: In function 'int main()':
a.cc:7:9: error: 'ci' was not declared in this scope
7 | ci<<n;
| ^~
a.cc:7:13: error: 'n' was not declared in this scope
7 | ci<<n;
| ^
|
s332771026 | p00003 | C++ | #include<stdio.h>
void temp(int x,int y,int z)
{
int tmp;
if(x<y){tmp=y;y=x;x=tmp;}
if(x<z){tmp=x;x=z;z=tmp;}
if(y<z){tmp=z;z=y;y=tmp;}
}
int main()
{
int x,y,z.n;
scanf("%d",&n);
while(n-->=0)
{
scanf("%d",&x);scanf("%d",&y);scanf("%d",&z);
temp(x,y,z);
if(x*x=y*y+z*z)printf("YES\n");
else printf("NO\n");
}
return ... | a.cc: In function 'int main()':
a.cc:11:10: error: expected initializer before '.' token
11 | int x,y,z.n;
| ^
a.cc:12:13: error: 'n' was not declared in this scope
12 | scanf("%d",&n);
| ^
a.cc:15:43: error: 'z' was not declared in this scope
15 | scanf("%d",&x);scanf("%d",&y)... |
s966665018 | p00003 | C++ | #include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
int n;
int a,b,c;
cin >> n;
while (n)
{
cin >> a >> b >> c;
if (pow(c, 2) == pow(a, 2) + pow(b, 2))
cout << "YES" << endl;
else
cout << "NO" << endl;
n--;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:19:21: error: 'pow' was not declared in this scope
19 | if (pow(c, 2) == pow(a, 2) + pow(b, 2))
| ^~~
|
s137965846 | p00003 | C++ | #include <cstdio>
#include <algorithm>
int main() {
int n; scanf("%d", &n);
for(int i = 0; i < n; ++i) {
int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]);
sort(s, s + 3);
int a=s[0], b=s[1], c=s[2];
if (c*c == (a+b)*(a+b)) puts("YES");
else puts("NO");
}
} | a.cc: In function 'int main()':
a.cc:8:53: error: expected identifier before numeric constant
8 | int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]);
| ^
a.cc: In lambda function:
a.cc:8:55: error: expected '{' before ')' token
8 | int s[3];... |
s133606667 | p00003 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
int main() {
int n; scanf("%d", &n);
for(int i = 0; i < n; ++i) {
int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]);
sort(s, s + 3);
int a=s[0], b=s[1], c=s[2];
if (c*c == (a+b)*(a+b)) puts("YES");
else p... | a.cc: In function 'int main()':
a.cc:10:53: error: expected identifier before numeric constant
10 | int s[3]; scanf("%d %d %d", &s[0], &s[1], &[2]);
| ^
a.cc: In lambda function:
a.cc:10:55: error: expected '{' before ')' token
10 | int s[3... |
s571763418 | p00003 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CSharpPractice
{
class Program
{
static bool IsRightTriangle(int a, int b, int c)
{
return a * a + b * b == c * c;
}
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
for (int j =... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
s993543662 | p00003 | C++ | #include <iostream>
using namespace std;
int loop;
int panjang[1000][3];
int y = 0;
int temp;
int main()
{
cin >> loop;
for(int x=0;x<loop;x++)
{
cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
}
for(int looper= 0;looper<loop;looper++)
{
for(int looper2 = 0;looper2<5;looper2++)
{
if((panja... | a.cc: In function 'int main()':
a.cc:36:12: error: expected primary-expression before ';' token
36 | cout << std;
| ^
|
s508408079 | p00003 | C++ | #include <iostream>
using namespace std;
int loop;
int panjang[1000][1000];
int y = 0;
int temp = 0;
int main()
{
cin >> loop;
for(int x=0;x<loop;x++)
{
cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
}
for(int looper= 0;looper<loop;looper++)
{
for(int looper2 = 0;looper2<4;looper2++)
{
i... | a.cc: In function 'int main()':
a.cc:45:2: error: expected '}' at end of input
45 | }
| ^
a.cc:9:1: note: to match this '{'
9 | {
| ^
|
s593196540 | p00003 | C++ | #include<iostream>
int main(){
int a,b,c,n,i;
std::cin>>n;
for(i=0;i<n;i++){
std::cin>>a>>b>>c;
if(a*a==b*b+c*c)std::cout<<"YES"<<std::endl;
else if(b*b==a*a+c*c)std::cout<<"YES"<<std::endl;
else if(c*c==a*a+b*b)std::cout<<"YES"<<std::endl;
else std::cout<<"NO"<<std::endl;
}
return 0; | a.cc: In function 'int main()':
a.cc:12:10: error: expected '}' at end of input
12 | return 0;
| ^
a.cc:2:11: note: to match this '{'
2 | int main(){
| ^
|
s253344389 | p00003 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b, c, buf;
int n;
bool x[1000];
cin >> n;
for(int i = 0; i < n; i++){
cin >> a >> b >> c;
if(c > b){
buf = c;
c = b;
b = buf;
}
if(b > a){
buf = b;
b = a;
a = buf;
}
if(a*a==b*b+c*c)
x[... | a.cc: In function 'int main()':
a.cc:31:2: error: expected '}' at end of input
31 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s332259777 | p00003 | C++ | /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003&lang=jp*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n;
cin>>n;
for (int i = 0; i < n; ++i) {
vector<int> lens;
for (int j = 0; j < 3; ++j) {
int tmp;
... | a.cc: In function 'int main()':
a.cc:21:12: error: 'pow' was not declared in this scope
21 | if(pow(lens[0],2)==pow(lens[1],2)+pow(lens[2],2)){
| ^~~
|
s343618596 | p00003 | C++ | #include<stdio.h>
#include<iostream>
#include<cmath>
using namespace std;
int main() {
int a, b, c, n;
cin >> n;
for(int i = 0; i < n; i++) {
cin >> 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; | a.cc: In function 'int main()':
a.cc:16:18: error: expected '}' at end of input
16 | return 0;
| ^
a.cc:6:12: note: to match this '{'
6 | int main() {
| ^
|
s861100964 | p00003 | C++ | #include <algorithm>
#include <iostream>
int pow2(int i) {
return std::pow(i, (double) 2);
}
int main() {
int in[3];
while (std::cin >> in[0] >> in[1] >> in[2]) {
std::sort(in, in + 3);
if (pow2(in[2]) == pow2(in[0]) + pow2(in[1]))
std::cout << "YES" << std::endl;
else
std::cout << "NO" << std::endl;
... | a.cc: In function 'int pow2(int)':
a.cc:5:21: error: 'pow' is not a member of 'std'
5 | return std::pow(i, (double) 2);
| ^~~
|
s271076166 | p00003 | C++ | #include <algorithm>
#include <iostream>
int pow2(int i) {
return std::pow((double) i, (double) 2);
}
int main() {
int in[3];
while (std::cin >> in[0] >> in[1] >> in[2]) {
std::sort(in, in + 3);
if (pow2(in[2]) == pow2(in[0]) + pow2(in[1]))
std::cout << "YES" << std::endl;
else
std::cout << "NO" << std... | a.cc: In function 'int pow2(int)':
a.cc:5:21: error: 'pow' is not a member of 'std'
5 | return std::pow((double) i, (double) 2);
| ^~~
|
s624662305 | p00003 | C++ | #include <stdio.h>
int main(void) {
int a,b,c,i,j;
scanf("%d",&j);
for (i=1;i<=j;i++){
scanf("%d%d%d",&a,&b,&c);
if (a*a + b*b == c*c||a*a + c*c == b*b||c*c + b*b == a*a){
printf("YES");
}
else{
printf("NO");
}
}
}
}
return 0;
} | a.cc:16:17: error: expected declaration before '}' token
16 | }
| ^
a.cc:17:9: error: expected unqualified-id before 'return'
17 | return 0;
| ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s912939664 | p00003 | C++ | #include<iostream>
#include<stdio.h>
int main(){
int a,b,c;
std::cin>>a;
std::cin>>b;
std::cin>>c;
if (a*a==b*b+c*c) {std::cout<<"YES"<<std::endl};
else if(b*b==a*a+c*c) {std::cout<<"YES"<<std::endl};
else if(c*c==a*a+b*b) {std::cout<<"YES"<<std::endl};
else std::cout<<"NO"<<std::endl;
retu... | a.cc: In function 'int main()':
a.cc:9:54: error: expected ';' before '}' token
9 | if (a*a==b*b+c*c) {std::cout<<"YES"<<std::endl};
| ^
| ;
a.cc:10:3: error: 'else' without a previous 'if'
... |
s492843130 | p00003 | C++ | #include<iostream>
#include<stdio.h>
int main(){
int a,b,c;
std::cin>>a;
std::cin>>b;
std::cin>>c;
if (a*a==b*b+c*c) {std::cout<<"YES"<<std::endl};
else if(b*b==a*a+c*c) {std::cout<<"YES"<<std::endl};
else if(c*c==a*a+b*b) {std::cout<<"YES"<<std::endl};
else std::cout<<"NO"<<std::endl;
retu... | a.cc: In function 'int main()':
a.cc:9:54: error: expected ';' before '}' token
9 | if (a*a==b*b+c*c) {std::cout<<"YES"<<std::endl};
| ^
| ;
a.cc:10:3: error: 'else' without a previous 'if'
... |
s906377981 | p00003 | C++ | #include<iostream>
int main(){
int a,b,c;
std::cin>>a>>b>>c
if(a*a+b*b==c*c){
std::cout<<"YES";
}else if(a*a+c*c==b*b){
std::cout<<"YES";
}else if(b*b+c*c==a*a){
std::cout<<"YES";
}else{
std::cout<<"NO";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:26: error: expected ';' before 'if'
5 | std::cin>>a>>b>>c
| ^
| ;
6 | if(a*a+b*b==c*c){
| ~~
a.cc:8:10: error: 'else' without a previous 'if'
8 | }else i... |
s872076950 | p00003 | C++ | 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 a=0;a<=n;a++){
for(int d=0;d<3;d++ ){
i[d]=sc.nextInt();
Arrays.sort(i);
if((i[2]*i[2])==(i[0]*i[0])+(i[1]*i[1])){
System.ou... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s037644612 | p00003 | C++ | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Main {
/**
* <p>
* 与えられた三辺で直角三角形が作れるかを判定する。
* </p>
*
* @param args
* 利用しない。
* @throws IOException
*/
p... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fm... |
s714106354 | p00003 | C++ | import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int a;
int b;
int c;
int N = stdIn.nextInt();
int count = 0;
int box;
while (true) {
if(N<=0){
break;
}
a = stdIn.nextInt();
b = stdIn.nextInt();
c = stdIn.next... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class A {
| ^~~~~~
|
s253588988 | p00003 | C++ | #include <stdio.h>
void right_triangle (int x, int y, int z)
{
scanf("%d %d %d", &x, &y, &z);
if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){
printf("YES\n");
} else {
printf("NO\n");
}
}
int main(void)
{
int n;
scanf("%d", &n);
for (int i = 0; ... | a.cc: In function 'void right_triangle(int, int, int)':
a.cc:6:55: error: lvalue required as left operand of assignment
6 | if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){
| ~~~~~~~~~~~~~~^~~~~~~~
a.cc: In function 'int main()':
a.cc:18:... |
s015253473 | p00003 | C++ | #include <stdio.h>
void right_triangle (int x, int y, int z)
{
if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){
printf("YES\n");
} else {
printf("NO\n");
}
}
int main(void)
{
int n;
scanf("%d", &n);
for (int i = 0; i < n; ++i){
int x, y, z;
... | a.cc: In function 'void right_triangle(int, int, int)':
a.cc:5:55: error: lvalue required as left operand of assignment
5 | if(x * x = y * y + z * z || y * y = z * z + x * x || z * z = x * x + y * y){
| ~~~~~~~~~~~~~~^~~~~~~~
|
s601907818 | p00003 | C++ | #include <stdio.h>
#include <stdbool.h>
void judge(int x, int y, int z)
{
static bool flag = false;
if (x * x + y * y == z * z){
flag = true;
}
}
int main(void)
{
int repeat, a, b, c;
scanf("%d", &repeat);
for (int i = 0; i < repeat ; ++i){
scanf("%d %d %d", &a, &b, &c)... | a.cc: In function 'int main()':
a.cc:22:13: error: 'flag' was not declared in this scope
22 | if (flag == true){
| ^~~~
|
s230819990 | p00003 | C++ | #include <stdio.h>
#include <stdbool.h>
void judge(int x, int y, int z, bool flag)
{
if (x * x + y * y == z * z){
flag = true;
}
}
int main(void)
{
int repeat, a, b, c;
bool flag = false;
scanf("%d", &repeat);
for (int i = 0; i < repeat ; ++i){
scanf("%d %d %d", &a, &b,... | a.cc: In function 'int main()':
a.cc:19:15: error: too few arguments to function 'void judge(int, int, int, bool)'
19 | judge (a, b, c);
| ~~~~~~^~~~~~~~~
a.cc:4:6: note: declared here
4 | void judge(int x, int y, int z, bool flag)
| ^~~~~
a.cc:20:15: error: too few arguments to ... |
s924735153 | p00003 | C++ | #include <stdio.h>
int triJudgefunc(int x, int y, int z);
int main(void)
{
int row;
scanf("%d", &row);
for (int i = 0; i < row; ++i) {
int firstn, secondn ,thirdn;
scanf("%d %d %d", &firstn, &secondn, &thirdn);
if (judgefunc(firstn, secondn, thirdn) = true) {
printf("YES\n... | a.cc: In function 'int main()':
a.cc:12:13: error: 'judgefunc' was not declared in this scope; did you mean 'triJudgefunc'?
12 | if (judgefunc(firstn, secondn, thirdn) = true) {
| ^~~~~~~~~
| triJudgefunc
|
s404160824 | p00003 | C++ | #include <stdio.h>
int triJudgefunc(int x, int y, int z);
int main(void)
{
int row;
scanf("%d", &row);
for (int i = 0; i < row; ++i) {
int firstn, secondn ,thirdn;
scanf("%d %d %d", &firstn, &secondn, &thirdn);
if (triJudgefunc(firstn, secondn, thirdn) = true) {
printf("... | a.cc: In function 'int main()':
a.cc:12:25: error: lvalue required as left operand of assignment
12 | if (triJudgefunc(firstn, secondn, thirdn) = true) {
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
|
s560257073 | p00003 | C++ | #include <stdio.h>
int triJudgefunc(int x, int y, int z);
int main(void)
{
int row;
scanf("%d", &row);
for (int i = 0; i < row; ++i) {
int firstn, secondn ,thirdn;
scanf("%d %d %d", &firstn, &secondn, &thirdn);
if (triJudgefunc(firstn, secondn, thirdn) = true) {
printf... | a.cc: In function 'int main()':
a.cc:12:25: error: lvalue required as left operand of assignment
12 | if (triJudgefunc(firstn, secondn, thirdn) = true) {
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
|
s067177277 | p00003 | C++ | #include <stdio.h>
int triJudgefunc(int x, int y, int z);
int main(void)
{
int row;
scanf("%d", &row);
for (int i = 0; i < row; ++i) {
int firstn, secondn ,thirdn;
scanf("%d %d %d", &firstn, &secondn, &thirdn);
if (triJudgefunc(firstn, secondn, thirdn) = 0) {
printf(... | a.cc: In function 'int main()':
a.cc:12:25: error: lvalue required as left operand of assignment
12 | if (triJudgefunc(firstn, secondn, thirdn) = 0) {
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
|
s803368894 | p00003 | C++ | #include <stdio.h>
int triJudgefunc(int x, int y, int z);
int main(void)
{
int row;
scanf("%d", &row);
for (int i = 0; i < row; ++i) {
int firstn, secondn ,thirdn;
scanf("%d %d %d", &firstn, &secondn, &thirdn);
if (triJudgefunc(firstn, secondn, thirdn) = 0) {
print... | a.cc: In function 'int main()':
a.cc:12:25: error: lvalue required as left operand of assignment
12 | if (triJudgefunc(firstn, secondn, thirdn) = 0) {
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
|
s618320501 | p00003 | C++ | #include <stdio.h>
int triJudgefunc(int x, int y, int z);
int main(void)
{
int row;
scanf("%d", &row);
for (int i = 0; i < row; ++i) {
int firstn, secondn ,thirdn;
scanf("%d %d %d", &firstn, &secondn, &thirdn);
if (triJudgefunc(firstn, secondn, thirdn) = 0) {
print... | a.cc: In function 'int main()':
a.cc:12:25: error: lvalue required as left operand of assignment
12 | if (triJudgefunc(firstn, secondn, thirdn) = 0) {
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
|
s546522323 | p00003 | C++ | #include <stdio.h>
int print(void)
{
if (C == A + B) {
printf("YES\n");
} else if (A == B + C) {
printf("YES\n");
} else if (B == C + A) {
printf("YES\n");
} else {
printf("NO\n");
}
}
int main(void)
{
int i, N, a, b, c, A, B, C;
scanf("%d", &N);
for (i... | a.cc: In function 'int print()':
a.cc:5:9: error: 'C' was not declared in this scope
5 | if (C == A + B) {
| ^
a.cc:5:14: error: 'A' was not declared in this scope
5 | if (C == A + B) {
| ^
a.cc:5:18: error: 'B' was not declared in this scope
5 | if (C == A + B) ... |
s350836329 | p00003 | C++ | #include<iostream>
using namespace std;
int main(){
int n;
int a,b,c;
int tmp;
cin >> n;
for(int i=0;i<n;i++)
{
cin >> a >> b >> c;
}
if(a>c){
tmp=a;
a=c;
c=tmp;
}
if(b>c){
tmp=b;
b=c;
c=tmp;
}
if(a*a+b*b==c*c)
cin >> YES >> endl;
else
cin >> NO >>... | a.cc: In function 'int main()':
a.cc:27:12: error: 'YES' was not declared in this scope
27 | cin >> YES >> endl;
| ^~~
a.cc:29:12: error: 'NO' was not declared in this scope
29 | cin >> NO >> endl;
| ^~
|
s798287650 | p00003 | C++ | #include<iostream>
using namespace std;
int main(){
int n;
int a,b,c;
int tmp;
cin >> n;
for(int i=0;i<n;i++)
{
cin >> a >> b >> c;
}
if(a>c){
tmp=a;
a=c;
c=tmp;
}
if(b>c){
tmp=b;
b=c;
c=tmp;
}
if(a*a+b*b==c*c)
cout >> "YES" >> endl;
else
cout >> "... | a.cc: In function 'int main()':
a.cc:27:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
27 | cout >> "YES" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::ostream {aka std::b... |
s361501348 | p00003 | C++ | #include<stdio.h>
int main()
{
int a, b, c, d, c2;
a = 0;
b = 0;
c = 0;
d = 0;
c2 = 0;
while(scanf("%d %d %d", &a, &b, &c)(
{
d = a * a + b * b;
c2 = c * c;
if( d == c2 )
{
printf("YES");
}
else
{
printf("NO");
}
}
} | a.cc: In function 'int main()':
a.cc:12:34: error: expected '}' before ';' token
12 | d = a * a + b * b;
| ^
a.cc:11:9: note: to match this '{'
11 | {
| ^
a.cc:12:34: error: expected ')' before ';' token
12 | d = a * a... |
s412575673 | p00003 | C++ | #include<iostream>
int main()
{
int a, b, c, d, c2;
a = 0;
b = 0;
c = 0;
d = 0;
c2 = 0;
while(cin >> a >> b >> c)
{
d = a * a + b * b;
c2 = c * c;
if( d == c2 )
{
cout << "YES" << endl;
}
else
{
cout << "NO" << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:10:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
10 | while(cin >> a >> b >> c)
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | ... |
s274676238 | p00003 | C++ | #include<iostream>
using namespace std;
int main()
{
int a, b, c, d, c2, irekae;
a = 0;
b = 0;
c = 0;
d = 0;
c2 = 0;
for( i = 0; i < n; i++)
{
cin << a << b << c;
d = (a * a) + (b * b);
c2 = (c * c);
cout << d << " " << c2;
if( d == c2 )
{
cout << "YES" << endl;
}
else
{
cout << "... | a.cc: In function 'int main()':
a.cc:11:14: error: 'i' was not declared in this scope
11 | for( i = 0; i < n; i++)
| ^
a.cc:11:25: error: 'n' was not declared in this scope
11 | for( i = 0; i < n; i++)
| ^
a.cc:13:21: error: no match for 'operator<<... |
s309035460 | p00003 | C++ | #include<iostream>
using namespace std;
int main()
{
int a, b, c, d, c2, irekae, i;
a = 0;
b = 0;
c = 0;
d = 0;
c2 = 0;
for( i = 0; i < n; i++)
{
cin << a << b << c;
d = (a * a) + (b * b);
c2 = (c * c);
cout << d << " " << c2;
if( d == c2 )
{
cout << "YES" << endl;
}
else
{
cout <... | a.cc: In function 'int main()':
a.cc:11:25: error: 'n' was not declared in this scope
11 | for( i = 0; i < n; i++)
| ^
a.cc:13:21: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
13 | cin << a << b... |
s862250794 | p00003 | C++ | #include <iostream>
#include <algorithm>
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);
cout << ((i[0]*i[0]+i[1]*i[1]==i[2]*i[2])?"YES\n":"NO\n";
}} | a.cc: In function 'int main()':
a.cc:12:57: error: expected ')' before ';' token
12 | cout << ((i[0]*i[0]+i[1]*i[1]==i[2]*i[2])?"YES\n":"NO\n";
| ~ ^
| )
|
s959167815 | p00003 | C++ | #include<stdio.h>
int main(){
int n,a,b,c,t;
scanf("%d",&n);
while(n--){
scnaf("%d %d %d",&a,&b,&c);
if(a<b){t=a;a=b;b=t;}
if(a<c){t=a;a=c;c=t;}
if(a*a==b*b+c*c)printf("Yes\n");
else printf("No\n);
}
return 0;
} | a.cc:10:24: warning: missing terminating " character
10 | else printf("No\n);
| ^
a.cc:10:24: error: missing terminating " character
10 | else printf("No\n);
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'scnaf' was not d... |
s235057746 | p00003 | C++ | gets.to_i.times do
a=gets.split.map(&:to_i).sort
if a[0]*a[0]+a[1]*a[1]==a[2]*a[2] then puts "YES"
else puts "NO"
end
end | a.cc:1:1: error: 'gets' does not name a type
1 | gets.to_i.times do
| ^~~~
|
s623597564 | p00003 | C++ | #include<stdio.h>
int main(void)
{
int n,a,b,c,i,l;
scanf("%d",&n);
for(i=0;i<n;i++){
l=0;
scanf("%d %d %d",&a,&b,&c);
if(a<c&&b<c){
if(a*a+b*b==c*c){
l=1;
printf("YES\n");
}
}
else if(a<b&&c<b){
if(a*a+c*c==b*b){
l=1;
printf("YES\n");
}
}
else if(b<a&&c<a){
if(c*c+b*b==a*a){
l=1;
... | a.cc: In function 'int main()':
a.cc:31:18: error: expected '}' at end of input
31 | return 0;
| ^
a.cc:3:1: note: to match this '{'
3 | {
| ^
|
s645998336 | p00003 | C++ | if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a){
#include <iostream>
using namespace std;
int main(){
int a;
int b;
int c;
int n;
cin >> n;
for(int i=1; i<=n; i++){
cin >> a >> b >> c;
if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a){
cout << "Yes\n";
}
else {
cout << "No" << endl;
}
}
... | a.cc:1:17: error: expected unqualified-id before 'if'
1 | if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a){
| ^~
|
s698440708 | p00003 | C++ | #include<stido.h>
int main(void)
{
int a,b,c1,c2,c3,i;
scanf("%d",&a);
for(i=0;i<a;i++){
scanf("%d %d %d",&c1,&c2,&c3);
}
if(c1*c1+c2*c2==c3*c3){
printf("YES\n");
}
else if(c1*c1+c3*c3==c2*c2){
printf("YES\n");
}
else if(c2*c2+c3*c3==c1*c1){
printf("YES\n");
}
else{
printf("NO\n");
}
return 0;
} | a.cc:1:9: fatal error: stido.h: No such file or directory
1 | #include<stido.h>
| ^~~~~~~~~
compilation terminated.
|
s958056684 | p00003 | C++ | #include<iostream>
#include<utility>
#include<climits>
using namespace std;
int main()
{
double a, b, c;
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> a >> b >> c;
if (pow(a, 2) == pow(b, 2) + pow(c, 2)
||pow(b, 2) == pow(c, 2) + pow(a, 2)
||pow(c, 2) == pow(a, 2) + pow(b, 2))
{cout << "Y... | a.cc: In function 'int main()':
a.cc:16:21: error: 'pow' was not declared in this scope
16 | if (pow(a, 2) == pow(b, 2) + pow(c, 2)
| ^~~
|
s831471097 | p00003 | C++ | import java.util.*;
import java.io.*;
import java.awt.geom.*;
import java.math.*;
public class Main {
static final Scanner in = new Scanner(System.in);
static final PrintWriter out = new PrintWriter(System.out,false);
static void solve() {
int n = in.nextInt();
while (n-- > 0) {
int a = in.nextInt();
i... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: ... |
s539287045 | p00003 | C++ | #include<stdio.h>
int main(void){
int n1, n2, n3, m;
scanf("%d\n",&m);
for(i = 0;i < m;i++) {
scanf("%d %d %d",&n1,&n2,&n3);
if(n1 * n1 + n2 * n2 = n3 * n3)
printf("YES");
else
printf("NO");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'i' was not declared in this scope
6 | for(i = 0;i < m;i++) {
| ^
a.cc:8:20: error: lvalue required as left operand of assignment
8 | if(n1 * n1 + n2 * n2 = n3 * n3)
| ~~~~~~~~^~~~~~~~~
|
s115374373 | p00003 | C++ | #include<stdio.h>
int main(void){
int n1, n2, n3, m;
scanf("%d",&m);
for(i = 0;i < m;i++) {
scanf("%d %d %d",&n1,&n2,&n3);
if(n1 * n1 + n2 * n2 = n3 * n3)
printf("YES");
else
printf("NO");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'i' was not declared in this scope
6 | for(i = 0;i < m;i++) {
| ^
a.cc:8:20: error: lvalue required as left operand of assignment
8 | if(n1 * n1 + n2 * n2 = n3 * n3)
| ~~~~~~~~^~~~~~~~~
|
s656891667 | p00003 | C++ | import sys
N = (int)(raw_input())
a = [0,0,0]
for i in range(N):
a[0],a[1],a[2] = map(int,raw_input().split())
a.sort()
if a[0]^2 + a[1]^2 == a[2]^2:
print("YES")
else:
print("NO")
| a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s720262894 | p00003 | C++ | #include <stdio.h>
#include <math.h >
int main(void) {
int a, b, c, t, x, y;
t = a ; x = b ; y = c;
if(t<=b){
t = b ; x = c ; y = a ;
}
if(t<=c){
t = c ; x = a ; y = b;
}
if(t==sqrt(pow(x)+pow(y))){
printf("YES");
}
else{
printf("NO");
}
return 0;
} | a.cc:2:10: fatal error: math.h : No such file or directory
2 | #include <math.h >
| ^~~~~~~~~
compilation terminated.
|
s051570921 | p00003 | C++ | using namespace std;
int main(void){
int n , a[3];
cin >> n;
for (int i=0; i<n; i++){
cin >> a[0] >> a[1] >> a[2];
sort(a,a+3);
if (a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | cin >> n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:8:17: e... |
s715815843 | p00003 | C++ | #include<iostream>
using namespace std;
int main(){
int n,a,b,c,i;
cin>>n;
for(i=0;i<n;i++){
cin>>a>>b>>c;
if(a<b+c){
if(b<a+c){
if(c<a+b){
cout<<"YES"<<endl;
}
}
}
else cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:18:2: error: expected '}' at end of input
18 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s507687602 | p00003 | C++ | #include<iostream>
using namespace std;
int main(){
int n,a,b,c,i;
cin>>n;
for(i=0;i<n;i++){
cin>>a>>b>>c;
if(a<b+c){
if(b<a+c){
if(c<a+b){
cout<<"YES"<<endl;
}
}
}else {
cout<<"NO"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s396255991 | p00003 | C++ | #include<iostream>
using namespace std;
int main(){
int n,a,b,c,i;
cin>>n;
for(i=0;i<n;i++){
cin>>a>>b>>c;
if(a*a=b*b+c*c)cout<<"YES"<<endl;else if(b*b=a*a+c*c)cout<<"YES"<<endl;else if(c*c=a*a+b*b)cout<<"YES"<<endl;else cout<<"NO"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:5: error: lvalue required as left operand of assignment
8 | if(a*a=b*b+c*c)cout<<"YES"<<endl;else if(b*b=a*a+c*c)cout<<"YES"<<endl;else if(c*c=a*a+b*b)cout<<"YES"<<endl;else cout<<"NO"<<endl;
| ~^~
a.cc:8:43: error: lvalue required as left operand of assignment
8 ... |
s889592654 | p00003 | C++ | #include <iostream.h>
#include <algorithm>
int main()
{
int n;
int hen[3];
cin >> n;
for (int i = 0; i < n; i++){
for (int j = 0; j < 3; j++){
cin >> hen[j];
hen[j] *= hen[j];
}
sort(hen, hen + 3);
if ((hen[0] + hen[1]) == hen[2]){
cout << "YES";
}
else {
cout << "NO";
}
cout ... | a.cc:1:10: fatal error: iostream.h: No such file or directory
1 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s116506086 | p00003 | C++ | #include <cstdio>
int main(){
int n,a,b,c;
scanf("%d",&n);
while(n>0){
scanf("%d %d %d",&a,&b,&c);
m=a>b?(a>c?a:c):(b>c?b:c);
if (a*a+b*b+c*c==2*m*m) printf("YES\n")
else printf("NO\n");
--n;
};
return 0;
}; | a.cc: In function 'int main()':
a.cc:7:3: error: 'm' was not declared in this scope
7 | m=a>b?(a>c?a:c):(b>c?b:c);
| ^
a.cc:8:42: error: expected ';' before 'else'
8 | if (a*a+b*b+c*c==2*m*m) printf("YES\n")
| ^
| ... |
s618393539 | p00003 | C++ | #include <cstdio>
int main(){
int n,a,b,c,m;
scanf("%d",&n);
while(n>0){
scanf("%d %d %d",&a,&b,&c);
m=a>b?(a>c?a:c):(b>c?b:c);
if (a*a+b*b+c*c==2*m*m) printf("YES\n")
else printf("NO\n");
--n;
};
return 0;
}; | a.cc: In function 'int main()':
a.cc:8:42: error: expected ';' before 'else'
8 | if (a*a+b*b+c*c==2*m*m) printf("YES\n")
| ^
| ;
9 | else printf("NO\n");
| ~~~~
|
s642542665 | p00003 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c,d;
while(cin >> a >> b???>>c){
if(a*a+b*b==c*c||b*b+c*c==a*a||c*c+a*a==b*b){
cout << "YES" << endl;
}
else cout << "NO" << endl;
}
return 0;
} | a.cc:6:25: warning: trigraph ??> ignored, use -trigraphs to enable [-Wtrigraphs]
6 | while(cin >> a >> b???>>c){
a.cc: In function 'int main()':
a.cc:6:25: error: expected primary-expression before '?' token
6 | while(cin >> a >> b???>>c){
| ^
a.cc:6:26: error: expected pri... |
s245654947 | p00003 | C++ | #include <cstdio>
#include <iostream>
using namespace std;
int main(void){
int n,array[3],i,temp;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d%d",&array[0],&array[1],&array[2]);
sort(array,array+3);
if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2]) printf("Yes\n");
else printf("No\n... | a.cc: In function 'int main()':
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(array,array+3);
| ^~~~
| short
|
s931901289 | p00003 | C++ | #include <iostream>
using namespade std;
void swap(int& a, int& b)
{
int tmp = a;
a = b;
b = tmp;
}
int main()
{
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int a, b, c;
cin >> a >> b >> c;
if (a > b) swap(a, b);
if (a > c) swap(a, c);
if (b > c) swap(b, c);
if(a * a + b * b ==... | a.cc:2:7: error: expected nested-name-specifier before 'namespade'
2 | using namespade std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
14 | cin >> n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr... |
s404516970 | p00003 | C++ | #include <iostream>
using namespace std;
int main()
{
int a = 0;
int kazu = 0;
int b = 0;
int c = 0;
for (int i = 0; i < kazu; i++)
{
cin >> a;
cin >> b;
cin >> c;
if (a * a + b * b == c * c)
{
cout << "YES" << endl;
return;
}
else if (a * a + c * c == b * b)
{
cout << "YES" << endl;
r... | a.cc: In function 'int main()':
a.cc:17:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
17 | return;
| ^~~~~~
a.cc:22:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
22 | ... |
s903111719 | p00003 | C++ | #include <iostream>
using namespace std;
int main()
{
int a = 0;
int kazu = 0;
int b = 0;
int c = 0;
cin >> kazu;
for (int i = 0; i < kazu; i++)
{
cin >> a;
cin >> b;
cin >> c;
if (a * a + b * b == c * c)
{
cout << "YES" << endl;
return;
}
else if (a * a + c * c == b * b)
{
cout << "YES"... | a.cc: In function 'int main()':
a.cc:18:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
18 | return;
| ^~~~~~
a.cc:23:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
23 | ... |
s893075940 | p00003 | C++ |
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
while(cin>>a>>b>>c){
if(a*a=b*b+c*c)
cout<<"Yes"<<endl;
else if(b*b=a*a+c*c)
cout<<"Yes"<<endl;
else if(c*c=a*a+b*b)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
... | a.cc: In function 'int main()':
a.cc:9:13: error: lvalue required as left operand of assignment
9 | if(a*a=b*b+c*c)
| ~^~
a.cc:11:18: error: lvalue required as left operand of assignment
11 | else if(b*b=a*a+c*c)
| ~^~
a.cc:13:18: error: lvalue required as l... |
s841973907 | p00003 | C++ |
inputArray = Array.new
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}
rows.times do
if inputArray[i] + inputArray[i+1] == inputArray[i+2]
puts "YES"
else
puts "NO"
end
end | a.cc:2:1: error: 'inputArray' does not name a type
2 | inputArray = Array.new
| ^~~~~~~~~~
a.cc:12:1: error: 'rows' does not name a type
12 | rows.times do
| ^~~~
|
s215404160 | p00003 | C++ | using System;
using System.Collections.Generic;
namespace TriangleRight
{
class MainClass
{
public static void Main(string[] args)
{
string str;
List<string> status = new List<string> ();
while (!string.IsNullOrEmpty(str = Console.ReadLine())) {
string[] input = str.Split(' ');
int a, b, c;
... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:8:23: error: expected ':' before 'static'
8 | public static v... |
s802481819 | p00003 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int i, m;
cin >> m;
for(i=0; i<m; i++){
int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a, a+3);
if(a[2]*a[2] = a[0]*a[0] + a[1]*a[1]){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:18:16: error: lvalue required as left operand of assignment
18 | if(a[2]*a[2] = a[0]*a[0] + a[1]*a[1]){
| ~~~~^~~~~
|
s886341931 | p00003 | C++ | #include <stdio.h>
int main()
{
int a,b,c,sum,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;
sum=a+b+c;
if(a=1&&b=1&&c=1){
printf("NO\n");
}else if(sum/2==a||sum/2==b||sum/2==c)printf("YES\n");
else printf("NO\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:16: error: lvalue required as left operand of assignment
12 | if(a=1&&b=1&&c=1){
| ~^~~
|
s110604735 | p00003 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c,d,i;
cin>>i;
for(int n=0;<i;n++){
cin>>a>>b>>c;
if(a<b){d=a,a=b,b=a;}
else if(a<c){d=a,a=c,c=d;}
if(a*a==b*b+c*c){cout<<"Yes"<<endl;}
else {cout<<"No"<<endl;}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:21: error: expected primary-expression before '<' token
7 | for(int n=0;<i;n++){
| ^
|
s855769826 | p00003 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c,d,i;
cin>>i;
for(int n=0;<i;n++;){
cin>>a>>b>>c;
if(a<b){d=a,a=b,b=a;}
else if(a<c){d=a,a=c,c=d;}
if(a*a==b*b+c*c){cout<<"Yes"<<endl;}
else {cout<<"No"<<endl;}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:21: error: expected primary-expression before '<' token
7 | for(int n=0;<i;n++;){
| ^
a.cc:7:27: error: expected ')' before ';' token
7 | for(int n=0;<i;n++;){
| ~ ^
| )... |
s277997927 | p00003 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c,d,i;
cin>>i;
for(int n=0;n<i;n++;){
cin>>a>>b>>c;
if(a<b){d=a,a=b,b=a;}
else if(a<c){d=a,a=c,c=d;}
if(a*a==b*b+c*c){cout<<"Yes"<<endl;}
else {cout<<"No"<<endl;}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:28: error: expected ')' before ';' token
7 | for(int n=0;n<i;n++;){
| ~ ^
| )
a.cc:7:29: error: expected primary-expression before ')' token
7 | for(int n=0;n<i;n++;){
| ... |
s481609472 | p00003 | C++ | #include <iostream>
using namespace std;
int main(){
int num,tmp;
cin >> num >> endl;
int a[num][3];
for(int i=0; i<num; ++i)
cin >> a[i][0] >> a[i][1] >> a[i][2] >> endl;
for(int i=0; i<num; ++i){
for(int j=0; j<3; ++j){
for(int k=j+1; k<3; ++k){
if(a[i][j] < a[i][k]){
tmp =... | a.cc: In function 'int main()':
a.cc:8:14: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>')
8 | cin >> num >> endl;
| ~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/ios... |
s090647610 | p00003 | C++ | #include <iostream>
using namespace std;
class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s037211401 | p00003 | C++ | #include <iostream>
using namespace std;
class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s233570743 | p00003 | C++ | #include <iostream>
using namespace std;
class Triangle{
public:
Triangle(){
}
void push(int num1,int num2,int num3){
if(num1>=num2){
if(num1>=num3){c=num1;a=num2;b=num3;}
else{c=num3;a=num1;b=num2;}
}
else{
if(num2>=num3){c=num2;a=num1;b=num3;}
else{c=num3;a=num1;b=num2;}
}
};
void checkRight(){
int cs=c*c;
if(cs==a*... | a.cc:33:2: error: expected ';' after class definition
33 | }
| ^
| ;
|
s957255984 | p00003 | C++ | #include<iostream>
#include<vector>
using namespace std;
void judgement(int a,int b,int c) {
if (a == b && b == c || a <= 0 || b <= 0 || c <= 0) {
cout << "NO" << endl;
return;
}
else if ((a*a) == (b*b) + (c*c) || (b*b) == (a*a) + (c*c) || (c*c) == (a*a) + (b*b)) {
cout << "YES" << endl;
return;
}
else {
... | a.cc:20:10: error: '::main' must return 'int'
20 | unsigned int main() {
| ^~~
|
s007291714 | p00003 | C++ | #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
int a[3];
int i;
int n;
cin>>n;
for(i=0;i<n;i++)
{
cin>>a[0]>>a[1]>>c[2];
sort(a,a+3)
if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])
cout<<... | a.cc: In function 'int main()':
a.cc:20:24: error: 'c' was not declared in this scope
20 | cin>>a[0]>>a[1]>>c[2];
| ^
a.cc:22:18: error: expected ';' before 'if'
22 | sort(a,a+3)
| ^
| ;
23 |
24 | if(a[2]*a[2]==a... |
s166361839 | p00003 | C++ | #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
int a[3];
int i;
int n;
cin>>n;
for(i=0;i<n;i++)
{
cin>>a[0]>>a[1]>>c[2];
sort(a,a+3);
if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])
cout<... | a.cc: In function 'int main()':
a.cc:20:24: error: 'c' was not declared in this scope
20 | cin>>a[0]>>a[1]>>c[2];
| ^
|
s501338003 | p00003 | C++ | include <iostream>
#include <math.h>
using namespace std;
bool judge_triangle(double a,double b,double c){
double d=sqrt(pow(a)+pow(b));
if(d==c) return true;
else return false;
}
int main(void){
int i,count;
cin>>count;
for(i=0;i<count<i++){
cin>>a>>b>>c;
if(judge_triangle(a,b,c)) cout<<"YES"<<endl;
e... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/cmath:45,
from /usr/include/c++/14/math.h:36,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_nul... |
s805807740 | p00003 | C++ | using System;
using System.Linq;
public class Program {
public static void Main() {
int n = int.Parse(Console.ReadLine());
for(int i = 0; i < n; i++) {
string[] s = Console.ReadLine().Split();
int[] a = new int[3];
for(int j = 0; j < 3; j++) a[j] = int.Parse(s[j]);
Array.Sort(a);
Console.WriteLine((... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Linq;
| ^~~~~~
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Program {
| ^~~~~... |
s766744327 | p00003 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,c,n,index;
index = 0; //????????????
cin >> n; //???????????°??????
while(1) //???????????????
{
cin >> a >> b >> c; //?????????????????????
???????????????if( a*a + b*b == c*c) //??????????????????... | a.cc: In function 'int main()':
a.cc:16:1: error: expected primary-expression before '?' token
16 | ???????????????if( a*a + b*b == c*c) //??????????????????
| ^
a.cc:16:2: error: expected primary-expression before '?' token
16 | ???????????????if( a*a + b*b == c*c) //??????????????????
| ^... |
s153643077 | p00003 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,c,n,index;
index = 0;
cin >> n;
while(1)
{
cin >> a >> b >> c;
if( a*a + b*b == c*c)
cout >> "Yes" >> endl;
else
cout >> "No" >> endl;
... | a.cc: In function 'int main()':
a.cc:15:25: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
15 | cout >> "Yes" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| ... |
s685142000 | p00003 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,c,n,index;
index = 0;
cin >> n;
while(1)
{
cin >> a >> b >> c;
if( (a*a + b*b) == c*c)
cout >> "Yes" >> endl;
else
cout >> "No" >> end... | a.cc: In function 'int main()':
a.cc:15:25: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
15 | cout >> "Yes" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| ... |
s914637261 | p00003 | C++ | #include<iostream>
bool right_triangle(int a,int b,int c)
{
if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
return true;
}else{
return false;
}
}
int main()
{
int x,y,z,N;
std::cin >> N;
for (int i = 0; i < N; i++) {
std::cin >> x >> y >> z;
i... | a.cc:26:61: error: expected unqualified-id before numeric constant
26 | 1,1 ??????
| ^
|
s945163108 | p00003 | C++ | #include<iostream>
bool right_triangle(int a,int b,int c)
{
if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
return true;
}else{
return false;
}
}
int main()
{
int x,y,z,N;
std::cin >> N;
for (int i = 0; i < N; i++) {
std::cin >> x >> y >> z;
i... | a.cc: In function 'int main()':
a.cc:24:75: error: expected primary-expression before '?' token
24 | 1,1 ??????
| ^
a.cc:24:76: error: expected primary-expression befor... |
s109028388 | p00003 | C++ | #include<iostream>
bool right_triangle(int a,int b,int c)
{
if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
return true;
}else{
return false;
}
}
int main()
{
int x,y,z,N;
std::cin >> N;
for (int i = 0; i < N; i++) {
std::cin >> x >> y >> z;
i... | a.cc:25:59: error: expected unqualified-id before numeric constant
25 | } 1,1 ??????
| ^
|
s802539633 | p00003 | C++ | #include<iostream>
#include<string>
//0001
#include<cstddef>
#include<queue>
#include<vector>
using namespace std;
int main() {
//0000
/*
int i, j;
for (i = 1; i < 10; i++) {
for (j = 1; j < 10; j++) {
cout << i << "x" << j << "=" << i*j << endl;
}
}
*/
//0001
/*
int i;
const size_t MNum = 10;
int M... | a.cc: In function 'int main()':
a.cc:76:17: error: 'sort' was not declared in this scope; did you mean 'short'?
76 | sort(a, a + 3);
| ^~~~
| short
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.