submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s318432420 | p04043 | C++ | #include<>iostream>
using namespace std;
int main(){
int num[3];
int j5 = 0, j7 = 0;
cin >> num[0] >> num[1] >> num[2];
if(int i = 0; i < 3; i++){
if(num[i] == 5) j5++;
else if(num[i] == 7) j7++
}
if(j5 == 2 && j7 == 1)
cout << "YES" << endl;
else
cout << "NO" << endl;
... | a.cc:1:19: warning: extra tokens at end of #include directive
1 | #include<>iostream>
| ^
a.cc:1:9: fatal error: >iostrea: No such file or directory
1 | #include<>iostream>
| ^~~~~~~~~~
compilation terminated.
|
s060369227 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a(3);
for (int i = 0; i < 3; i++) {
cin >> a.at(i);
}
sort(a.begin(),a.end());
if (a.at(0) == 5 && a.at(1) == 5 && a.at(2) == 7) {
cout << "YES" << endl;
}
else << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:13:10: error: expected primary-expression before '<<' token
13 | else << "NO" << endl;
| ^~
|
s586936506 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a(3)
for (int i = 0; i < 3; i++) {
cin >> a.at(i);
}
sort(a.begin(),a.end());
if (a.at(0) == 5 && a.at(1) == 5 && a.at(2) == 7) {
cout << "YES" << endl;
}
else << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:6:5: error: expected ',' or ';' before 'for'
6 | for (int i = 0; i < 3; i++) {
| ^~~
a.cc:6:21: error: 'i' was not declared in this scope
6 | for (int i = 0; i < 3; i++) {
| ^
a.cc:13:10: error: expected primary-expression before '... |
s339482629 | p04043 | C | #include<stdio.h>
int main(void)
{
int a,b,c;
int ax,bx,cx;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
if(a==5||b=5||c==7)
printf("YES");
else
if(a==5||b=7||c==5)
printf("YES");
else
if(a==7||b=5||c==5)
printf("YES");
else
printf("NO");
return 0;
} | main.c: In function 'main':
main.c:13:19: error: lvalue required as left operand of assignment
13 | if(a==5||b=5||c==7)
| ^
main.c:16:27: error: lvalue required as left operand of assignment
16 | if(a==5||b=7||c==5)
| ^
main.c:19:35: ... |
s467164173 | p04043 | C++ | #include<bits/stdc++.h>
int main()
{
ios::sync_with_stdio(false);
int A,B,C;
cin>>A>>B>>C;
if(A == 5 && B == 7 & C == 5)
cout<<"YES";
else
cout<<"NO";
return 0;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'ios' has not been declared
4 | ios::sync_with_stdio(false);
| ^~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>A>>B>>C;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c... |
s791434585 | p04043 | C++ | #include<bits/stdc++.h>
ios::sync_with_stdio(false)
int main()
{
int A,B,C;
cin>>A>>B>>C;
if(A == 5 && B == 7 & C == 5)
cout<<"YES";
else
cout<<"NO";
return 0;
} | a.cc:2:1: error: 'ios' does not name a type
2 | ios::sync_with_stdio(false)
| ^~~
|
s937347351 | p04043 | Java | import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
String[] values = sc.nextLine().split(" ");
int countFor7 = 0;
int countFor5 = 0;
for(String value: values) {
if ("7".equals(value)) {
countFor7++;
}else if("5".equals(value)) {
countF... | Main.java:9: error: illegal start of type
for(String value: values) {
^
Main.java:9: error: ';' expected
for(String value: values) {
^
Main.java:9: error: <identifier> expected
for(String value: values) {
^
Main.java:17: error: <identifie... |
s368408558 | p04043 | Java | import java.util.Scanner;
public class Dog{
public static void main(String[] args){
int a,b,c;
String str;
Scanner scr = new Scanner(System.in);
a = scr.nextInt();
b = scr.nextInt();
c = scr.nextInt();
if(a==7) {
if(b==5 && c==5) {
str="YES";
}else{
str="NO";
}
... | Main.java:2: error: class Dog is public, should be declared in a file named Dog.java
public class Dog{
^
1 error
|
s082931837 | p04043 | C++ | #include <iostream>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A==7){
if(B==5&&C=5){
cout << "YES" << endl;
}
}
else if(B==7){
if(A==5&&C=5){
cout << "YES" << endl;
}
}
else if(C==7){
if(A==5&&B=5){
cout << "YES" << endl;
}
}
el... | a.cc: In function 'int main()':
a.cc:9:12: error: lvalue required as left operand of assignment
9 | if(B==5&&C=5){
| ~~~~^~~
a.cc:14:12: error: lvalue required as left operand of assignment
14 | if(A==5&&C=5){
| ~~~~^~~
a.cc:19:12: error: lvalue required as left operand of assig... |
s476443179 | p04043 | C++ | #include <stdio.h>
int main()
{
int A,B,C flag=0;
scanf ("%d%d%d",&A,&B,&C);
if (A==5&&B==5&&C==7) flag=1;
if (A==5&&B==7&&C==5) flag=1;
if (A==7&&B==5&&C==5) flag=1;
if (flag==1)
printf("YES\n")
else printf ("NO\n")
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:19: error: expected initializer before 'flag'
4 | int A,B,C flag=0;
| ^~~~
a.cc:5:32: error: 'C' was not declared in this scope
5 | scanf ("%d%d%d",&A,&B,&C);
| ^
a.cc:6:31: error: 'flag' was not ... |
s144043362 | p04043 | C++ | #include <iostream>
using namespace std;
int main()#include <iostream>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if(a == 7){
if(b == 5){
if(c == 5){
cout << "YES";
}
else{
cout << "NO";
}
}
else{
cout << "NO";
}
}
els... | a.cc:5:11: error: stray '#' in program
5 | int main()#include <iostream>
| ^
a.cc:5:12: error: expected initializer before 'include'
5 | int main()#include <iostream>
| ^~~~~~~
a.cc:55:1: error: expected unqualified-id before '{' token
55 | {
| ^
|
s250184677 | p04043 | C++ | #include <stdio.h>
int main()
{
int A,B,C flag=0
scanf ("%d%d%d",&A,&B,&C);
if (A==5&&B==5&&C==7) flag=1;
if (A==5&&B==7&&C==5) flag=1;
if (A==7&&B==5&&C==5) flag=1;
if (flag==1)
printf("YES/n")
else printf ("NO/n")
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:19: error: expected initializer before 'flag'
4 | int A,B,C flag=0
| ^~~~
a.cc:6:25: error: 'C' was not declared in this scope
6 | if (A==5&&B==5&&C==7) flag=1;
| ^
a.cc:6:31: error: 'flag' was not decla... |
s500756267 | p04043 | C++ | #include <stdio.h>
int main
{
int num[3];
while(cin>>num[0]>>num[1]>>num[2]){
int count1 = 0;
int count2 = 0;
for(int i=0;i<3;i++){
if(num[i] == 5)
count1++;
else
if(num[i] == 7)
count2++;
}
if((count... | a.cc:2:5: error: cannot declare '::main' to be a global variable
2 | int main
| ^~~~
a.cc:4:2: error: expected primary-expression before 'int'
4 | int num[3];
| ^~~
a.cc:4:2: error: expected '}' before 'int'
a.cc:3:1: note: to match this '{'
3 | {
| ^
a.cc:5:5: error: expected unqual... |
s170265150 | p04043 | C++ | #include "stdio.h"
#include <iostream>
int main (){
int number = -1;
while (number < 0 || number>100) {
printf ("Please input the number of the children\n");
scanf ("%d",&number);
if (number > 100 || number < 0) {
printf("Please check the number you input\n");
}
}
int sum = 0;
for (int i = 0; i < number... | a.cc: In function 'int main()':
a.cc:17:16: error: 'sum\U0000ff09' was not declared in this scope
17 | printf ("%d", sum);
| ^~~~~
|
s042576814 | p04043 | C++ | #include "stdio.h"
#include <iostream>
int main (){
int number = -1;
while (number < 0 || number>100) {
printf("Please input the number of the children\n");
scanfs("%d",&number);
if (number > 100 || number < 0) {
printf("Please check the number you input\n");
}
}
int sum = 0;
for (int i = 0; i < number;... | a.cc: In function 'int main()':
a.cc:7:3: error: 'scanfs' was not declared in this scope; did you mean 'scanf'?
7 | scanfs("%d",&number);
| ^~~~~~
| scanf
a.cc:17:15: error: 'sum\U0000ff09' was not declared in this scope
17 | printf("%d", sum);
| ^~~~~
|
s889651933 | p04043 | C++ | #include "stdio.h"
#include <iostream>
int main (){
int number = -1;
while (number < 0 || number>100) {
printf("Please input the number of the children\n");
scanf_s("%d",&number);
if (number > 100 || number < 0) {
printf("Please check the number you input\n");
}
}
int sum = 0;
for (int i = 0; i < number... | a.cc: In function 'int main()':
a.cc:7:3: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | scanf_s("%d",&number);
| ^~~~~~~
| scanf
a.cc:17:18: error: expected ')' before ';' token
17 | printf("%d", sum;
| ~ ^
| )
|
s485434062 | p04043 | C++ | #include <stdio.h>
int main
{
int num[3];
while(cin>>num[0]>>num[1]>>num[2])
{
int count1 = 0,count2 = 0;
for(int i=0;i<3;i++){
if(num[i] == 5)
count1++;
else
if(num[i] == 7)
count2++;
}
if((count1 == ... | a.cc:2:5: error: cannot declare '::main' to be a global variable
2 | int main
| ^~~~
a.cc:4:2: error: expected primary-expression before 'int'
4 | int num[3];
| ^~~
a.cc:4:2: error: expected '}' before 'int'
a.cc:3:1: note: to match this '{'
3 | {
| ^
a.cc:5:5: error: expected unqual... |
s046023189 | p04043 | C++ | int main
{
int num[3];
while(cin>>num[0]>>num[1]>>num[2])
{
int count1 = 0,count2 = 0;
for(int i=0;i<3;i++){
if(num[i] == 5)
count1++;
else
if(num[i] == 7)
count2++;
}
if((count1 == 2) && (count2 == 1)... | a.cc:1:5: error: cannot declare '::main' to be a global variable
1 | int main
| ^~~~
a.cc:3:2: error: expected primary-expression before 'int'
3 | int num[3];
| ^~~
a.cc:3:2: error: expected '}' before 'int'
a.cc:2:1: note: to match this '{'
2 | {
| ^
a.cc:4:5: error: expected unqual... |
s040277979 | p04043 | C++ | #include <stdio.h>
int main
{
int A,B,C, flag=0;
scanf("%d %d",&A,&B,&C);
if(A==5 && B==5 && C==7)flag=1;
if(A==5 && B==7 && C==5)flag=1;
if(A==7 && B==5 && C==5)flag=1;
else(flag=1)
printf("YES\n");
else print("NO\n")
return 0;
} | a.cc:2:5: error: cannot declare '::main' to be a global variable
2 | int main
| ^~~~
a.cc:4:9: error: expected primary-expression before 'int'
4 | int A,B,C, flag=0;
| ^~~
a.cc:4:9: error: expected '}' before 'int'
a.cc:3:1: note: to match this '{'
3 | {
| ^
a.cc:5:10: ... |
s337863496 | p04043 | C++ | #include <stdlib.h>
int main
{
int A,B,C, flag=0;
scanf("%d %d",&A,&B,&C);
if(A==5 && B==5 && C==7)flag=1;
if(A==5 && B==7 && C==5)flag=1;
if(A==7 && B==5 && C==5)flag=1;
else(flag=1)
printf("YES\n");
else print("NO\n")
return 0;
} | a.cc:2:5: error: cannot declare '::main' to be a global variable
2 | int main
| ^~~~
a.cc:4:9: error: expected primary-expression before 'int'
4 | int A,B,C, flag=0;
| ^~~
a.cc:4:9: error: expected '}' before 'int'
a.cc:3:1: note: to match this '{'
3 | {
| ^
a.cc:5:10: ... |
s090726229 | p04043 | C++ | #include<stdio.h>
{
int a1,a2,a3;
scanf("%d %d %d",&a1,&a2,&a3);
if(a1==7 && a2==5 && a3==5) printf("YES");
else if("a1==5 && a2==5 && a3==7) printf("YES");
else if("a1==5 && a2==7 && a3==5) printf("YES");
else printf("NO");
return 0;
} | a.cc:7:50: warning: missing terminating " character
7 | else if("a1==5 && a2==5 && a3==7) printf("YES");
| ^
a.cc:7:50: error: missing terminating " character
7 | else if("a1==5 && a2==5 && a3==7) printf("YES");
| ... |
s544895343 | p04043 | C++ | #include<stdio.h>
{
int a1,a2,a3;
scanf("%d %d %d",&a1,&a2,&a3);
if(a1==7 && a2==5 && a3==5) printf("YES");
else if("a1==5 && a2==5 && a3==7) printf("YES");
else if("a1==5 && a2==7 && a3==5) printf("YSE");
else printf("NO");
return 0;
} | a.cc:7:50: warning: missing terminating " character
7 | else if("a1==5 && a2==5 && a3==7) printf("YES");
| ^
a.cc:7:50: error: missing terminating " character
7 | else if("a1==5 && a2==5 && a3==7) printf("YES");
| ... |
s812699042 | p04043 | C++ | #include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&C);
if(a==5&&b==5&&c==7)
printf("YES\n");
else if(a==5&&c==5&&b==7)
printf("YES\n");
else if(a==7&&b==5&&c==5)
printf("YES\n");
else printf("NO\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:5:33: error: 'C' was not declared in this scope
5 | scanf("%d %d %d",&a,&b,&C);
| ^
|
s994649642 | p04043 | C | int main(){
int A,B,C;
scanf("%d%d%d",&A,&B,&C);
if(A==7&&B==5&&C==5){
printf("YES");
}
else if(A==&&B==7&&C==5){
printf("YES");
}
else if(A==5&&B==5&&C==7){
printf("YES");
}else{
printf("NO");
}
return 0;
} | main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | scanf("%d%d%d",&A,&B,&C);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:3:3: warning: inco... |
s085276690 | p04043 | C | int main(){
int A,B,C;
scanf("%d%d%d",A,B,C);
if(A==7&&B==5&&C==5){
printf("YES");
}
else if(A==&&B==7&&C==5){
printf("YES");
}
else if(A==5&&B==5&&C==7){
printf("YES");
}else{
printf("NO");
}
return 0;
} | main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | scanf("%d%d%d",A,B,C);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(){
main.c:3:3: warning: incompa... |
s598657498 | p04043 | C | #include<stdio.h>
int main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a = 5 && b = 5 && c = 7)
{
printf("YES");
}
else
{
printf("NO");
}
return 0;
} | main.c: In function 'main':
main.c:7:27: error: lvalue required as left operand of assignment
7 | if(a = 5 && b = 5 && c = 7)
| ^
|
s370081859 | p04043 | C++ | #include <iostream>
using namespace std;
int main()
{
int A,B,C;
cin>>A>>B>>C;
if(A=5,B=5,C=7);
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'else' without a previous 'if'
9 | else
| ^~~~
|
s156895927 | p04043 | C++ | #include <stdio.h>
main()
{
int A,B,C;;
scanf("%d %d %d",A,B,C);
if("A=5,B=5,C=7") printf("YES");
if("A=7,B=5,C=5") printf("YES");
if("A=5,B=7,C=5") printf("YES");
else printf("NO");
| a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:9:27: error: expected '}' at end of input
9 | else printf("NO");
| ^
a.cc:3:1: note: to match this '{'
3 | {
| ^
|
s783228891 | p04043 | C++ | #include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d %d,&a,&b,&c);
if(a==5&&b==5&&c==7)printf("YES\n");
else if(a==5&&c==5&&b==7)printf("YES\n");
else if(b==5&&c==5&&a==7)printf("YES\n");
else printf("NO\n");
return 0;
} | a.cc:5:7: warning: missing terminating " character
5 | scanf("%d %d %d,&a,&b,&c);
| ^
a.cc:5:7: error: missing terminating " character
5 | scanf("%d %d %d,&a,&b,&c);
| ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: expected initializer before 'scanf'
5 | scanf(... |
s761432053 | p04043 | C++ | #include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d %d,&a,&b,&c);
if(a==5&&b==5&&c==7)printf("YES\n");
else if(a==5&&b==7&&c==5)printf("YES\n");
else if(a==7&&b==5&&c==5)printf("YES\n");
else printf("NO\n");
return 0;
} | a.cc:5:7: warning: missing terminating " character
5 | scanf("%d %d %d,&a,&b,&c);
| ^
a.cc:5:7: error: missing terminating " character
5 | scanf("%d %d %d,&a,&b,&c);
| ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: expected initializer before 'scanf'
5 | scanf(... |
s013783764 | p04043 | C++ | #include <stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a*b*c=175){
printf("YES");
}
else
printf("NO");
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:23: error: 'a\U0000ff0c' was not declared in this scope
5 | scanf("%d %d %d",&a,&b,&c);
| ^~~
a.cc:5:27: error: 'b\U0000ff0c' was not declared in this scope
5 | scanf("%d %d %d",&a,&b,&c);
| ^~~
a.cc:6:11:... |
s736425927 | p04043 | C++ | //注意:代码模板中的代码将会被复制到任何新创建的文件中,编辑代码模板中的代码,让他帮你自动增加固定代码吧
#include <stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a*b*c=175){
printf("YES");
}
else
printf("NO");
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:23: error: 'a\U0000ff0c' was not declared in this scope
6 | scanf("%d %d %d",&a,&b,&c);
| ^~~
a.cc:6:27: error: 'b\U0000ff0c' was not declared in this scope
6 | scanf("%d %d %d",&a,&b,&c);
| ^~~
a.cc:7:11:... |
s662581894 | p04043 | C++ | #include <stdio.h>
int main(){
int x;
float y;
scanf ("%d",&x);
y = x*(x+1)/2;
printf("%f",y);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:12: error: unable to find string literal operator 'operator""\U0000ff0c' with 'const char [3]', 'long unsigned int' arguments
5 | scanf ("%d",&x);
| ^~~~~~
|
s593948312 | p04043 | C++ | int main()
{
int a,b,c,YES,NO;
cin>>a>>b>>c;
if(a==5&&b==5&&c==7)
cout<<"YES"<<endl;
else if(a==5&&b==7&&c==5)
cout<<"YES"<<endl;
else if(a==7&&b==5&&c==5)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
4 | cin>>a>>b>>c;
| ^~~
a.cc:6:17: error: 'cout' was not declared in this scope
6 | cout<<"YES"<<endl;
| ^~~~
a.cc:6:30: error: 'endl' was not declared in this scope
... |
s420050827 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
vector<int> fsf = {A, B, C};
sort(fsf.begin(),fsf.end());
vector<int> ans = {5,7,7};
if (ans == fsf)
cout << "YES" << endl;
if else
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:12:6: error: expected '(' before 'else'
12 | if else
| ^~~~
| (
|
s541450680 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
vector<int> fsf = {A, B, C};
sort(fsf.begin(),fsf.end());
vector<int> ans = {5,7,7}
if (ans == fsf)
cout << "YES" << endl;
else
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
10 | if (ans == fsf)
| ^~
a.cc:12:3: error: 'else' without a previous 'if'
12 | else
| ^~~~
|
s854684745 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
vector<int> fsf = {A, B, C};
sort(fsf.begin(),fsf.end());
vec<int> ans = {5,7,7}
if (ans == fsf)
cout << "YES" << endl;
else
cout << "NO" << endl;
} | a.cc: In function 'int main()':
a.cc:9:3: error: 'vec' was not declared in this scope
9 | vec<int> ans = {5,7,7}
| ^~~
a.cc:9:7: error: expected primary-expression before 'int'
9 | vec<int> ans = {5,7,7}
| ^~~
a.cc:10:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
... |
s019357653 | p04043 | C++ | #include<stdio.h>
int main()
{
int A,B,C;
scanf("%d %d %d",&A,&B,&C);
switch(A,B,C){
case 7,5,5:printf("yes\n");break;
case 5,7,5:printf("yes\n");break;
case 5,5,7:printf("yes\n");break;
default:printf("no\n");
}
return 0
} | a.cc: In function 'int main()':
a.cc:7:15: error: expected ':' before ',' token
7 | case 7,5,5:printf("yes\n");break;
| ^
| :
a.cc:7:15: error: expected primary-expression before ',' token
a.cc:8:15: error: expected ':' before ',' token
8 | case 5,7,5:prin... |
s277843469 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (A = 7 && B = 5 && C = 5) {
cout << "YES" << endl;
}
else if (A = 5 && B = 7 && C = 5) {
cout << "YES" << endl;
}
else if (A = 5 && B = 5 && C = 7) {
cout << "YES" << endl;
}
else {
cout ... | a.cc: In function 'int main()':
a.cc:8:22: error: lvalue required as left operand of assignment
8 | if (A = 7 && B = 5 && C = 5) {
| ~~^~~~
a.cc:11:27: error: lvalue required as left operand of assignment
11 | else if (A = 5 && B = 7 && C = 5) {
| ~~^~~~... |
s694877334 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (A = 7 && B = 5 && C = 5) cout << "YES" << endl;
else if (A = 5 && B = 7 && C = 5) cout << "YES" << endl;
else if (A = 5 && B = 5 && C = 7) cout << "YES" << endl;
else cout << "NO" << endl;
}
| a.cc: In function 'int main()':
a.cc:8:22: error: lvalue required as left operand of assignment
8 | if (A = 7 && B = 5 && C = 5) cout << "YES" << endl;
| ~~^~~~
a.cc:9:27: error: lvalue required as left operand of assignment
9 | else if (A = 5 && B = 7 && C = 5) cout << "YES" << end... |
s821593463 | p04043 | C++ | #include<cstdio>
#include<iostream>
#include<string>
#include<cstring>
#include<stdio.h>
using namespace std;
int main(){
char s[10];
gets(s);
int count5 = 0;
int count7 = 0;
for( int i = 0; i < strlen(s); i++)
if (s[i] == '5') count5++;
else if(s[i] == '7') count7++;
if(count5 == 2 && count7 == 1)
cout << ... | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s778224654 | p04043 | C++ | #include<cstdio>
#include<iostream>
#include<string>
#include<cstring>
using namespace std;
int main(){
char s[10];
gets(s);
int count5 = 0;
int count7 = 0;
for( int i = 0; i < strlen(s); i++)
if (s[i] == '5') count5++;
else if(s[i] == '7') count7++;
if(count5 == 2 && count7 == 1)
cout << "YES" << endl;
el... | a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(s);
| ^~~~
| getw
|
s163133669 | p04043 | C++ | #include <iostream>
using namespace std;
int main()
{
int A, B ,C ;
cin >> A>>B>>C ;
if (A==5 &&B==5 &&C==7) ||(A==5&&B=7 &&C==5)|| (A==7 &&B==5 &&C==5)
cout <<"YES" ;
else
cout <<"NO" ;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:25: error: expected primary-expression before '||' token
10 | if (A==5 &&B==5 &&C==7) ||(A==5&&B=7 &&C==5)|| (A==7 &&B==5 &&C==5)
| ^~
a.cc:10:32: error: lvalue required as left operand of assignment
10 | if (A==5 &&B==5 &&C==7) ||(A==5&&B=7 &&... |
s871842895 | p04043 | C++ | #include<bits/stdc++.h>
#define eoi ios::sync_with_stdio(0),ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
int main()
{
eoi;
int a,b,q;
char m;
vector<char>v;
cin>>a>>b;
while(b--){
cin>>m;
v.push_back(m);
}
for(int z=0;z<100000;z++){
a+... | a.cc: In function 'int main()':
a.cc:28:19: error: no matching function for call to 'stoi(int&)'
28 | int a=stoi(a);
| ~~~~^~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/... |
s561413786 | p04043 | C++ | File Edit Options Buffers Tools C++ Help
#include<iostream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
int N;
int L;
cin >> N>>L;
string S[110];
for(int i=0; i<N; ++i){
cin >>setw(L)>> S[i] ;
}
for(int i=0; i<N; ++i){
if(S[i]>S[i+1]){
swap(S[i],S[i+1]);
}
}
for... | a.cc:1:1: error: 'File' does not name a type
1 | File Edit Options Buffers Tools C++ Help
| ^~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
... |
s949632595 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
vector<int> A(3);
cin >>A.at(1)>>A.at(2)>>A.at(3);
int count1=0;
int count2=0;
for(int i=0;i<3;i++){
if(A.at(i)=='5'){
count1++;
}else{
count2++;
}
if(count1==2 && count2==1){
cout << "YES" << endl;
}else{... | a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s332711293 | p04043 | C++ | a,b,c = map(int, input().split())
if( (a + b + c == 17) and (a == 5 or a == 7) and (b == 5 or b == 7) and (c == 5 or c == 7)):
print('YES')
else:
print('NO')
| a.cc:4:11: warning: multi-character character constant [-Wmultichar]
4 | print('YES')
| ^~~~~
a.cc:6:11: warning: multi-character character constant [-Wmultichar]
6 | print('NO')
| ^~~~
a.cc:1:1: error: 'a' does not name a type
1 | a,b,c = map(int, input().split())
... |
s236649684 | p04043 | C++ | #include <iostream>
using namespace std;
int main()
{
int x,y,c;
cin>>y>>x>>c;
if(y==5&&x==5&&c==7)||(x==5&&y==7&&c==5)||(x==7&&y==5&&c==5)
cout<<"YES";
else
cout<<"NO";
return 0;
} | a.cc: In function 'int main()':
a.cc:9:21: error: expected primary-expression before '||' token
9 | if(y==5&&x==5&&c==7)||(x==5&&y==7&&c==5)||(x==7&&y==5&&c==5)
| ^~
|
s167476128 | p04043 | C++ | #include<iostream>
using manespace std;
int main(){
int A , B , C;
cin >> A >> B >> C;
if((A + B == 10 && A + C == 12) || (B + C == 10 && B + A == 12) || (C + A == 10 && B + C == 12))
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
} | a.cc:2:7: error: expected nested-name-specifier before 'manespace'
2 | using manespace std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> A >> B >> C;
| ^~~
| std::cin
In file included from a.c... |
s424944849 | p04043 | Java | class test{
public static void main(String args[]){
int fiveCount = 0;
int sevenCount = 0;
for(String arg: args[]){
if( Integer.parseInt(arg) == '5'){
fiveCount++
}
if( Integer.parseInt(arg) == '7'){
fiveCount++
}
if(fi... | Main.java:7: error: '.class' expected
for(String arg: args[]){
^
Main.java:9: error: ';' expected
fiveCount++
^
Main.java:12: error: ';' expected
fiveCount++
^
Main.java:16: error: ';' expected
System.out.print("OK... |
s902040621 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int cnt5 = cnt7 = 0;
int x; cin >> x;
if(x == 5) cnt5++;
else if(x == 7) cnt7++;
cin >> x;
if(x == 5) cnt5++;
else if(x == 7) cnt7++;
cin >> x;
if(x == 5) cnt5++;
else if(x == 7) cnt7++;
if(cnt5 == 1 && cnt7 == 2){cout <... | a.cc: In function 'int main()':
a.cc:7:20: error: 'cnt7' was not declared in this scope; did you mean 'cnt5'?
7 | int cnt5 = cnt7 = 0;
| ^~~~
| cnt5
|
s793691236 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> vec(3)
cin >> vec.at(0) >> vec.at(1) >> vec.at(2);
sort(vec.begin(),vec.end());
if(vec.at(0) == 5 && vec.at(1) == 5 && vec.at(2) == 7){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'cin'
6 | cin >> vec.at(0) >> vec.at(1) >> vec.at(2);
| ^~~
|
s280479891 | p04043 | C | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> vec(3)
cin >> vec.at(0) >> vec.at(1) >> vec.at(2);
sort(vec.begin(),vec.end());
if(vec.at(0) == 5 && vec.at(1) == 5 && vec.at(2) == 7){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
} | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s490478086 | p04043 | C | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> vec(3)
cin >> vec.at(0) >> vec.at(1) >> vec.at(2);
sort(vec.begin(),vec.end());
if(vec.at(0) == 5 && vec.at(1) == 5 && vec.at(2) == 7){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
} | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s092981851 | p04043 | C++ | #include <bits/stdc++.h>
#include <cstdlib> // abs() for integer 絶対値求めやつ
#include <cmath> // abs() for float, and fabs()
#include <algorithm>
#include <vector>
#include <string>
#define rep(i,n) for(int i = 0; i< (n);i++)
#define SORT(a) sort((a).begin(),(a).end());
#define che(a,string) cout<<string<<":"<<(a)... | a.cc: In function 'int main()':
a.cc:25:26: error: expected ';' before '}' token
25 | cin>>A[i]
| ^
| ;
26 | }
| ~
|
s643200776 | p04043 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
vector<int> v(3); int cnt5=0, cnt7=0;
for(auto : &x){
cin >> x;
if(x == 5) cnt5++;
if(x == 7) cnt7++;
}
if(cnt5 == 2 && cnt7 == 1) cout << "YES\n";
else cout << "NO\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:7:18: error: expected unqualified-id before ':' token
7 | for(auto : &x){
| ^
a.cc:7:21: error: 'x' was not declared in this scope
7 | for(auto : &x){
| ^
|
s906010238 | p04043 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int a,b,c;
string s="NO";
cin>>a>>b>>c;
if(a==5){
if(b==7&&c==5){
s="YES";
}
else if(b==5&&c==7){
s="YES";
}
}
else if(a==7){
if(b==5&&C==5){
s="YES";
}
}
cout<<s<<endl;
}
| a.cc: In function 'int main()':
a.cc:17:14: error: 'C' was not declared in this scope
17 | if(b==5&&C==5){
| ^
|
s014244911 | p04043 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int a,b,c;
string s="NO";
cin>>a>>b>>c;
if(a=5){
if(b==7&&c==5){
s="YES";
}
else if(b==5&&c==7){
s="YES";
}
}
else if(a==7){
if(b==5&&C==5){
s="YES";
}
}
cout<<s<<endl;
} | a.cc: In function 'int main()':
a.cc:17:14: error: 'C' was not declared in this scope
17 | if(b==5&&C==5){
| ^
|
s022552826 | p04043 | C++ | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()... | a.cc:44:1: error: 'iint' does not name a type; did you mean 'uint'?
44 | iint main() {
| ^~~~
| uint
|
s007949587 | p04043 | C++ | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()... | a.cc: In function 'int main()':
a.cc:45:10: error: expected ',' or ';' before ')' token
45 | vi p(3));
| ^
|
s994811777 | p04043 | C | #include<stdio.h>
int main(){
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
if(a==5&&b==7&&c==5){
printf("YES");
}else{
printf("NO");
}
return 0;
} | main.c: In function 'main':
main.c:3:15: error: 'a' undeclared (first use in this function)
3 | scanf("%d",&a);
| ^
main.c:3:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:15: error: 'b' undeclared (first use in this function)
4 | scan... |
s177233238 | p04043 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int on = 0, fi = 0; int x;
for(int i = 0 ; i < n; i++){
cin>>x;
x == 5 ? fi++ : on++;
}
if(fi == 2) cout<<"YES"<<"\n";
else cout<<"NO"<<"\n";
} | a.cc: In function 'int main()':
a.cc:7:29: error: 'n' was not declared in this scope
7 | for(int i = 0 ; i < n; i++){
| ^
|
s961087400 | p04043 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int fi = 0,on = 0; int x;
for(int i = 0; i < n; i++){
cin>>x;
x == 5 ? fi++ : on++;
}
if(fi == 2) cout<<"YES"<<"\n";
} | a.cc: In function 'int main()':
a.cc:5:22: error: 'n' was not declared in this scope
5 | for(int i = 0; i < n; i++){
| ^
|
s437539693 | p04043 | C | #include <cstdio>
using namespace std;
#define lo(n,m) for(int i=n; i<m; i++)
int main(){
int a[3],j=0,k=0;
lo(0,3){
if (scanf("%d",&a[i]) !=1 ){
printf("None.\n");
}
}
lo(0,3){
if ( a[i] == 5){
j++;
}else if(a[i] == 7){
k++;
}
}
if ( j == 2 && k == 1){
printf(... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s869117746 | p04043 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a[3],a=0,b=0;
for(int i=0;i<3;i++)
{
cin>>a[i];
}
for(int i=0;i<3;i++)
{
if(a[i]==5)
a++;
else if(a[i]==7)
b++;
}
if(a==2&&b==1)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:12: error: conflicting declaration 'int a'
5 | int a[3],a=0,b=0;
| ^
a.cc:5:7: note: previous declaration as 'int a [3]'
5 | int a[3],a=0,b=0;
| ^
a.cc:13:6: error: lvalue required as increment operand
13 | a++;
| ^
a.cc:... |
s187084609 | p04043 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a[3],a=0,b=0;
for(int i=0;i<3;i++)
{
cin>>a[i];
}
for(int i=0;i<3;i++)
{
if(a[i]==5;
a++;
else if(a[i]==7)
b++;
}
if(a==2&&b==1)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:12: error: conflicting declaration 'int a'
5 | int a[3],a=0,b=0;
| ^
a.cc:5:7: note: previous declaration as 'int a [3]'
5 | int a[3],a=0,b=0;
| ^
a.cc:13:6: error: lvalue required as increment operand
13 | a++;
| ^
a.cc:... |
s003194301 | p04043 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a[3],b=0;
cin>>a[0]>>a[1]>>a[2];
sort(a,a+3)
if(a[0]==5) b++;
if(a[1]==5) b++;
if(a[2]==7) b++;
if(b==3&&a[0]+a[1]+a[2]==17) cout<<"YES";
if(b!=3) cout<<"NO";
cout<<"\n";
} | a.cc: In function 'int main()':
a.cc:6:14: error: expected ';' before 'if'
6 | sort(a,a+3)
| ^
| ;
7 | if(a[0]==5) b++;
| ~~
|
s968419762 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if( (a==5 && b==7 && c==5)||(a==7 && b==5 && c==5)||(a==5 && b==5 && c==7) ) {
cout << "YES" << endl;
}
else cout << "NO" << endl;
| a.cc: In function 'int main()':
a.cc:10:29: error: expected '}' at end of input
10 | else cout << "NO" << endl;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s914410905 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if( (a==5 && b==7 && c==5)||(a==7 && b==5 && c==5)||(a==5 && b==5 && c==7) ) {
cout << "YES" << endl;
else cout << "NO" << endl; | a.cc: In function 'int main()':
a.cc:9:3: error: expected '}' before 'else'
9 | else cout << "NO" << endl;
| ^~~~
a.cc:7:80: note: to match this '{'
7 | if( (a==5 && b==7 && c==5)||(a==7 && b==5 && c==5)||(a==5 && b==5 && c==7) ) {
| ... |
s783926614 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<double> tem(12);
cout << "月別の平均気温(℃)を12個、1月から12月まで順番に小数で入力してください。" << endl;
cin >> tem.at(0) >> tem.at(1) >> tem.at(2) >> tem.at(3) >> tem.at(4) >> tem.at(5) >> tem.at(6) >> tem.at(7) >> tem.at(8) >> tem.at(9) >> tem.at(10) >> tem.at(11);
vect... | a.cc: In function 'int main()':
a.cc:26:10: error: redeclaration of 'double mintem'
26 | double mintem = *std::min_element(tem.begin(), tem.end());
| ^~~~~~
a.cc:23:8: note: 'double mintem' previously declared here
23 | double mintem;
| ^~~~~~
a.cc:27:10: error: redeclaration of 'dou... |
s296665347 | p04043 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll,... | a.cc: In function 'int main()':
a.cc:36:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
36 | cin >> A[0] >> A[1] >> A[3];
| ~~~ ^~ ~~~~
| | |
| | std::vector<int>
| std::istream ... |
s761755274 | p04043 | C++ | #include <iostream>
int main() {
int a, b, c;
cin >> a >> b >> c;
if(a*b*c==175) {
cout >> "YES" >> end1;
}
else {
cout >> "NO" >> emd1;
}
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | 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 | extern istream cin; ///< Lin... |
s220978046 | p04043 | C++ | #include<bits/c++.h>
using namespace std;
int main(){
int a=0,b=0,c;
cin >>c;
if(c==5) a++;
if(c==7) b++;
cin >>c;
if(c==5) a++;
if(c==7) b++;
cin >>c;
if(c==5) a++;
if(c==7) b++;
if(a==2&&b==1) cout <<“YES\n”;
else count <<“NO\n”;
} | a.cc:1:9: fatal error: bits/c++.h: No such file or directory
1 | #include<bits/c++.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s409343253 | p04043 | C++ | #include<iostream>
using namespace std;
int main(void)
{
int a,b,c;
int result = 0;
cin >> a >> b >> c;
if(a == 7)
if(b == 5 && c == 5)
result = 1;
else if(b == 7)
if(a == 5 && c == 5)
result = 1;
else if(c == 7)
if(a == 5 && b == 5)
result = 1;
if(result == 1)
co... | a.cc: In function 'int main()':
a.cc:22:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
22 | cout >> "Yes" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::ostream {aka std::b... |
s565175099 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int ctoi(char c) {
if (c >= '0' && c <= '9') {
return c - '0';
}
return 0;
}
int main() {
vector<int> a(3);
rep(i,3){
cin>>a.at(i);
}
sort(a.begin(),a.end());
if(a.at(0)==5&&a.at(1)==5&&a.at(2)==7){
cout<<"YES";
}
else{
cout<<"NO";
}
} | a.cc: In function 'int main()':
a.cc:11:7: error: 'i' was not declared in this scope
11 | rep(i,3){
| ^
a.cc:11:3: error: 'rep' was not declared in this scope
11 | rep(i,3){
| ^~~
|
s029335127 | p04043 | C | #include<stdio.h>
void cmp(const void*a,const void*b){
return (int*)a*-(int*)b*;}
int main(){
int i,a[3];
for(i=0;i<3:i++)
scanf("%d",&a[i]);
qsort(a,3,sizeof(int),cmp);
if(a[0]=a[1]==5&&a[2]==7)
printf("YES\n");
else
printf("NO\n");
return 0;} | main.c: In function 'cmp':
main.c:3:18: error: wrong type argument to unary minus
3 | return (int*)a*-(int*)b*;}
| ^
main.c:3:27: error: expected expression before ';' token
3 | return (int*)a*-(int*)b*;}
| ^
main.c:3:10: error: 'return' with a value, i... |
s331152095 | p04043 | C | #include<stdio.h>
void cmp(const void*a,const void*b){
return (int*)*a-(int*)*b;}
int main(){
int i,a[3];
for(i=0;i<3:i++)
scanf("%d",&a[i]);
qsort(a,3,sizeof(int),cmp);
if(a[0]=a[1]==5&&a[2]==7)
printf("YES\n");
else
printf("NO\n");
return 0;} | main.c: In function 'cmp':
main.c:3:16: warning: dereferencing 'void *' pointer
3 | return (int*)*a-(int*)*b;}
| ^~
main.c:3:10: error: invalid use of void expression
3 | return (int*)*a-(int*)*b;}
| ^
main.c:3:25: warning: dereferencing 'void *' pointer
3 | return ... |
s790357297 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
vector<int> ans{a, b, c};
sort(ans.begin(), ans.end());
if(ans==[5,5,7]) {
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:12: error: expected identifier before numeric constant
8 | if(ans==[5,5,7]) {
| ^
a.cc:8:13: error: expected ']' before ',' token
8 | if(ans==[5,5,7]) {
| ^
| ]
a.cc: In lambda function:
a.cc:8:13: error: expected '{... |
s770254462 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
vector<int> ans{a, b, c};
sort(ans.begin(), ans.end());
if(ans==5,5,7){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:9: error: no match for 'operator==' (operand types are 'std::vector<int>' and 'int')
8 | if(ans==5,5,7){
| ~~~^~~
| | |
| | int
| std::vector<int>
In file included from /usr/include/c++/14/regex:68,
from /usr... |
s610226196 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
vector<int> ans{a, b, c};
sort(ans.begin(), ans.end());
if(ans=={5,5,7}){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:11: error: expected primary-expression before '{' token
8 | if(ans=={5,5,7}){
| ^
a.cc:8:11: error: expected ')' before '{' token
8 | if(ans=={5,5,7}){
| ~ ^
| )
|
s821788094 | p04043 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a.begin(), a.end());
string ans = "NO";
if(a[0] == 5 && a[1] == 7 && a[2] == 7)ans = "YES";
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:6:16: error: request for member 'begin' in 'a', which is of non-class type 'int [3]'
6 | sort(a.begin(), a.end());
| ^~~~~
a.cc:6:27: error: request for member 'end' in 'a', which is of non-class type 'int [3]'
6 | sort(a.begin(), a.end()... |
s872753834 | p04043 | C++ | #include <iostream>
#include <vector>
int main(void) {
std::vector<int> a(3);
std::cin >> a.at(0) >> a.at(1) >> a.at(2);
int sev = 0, fiv = 0;
for (int i = 0; i < 3; i++) {
if (a. at(i) == 5) fiv++;
if (a.at(i) == 7) sev++;
}
if (fiv == 2 && sev == 1) { std::cout << "YES" << std::endl; }
else { std::cout << ... | a.cc: In function 'int main()':
a.cc:13:18: error: expected '}' at end of input
13 | return 0;
| ^
a.cc:3:16: note: to match this '{'
3 | int main(void) {
| ^
|
s886317929 | p04043 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A = 5 && B = 5 && C = 7)cout << "yes" << endl;
else if(A = 5 && B = 7 && C = 5)cout << "yes" << endl;
else if(A = 7 && B = 5 && C = 5)cout << "yes" << endl;
else cout << "no" <<endl;
}
| a.cc: In function 'int main()':
a.cc:7:21: error: lvalue required as left operand of assignment
7 | if(A = 5 && B = 5 && C = 7)cout << "yes" << endl;
| ~~^~~~
a.cc:8:26: error: lvalue required as left operand of assignment
8 | else if(A = 5 && B = 7 && C = 5)cout << "yes" << endl;
... |
s231328434 | p04043 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A = 5 && B = 5 && C =7)cout << "yes" << endl;
else if(A = 5 && B = 7 && C = 5)cout << "yes" << endl;
else if(A = 7 && B = 5 && C = 5)cout << "yes" << endl;
else cout << "no" <<endl;
}
| a.cc: In function 'int main()':
a.cc:7:21: error: lvalue required as left operand of assignment
7 | if(A = 5 && B = 5 && C =7)cout << "yes" << endl;
| ~~^~~~
a.cc:8:26: error: lvalue required as left operand of assignment
8 | else if(A = 5 && B = 7 && C = 5)cout << "yes" << endl;
... |
s159974706 | p04043 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> v(3);
cin>>v[0]>>v[1]>>v[2];
sort(v.begin(),v.end());
if(v[0]==5 && v[1]==5 && v[2]==7){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'?
8 | sort(v.begin(),v.end());
| ^~~~
| short
|
s528093985 | p04043 | C++ | #include <iostream>
using namespace std;
int main(){
vector<int> v(3);
cin>>v[0]>>v[1]>>v[2];
sort(v.begin(),v.end());
if(v[0]==5 && v[1]==5 && v[2]==7){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'vector' was not declared in this scope
5 | vector<int> v(3);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+#include <vector>
2 | using ... |
s416798848 | p04043 | C | #include<stdio.h>
#include<stdlib.h>
int main(void){
int iroha = calloc(3, sizeof(int));
scanf("%d%d%d",iroha,iroha+1,iroha+2);
int count[2]={0,0};
for(int i = 0; i < 3; i++){
if( iroha[i] == 5 )count[0] += 1;
else if( iroha[i] == 7)count[1] += 1;
}
if( count[0] == 2 && count[1] == 1)printf("YES... | main.c: In function 'main':
main.c:5:15: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
5 | int iroha = calloc(3, sizeof(int));
| ^~~~~~
main.c:9:14: error: subscripted value is neither array nor pointer nor vector
9 | if( iroh... |
s688363933 | p04043 | C++ | #include<iostream>
#include<string.h>
#include<algorithm>
using name space std;
bool fun(string a, string b){
return a+b<b+a;
}
int main(){
int n,l;
cin>>n>>l;
string a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
sort(a,a+n,fun);
for(int i=0;i<n;i++){
cout<<a[i];
}
return 0;
}
| a.cc:6:7: error: expected nested-name-specifier before 'name'
6 | using name space std;
| ^~~~
a.cc:7:10: error: 'string' was not declared in this scope
7 | bool fun(string a, string b){
| ^~~~~~
a.cc:7:10: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd... |
s052583065 | p04043 | C++ | #inlude<iostream>
#include<string>
using namespace std;
int main()
{
int arr[3];int cnt1=0;int cnt2=0;
for(int i=0;i<3;i++)
{
if(arr[i]==5)
cnt1++;
else if(arr[i]==7)
cnt2++;
}
if(cnt1==2&&cnt2==1)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
1 | #inlude<iostream>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:15:5: error: 'cout' was not declared in this scope
15 | cout<<"YES"<<endl;
| ^~~~
a.cc:3:1: note: 'std::cout' is defined in he... |
s204070485 | p04043 | C++ | #inlude<bits/stdc++.h>
using namespace std;
int main()
{
int arr[3];int cnt1=0;int cnt2=0;
for(int i=0;i<3;i++)
cin>>arr[i];
for(int i=0;i<3;i++)
{
if(arr[i]==5)
cnt1++;
else if(arr[i]==7)
cnt2++;
}
if(cnt1==2&&cnt2==1)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
... | a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
1 | #inlude<bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
7 | cin>>arr[i];
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header ... |
s586116882 | p04043 | C++ | #inlude<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
int arr[3];int cnt1=0;int cnt2=0;
for(int i=0;i<3;i++)
{
if(arr[i]==5)
cnt1++;
else if(arr[i]==7)
cnt2++;
}
if(cnt1==2&&cnt2==1)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
1 | #inlude<bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:15:5: error: 'cout' was not declared in this scope
15 | cout<<"YES"<<endl;
| ^~~~
a.cc:3:1: note: 'std::cout' is defined ... |
s087016467 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
long int arr[3],i,c=0,d=0;
for(i=0;i<n;i++)
{
cin>>arr[i];
}
for(i=0;i<n;i++)
{
if(arr[i]==5)c++;
else if(arr[i]==7)d++;
}
if(c==2 && d==1)
{
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:13: error: 'n' was not declared in this scope
6 | for(i=0;i<n;i++)
| ^
a.cc:10:13: error: 'n' was not declared in this scope
10 | for(i=0;i<n;i++)
| ^
|
s718939547 | p04043 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int cnt5 = 0;
int cnt7 = 0;
int a = sc.nextInt();
cnt5 = (a == 5) ? cnt5 + 1:cnt5;
cnt7 = (a == 7) ? cnt7 + 1:cnt5;
int b = sc.nextInt();
cn... | Main.java:23: error: reached end of file while parsing
}
^
1 error
|
s541919029 | p04043 | C | #include <stdio.h>
int main(){
int A;
int B;
int C;
//A,B,Cの入力を受ける
scanf("%d %d %d",&A,&B,&C);
if(A+B+C==17){
if((A==7&&B==C)||(B==7&&A==C)||(C==7&&A==B)){
printf("YES")
}
}else{
printf("NO");
}
return 0;
} | main.c: In function 'main':
main.c:10:22: error: expected ';' before '}' token
10 | printf("YES")
| ^
| ;
11 | }
| ~
|
s478152584 | p04043 | C++ | #include <iostream>
#include <stdio.h>
#include <vector>
#include <cmath>
#include <algorithm>
#include <utility>
#include <map>
using namespace std;
int main()
{
int niz[3];
cin>>niz[0]>>niz[1]>>niz[2];
sort(niz, niz+n);
if ( niz[0] == niz[1] && niz[2] == 7 && niz[0] == 5 ){
cout<<"YES"<<... | a.cc: In function 'int main()':
a.cc:15:19: error: 'n' was not declared in this scope; did you mean 'yn'?
15 | sort(niz, niz+n);
| ^
| yn
|
s287091140 | p04043 | C++ | #include<iostream>
using namespace std;
#include<vector>
#include<bits/stdc++.h>
int main(){
vector<int> x(3)
cin >> x[0] >> x[1] >> x[2];
sort(x.begin(), x.end());
if (x[0]==x[1]&&x[0]==5&&x[2]==7){
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:4: error: expected ',' or ';' before 'cin'
8 | cin >> x[0] >> x[1] >> x[2];
| ^~~
|
s786876470 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,l;
cin>>n>>l;
string s[n];
for(int i=0;i<n;i++){
cin>>s[i];
}
sort(s.begin(),s.end());
for(int i=0;i<n;i++){
cout<<s[i];
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: request for member 'begin' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
11 | sort(s.begin(),s.end());
| ^~~~~
a.cc:11:22: error: request for member 'end' in 's', which is of non-class type 'st... |
s066121408 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,l;
cin>>n>>l;
string s(n-1);
for(int i=0;i<n;i++){
cin>>s[i];
}
sort(s.begin(),s.end());
for(int i=0;i<n;i++){
cout<<s[i];
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:17: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
7 | string s(n-1);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /u... |
s880823948 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||(a==7&&b==5&&c==5)){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
return 0; | a.cc: In function 'int main()':
a.cc:11:12: error: expected '}' at end of input
11 | return 0;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s048916391 | p04043 | C++ | #include <bits/stdc++.h>
using namespace std;
int main{
int a,b,c;
cin >> a >> b >> c;
if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||(a==7&&b==5&&c==5)){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
return 0;
}
| a.cc:3:5: error: cannot declare '::main' to be a global variable
3 | int main{
| ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
4 | int a,b,c;
| ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
3 | int main{
| ^
a.cc:5:3: erro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.