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;
return 0;
}
|
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 '<<' token
13 | else << "NO" << endl;
| ^~
|
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: error: lvalue required as left operand of assignment
19 | if(a==7||b=5||c==5)
| ^
|
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++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout<<"YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout<<"NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
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)) {
countFor5++;
}
}
System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
}
}
|
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: <identifier> expected
System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
^
Main.java:17: error: illegal start of type
System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
^
Main.java:19: error: class, interface, enum, or record expected
}
^
6 errors
|
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";
}
}else if(a==5) {
if(b==5 && c==7) {
str="YES";
}else if(b==7 && c==5) {
str="YES";
}else {
str="NO";
}
}else{
str="NO";
}
System.out.println(str);
}
}
|
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;
}
}
else{
cout << "NO" << endl;
}
return 0;
}
|
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 assignment
19 | if(A==5&&B=5){
| ~~~~^~~
|
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 declared in this scope
6 | if (A==5&&B==5&&C==7) flag=1;
| ^~~~
a.cc:7:31: error: 'flag' was not declared in this scope
7 | if (A==5&&B==7&&C==5) flag=1;
| ^~~~
a.cc:8:27: error: 'flag' was not declared in this scope
8 | if (A==7&&B==5&&C==5) flag=1;
| ^~~~
a.cc:9:9: error: 'flag' was not declared in this scope
9 | if (flag==1)
| ^~~~
a.cc:10:24: error: expected ';' before 'else'
10 | printf("YES\n")
| ^
| ;
11 | else printf ("NO\n")
| ~~~~
a.cc: At global scope:
a.cc:14:2: error: expected unqualified-id before 'return'
14 | return 0;
| ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
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";
}
}
else if(a == 5){
if(b == 7){
if(c == 5){
cout << "YES";
}
else{
cout << "NO";
}
}
else if(b == 5){
if(c == 7){
cout << "YES";
}
else{
cout << "NO";
}
}
else{
cout << "NO";
}
}
else{
cout << "NO";
}
return 0;
}
{
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";
}
}
else{
cout << "NO";
}
if(a == 5){
if(b == 7){
if(c == 5){
cout << "YES";
}
else{
cout << "NO";
}
}
else if(b == 5){
if(c == 7){
cout << "YES";
}
else{
cout << "NO";
}
}
else{
cout << "NO";
}
}
else{
cout << "NO";
}
return 0;
}
|
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 declared in this scope
6 | if (A==5&&B==5&&C==7) flag=1;
| ^~~~
a.cc:7:25: error: 'C' was not declared in this scope
7 | if (A==5&&B==7&&C==5) flag=1;
| ^
a.cc:7:31: error: 'flag' was not declared in this scope
7 | if (A==5&&B==7&&C==5) flag=1;
| ^~~~
a.cc:8:21: error: 'C' was not declared in this scope
8 | if (A==7&&B==5&&C==5) flag=1;
| ^
a.cc:8:27: error: 'flag' was not declared in this scope
8 | if (A==7&&B==5&&C==5) flag=1;
| ^~~~
a.cc:9:9: error: 'flag' was not declared in this scope
9 | if (flag==1)
| ^~~~
a.cc:10:24: error: expected ';' before 'else'
10 | printf("YES/n")
| ^
| ;
11 | else printf ("NO/n")
| ~~~~
a.cc: At global scope:
a.cc:14:2: error: expected unqualified-id before 'return'
14 | return 0;
| ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
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((count1 == 2) && (count2 == 1))
cout << "YES" <<endl;
else
cout << "NO" <<endl;
}
}
|
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 unqualified-id before 'while'
5 | while(cin>>num[0]>>num[1]>>num[2]){
| ^~~~~
a.cc:20:1: error: expected declaration before '}' token
20 | }
| ^
|
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; i++) {
sum = sum + i + 1;
}
printf ("The number of candies needed is:");
printf ("%d", sum);
return 0;
}
|
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; i++) {
sum = sum + i + 1;
}
printf("The number of candies needed is:");
printf("%d", sum);
return 0;
}
|
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; i++) {
sum = sum + i + 1;
}
printf("The number of candies needed is:");
printf("%d", sum;
return 0;
}
|
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 == 2) && (count2 == 1))
cout << "YES" <<endl;
else
cout << "NO" <<endl;
}
}
|
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 unqualified-id before 'while'
5 | while(cin>>num[0]>>num[1]>>num[2])
| ^~~~~
a.cc:20:1: error: expected declaration before '}' token
20 | }
| ^
|
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))
cout << "YES" <<endl;
else
cout << "NO" <<endl;
}
}
|
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 unqualified-id before 'while'
4 | while(cin>>num[0]>>num[1]>>num[2])
| ^~~~~
a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
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: error: expected constructor, destructor, or type conversion before '(' token
5 | scanf("%d %d",&A,&B,&C);
| ^
a.cc:6:5: error: expected unqualified-id before 'if'
6 | if(A==5 && B==5 && C==7)flag=1;
| ^~
a.cc:7:5: error: expected unqualified-id before 'if'
7 | if(A==5 && B==7 && C==5)flag=1;
| ^~
a.cc:8:5: error: expected unqualified-id before 'if'
8 | if(A==7 && B==5 && C==5)flag=1;
| ^~
a.cc:9:5: error: expected unqualified-id before 'else'
9 | else(flag=1)
| ^~~~
a.cc:11:9: error: expected unqualified-id before 'else'
11 | else print("NO\n")
| ^~~~
a.cc:13:1: error: expected declaration before '}' token
13 | }
| ^
|
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: error: expected constructor, destructor, or type conversion before '(' token
5 | scanf("%d %d",&A,&B,&C);
| ^
a.cc:6:5: error: expected unqualified-id before 'if'
6 | if(A==5 && B==5 && C==7)flag=1;
| ^~
a.cc:7:5: error: expected unqualified-id before 'if'
7 | if(A==5 && B==7 && C==5)flag=1;
| ^~
a.cc:8:5: error: expected unqualified-id before 'if'
8 | if(A==7 && B==5 && C==5)flag=1;
| ^~
a.cc:9:5: error: expected unqualified-id before 'else'
9 | else(flag=1)
| ^~~~
a.cc:11:9: error: expected unqualified-id before 'else'
11 | else print("NO\n")
| ^~~~
a.cc:13:1: error: expected declaration before '}' token
13 | }
| ^
|
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");
| ^~~
a.cc:8:50: warning: missing terminating " character
8 | else if("a1==5 && a2==7 && a3==5) printf("YES");
| ^
a.cc:8:50: error: missing terminating " character
8 | else if("a1==5 && a2==7 && a3==5) printf("YES");
| ^~~
a.cc:3:1: error: expected unqualified-id before '{' token
3 | {
| ^
|
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");
| ^~~
a.cc:8:50: warning: missing terminating " character
8 | else if("a1==5 && a2==7 && a3==5) printf("YSE");
| ^
a.cc:8:50: error: missing terminating " character
8 | else if("a1==5 && a2==7 && a3==5) printf("YSE");
| ^~~
a.cc:3:1: error: expected unqualified-id before '{' token
3 | {
| ^
|
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: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | scanf("%d%d%d",&A,&B,&C);
| ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
5 | printf("YES");
| ^~~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:12: warning: comparison between pointer and integer
7 | else if(A==&&B==7&&C==5){
| ^~
main.c:8:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
8 | printf("YES");
| ^~~~~~
main.c:8:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
11 | printf("YES");
| ^~~~~~
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
13 | printf("NO");
| ^~~~~~
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:3: error: label 'B' used but not defined
7 | else if(A==&&B==7&&C==5){
| ^~~~
|
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: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | scanf("%d%d%d",A,B,C);
| ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
5 | printf("YES");
| ^~~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:12: warning: comparison between pointer and integer
7 | else if(A==&&B==7&&C==5){
| ^~
main.c:8:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
8 | printf("YES");
| ^~~~~~
main.c:8:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
11 | printf("YES");
| ^~~~~~
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
13 | printf("NO");
| ^~~~~~
main.c:13:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:3: error: label 'B' used but not defined
7 | else if(A==&&B==7&&C==5){
| ^~~~
|
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("%d %d %d,&a,&b,&c);
| ^~~~~
a.cc:8:1: error: 'else' without a previous 'if'
8 | else if(b==5&&c==5&&a==7)printf("YES\n");
| ^~~~
a.cc:8:15: error: 'c' was not declared in this scope
8 | else if(b==5&&c==5&&a==7)printf("YES\n");
| ^
|
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("%d %d %d,&a,&b,&c);
| ^~~~~
a.cc:8:1: error: 'else' without a previous 'if'
8 | else if(a==7&&b==5&&c==5)printf("YES\n");
| ^~~~
a.cc:8:21: error: 'c' was not declared in this scope
8 | else if(a==7&&b==5&&c==5)printf("YES\n");
| ^
|
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: error: lvalue required as left operand of assignment
6 | if(a*b*c=175){
| ~~~^~
|
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: error: lvalue required as left operand of assignment
7 | if(a*b*c=175){
| ~~~^~
|
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
6 | cout<<"YES"<<endl;
| ^~~~
a.cc:8:25: error: 'cout' was not declared in this scope
8 | cout<<"YES"<<endl;
| ^~~~
a.cc:8:38: error: 'endl' was not declared in this scope
8 | cout<<"YES"<<endl;
| ^~~~
a.cc:10:33: error: 'cout' was not declared in this scope
10 | cout<<"YES"<<endl;
| ^~~~
a.cc:10:46: error: 'endl' was not declared in this scope
10 | cout<<"YES"<<endl;
| ^~~~
a.cc:12:41: error: 'cout' was not declared in this scope
12 | cout<<"NO"<<endl;
| ^~~~
a.cc:12:53: error: 'endl' was not declared in this scope
12 | cout<<"NO"<<endl;
| ^~~~
|
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'?
10 | if (ans == fsf)
| ^~~
| 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:printf("yes\n");break;
| ^
| :
a.cc:8:15: error: expected primary-expression before ',' token
a.cc:9:9: error: duplicate case value
9 | case 5,5,7:printf("yes\n");break;
| ^~~~
a.cc:8:9: note: previously used here
8 | case 5,7,5:printf("yes\n");break;
| ^~~~
a.cc:9:15: error: expected ':' before ',' token
9 | case 5,5,7:printf("yes\n");break;
| ^
| :
a.cc:9:15: error: expected primary-expression before ',' token
a.cc:12:16: error: expected ';' before '}' token
12 | return 0
| ^
| ;
13 | }
| ~
|
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 << "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) {
| ~~^~~~
a.cc:11:27: error: lvalue required as left operand of assignment
11 | else if (A = 5 && B = 7 && C = 5) {
| ~~^~~~
a.cc:14:27: error: lvalue required as left operand of assignment
14 | else if (A = 5 && B = 5 && C = 7) {
| ~~^~~~
|
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" << endl;
| ~~^~~~
a.cc:10:27: error: lvalue required as left operand of assignment
10 | else if (A = 5 && B = 5 && C = 7) cout << "YES" << endl;
| ~~^~~~
|
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 << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
|
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;
else cout << "NO" << endl;
return 0;
}
|
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 &&C==5)|| (A==7 &&B==5 &&C==5)
| ~~~~^~~
|
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+=z;
string t=to_string(a);
for(int i=0;i<t.length();i++){
for(int s=0;s<v.size();s++){
if(t[i]==v[s]){
i=t.length();
break;
}
if(s+1==v.size()){cout<<t;return 0;}
}
}
int a=stoi(a);
}
return 0;
}
|
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++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
4164 | stoi(const string& __str, size_t* __idx = 0, int __base = 10)
| ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note: no known conversion for argument 1 from 'int' to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
4164 | stoi(const string& __str, size_t* __idx = 0, int __base = 10)
| ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
4432 | stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
| ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note: no known conversion for argument 1 from 'int' to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
4432 | stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
| ~~~~~~~~~~~~~~~^~~~~
|
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(int i=0; i<N+1; ++i){
cout << S[i] ;
}
}
|
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,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type
68 | typedef ptrdiff_t streamsize; // Signed integral type
| ^~~~~~~~~
/usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
40 | #include <cwchar> // For mbstate_t
+++ |+#include <cstddef>
41 |
In file included from /usr/include/c++/14/bits/exception_ptr.h:38,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
In file included from /usr/include/wchar.h:35,
from /usr/include/c++/14/cwchar:44,
from /usr/include/c++/14/bits/postypes.h:40:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared
140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared
142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
| ^~~
/usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:145:52: error: expected primary-expression before 'const'
145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:147:54: error: expected primary-expression before 'const'
147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
| ^~~~~
/usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token
154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive]
155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:156:70: error: expected primary-expression before 'const'
156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~~~
/usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token
162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t)
| ^
/usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive]
163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__));
| ^
/usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~~~
/usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^
/usr/include/c++/14/new:164:72: error: expected primary-expression before 'const'
164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&)
| ^~~~~
/usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared
171 | void operator delete(void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared
173 | void operator delete[](void*, std::size_t, std::align_val_t)
| ^~~
/usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function
179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
|
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{
cout << "NO" << endl;
}
}
|
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.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout << "YES" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout << "YES" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout << "NO" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:11:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
11 | cout << "NO" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
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(fiveCount == 2 || sevenCount == 1){
System.out.print("OK")
}else{
System.out.print("NO")
}
}
}
}
|
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")
^
Main.java:18: error: ';' expected
System.out.print("NO")
^
5 errors
|
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 << "YES\n";}
else cout << "NO\n";
}
|
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)<<endl;
#define ch(a,string) cout<<string<<":"<<(a)<<" ";
using namespace std;
typedef pair<int,int> p;
int main(){
vector<int> A(3);
rep(i,3){
cin>>A[i]
}
int five,seven;
rep(i,3){
if(A[i]==5){
five++;
}
else if(A[i]==7){
seven++;
}
}
if(five==2&&seven==1){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
|
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()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define all(c) begin(c),end(c)
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;
iint main() {
int p[3];
rep(i,3)cin>>p[i];
sort(p,p+3);
if(p[0]!=5){
cout<<"NO";
return 0;
}
if(p[1]!=5){
cout<<"NO";
return 0;
}
if(p[2]!=7){
cout<<"NO";
return 0;
}
cout<<"YES";
}
|
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()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define all(c) begin(c),end(c)
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;
int main() {
vi p(3));
rep(i,3)cin>>p[i];
sort(p.begin(),p.end());
if(p[0]!=5){
cout<<"No";
return 0;
}
if(p[0]!=5){
cout<<"No";
return 0;
}
if(p[0]!=7){
cout<<"No";
return 0;
}
cout<<"Yes";
}
|
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 | scanf("%d",&b);
| ^
main.c:5:15: error: 'c' undeclared (first use in this function)
5 | scanf("%d",&c);
| ^
|
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("YES\n");
}else{
printf("NO\n");
}
return 0;
}
|
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:17:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
17 | if(a==2&&b==1)
| ~^~~
|
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:13:9: error: expected ')' before ';' token
13 | a++;
| ^
| )
a.cc:12:5: note: to match this '('
12 | if(a[i]==5;
| ^
a.cc:17:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
17 | if(a==2&&b==1)
| ~^~~
|
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) ) {
| ^
a.cc:9:29: error: expected '}' at end of input
9 | else cout << "NO" << endl;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
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);
vector<double> pre(12);
cout << "月別の降水量(㎜)を12個、1月から12月まで順番に小数で入力してください。" << endl;
cin >> pre.at(0) >> pre.at(1) >> pre.at(2) >> pre.at(3) >> pre.at(4) >> pre.at(5) >> pre.at(6) >> pre.at(7) >> pre.at(8) >> pre.at(9) >> pre.at(10) >> pre.at(11);
double r;
r = pre.at(0) + pre.at(1) + pre.at(2) + pre.at(3) + pre.at(4) + pre.at(5) + pre.at(6) + pre.at(7) + pre.at(8) + pre.at(9) + pre.at(10) + pre.at(11);
double P;
P = pre.at(3) + pre.at(4) + pre.at(5) + pre.at(6) + pre.at(7) + pre.at(8);
double t;
t = (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) )/12;
double mintem;
double maxtem;
double mintem = *std::min_element(tem.begin(), tem.end());
double maxtem = *std::max_element(tem.begin(), tem.end());
double minpre;
double maxpre;
double minpre = *min_element(pre.begin(), pre.end());
double maxpre = *max_element(pre.begin(), pre.end());
double R;
//ここからSTEP1
string dry;
if (P / r >= 0.7){
dry = "w";
R = (t + 14) * 20;
cout << "乾燥限界値は" << endl;
cout << R << endl;
}else if (P / r >= 0.3){
dry = "f";
R = (t + 7) * 20;
cout << "乾燥限界値は" << endl;
cout << R << endl;
}else{
dry = "s";
R = t * 20;
cout << "乾燥限界値は" << endl;
cout << R << endl;
}
string wea;
if (R>r) {
wea = "B";
}
//ここからSTEP2
if (maxtem < 10) {
wea = "E";
}
//ここからSTEP3
if (mintem >= 18){
wea = "A";
}else if (mintem < -3){
wea = "D";
}else{ wea = "C";
}
//ここからSTEP4
if (wea = "A"){
if (minpri >= 60){
cout << "Af 熱帯雨林気候区です" << endl;
}else if(100 * minpre < 10000 - 4 * r){
cout << "Aw サバナ気候区です" << endl;
}else{
cout << "Am 弱い乾季のある熱帯雨林気候区です" << endl;
}
}
if (wea = "B"){
if (R / 2 <= r){
cout << "BS ステップ気候です" << endl;
}else{
cout << "BW 砂漠気候です" << endl;
}
}
if (wea = "C"){
if (dry = "s" && minpre < 30){
cout << "Cs 地中海性気候区です" << endl;
}else if (dry = "w"){
cout << "Cw 温暖冬季少雨気候区です" << endl;
}else if (dry = "f" && maxtem >= 22){
cout << "Cfa 温暖湿潤気候区です" << endl;
}else{
cout << "Cfb 西岸海洋性気候区です" << endl;
}
}
if (wea = "D"){
if (dry = "f"){
cout << "Df 亜寒帯湿潤気候区です" << endl;
}else{
cout << "Dw 亜寒帯冬季少雨気候区です" << endl;
}
}
if (wea = "E"){
if (maxtem < 0){
cout << "EF 氷雪気候区です" << endl;
}else{
cout << "ET ツンドラ気候区です" << endl;
}
}
}
|
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 'double maxtem'
27 | double maxtem = *std::max_element(tem.begin(), tem.end());
| ^~~~~~
a.cc:24:8: note: 'double maxtem' previously declared here
24 | double maxtem;
| ^~~~~~
a.cc:32:8: error: redeclaration of 'double minpre'
32 | double minpre = *min_element(pre.begin(), pre.end());
| ^~~~~~
a.cc:29:8: note: 'double minpre' previously declared here
29 | double minpre;
| ^~~~~~
a.cc:33:8: error: redeclaration of 'double maxpre'
33 | double maxpre = *max_element(pre.begin(), pre.end());
| ^~~~~~
a.cc:30:8: note: 'double maxpre' previously declared here
30 | double maxpre;
| ^~~~~~
a.cc:74:9: error: could not convert 'wea.std::__cxx11::basic_string<char>::operator=(((const char*)"A"))' from 'std::__cxx11::basic_string<char>' to 'bool'
74 | if (wea = "A"){
| ~~~~^~~~~
| |
| std::__cxx11::basic_string<char>
a.cc:75:9: error: 'minpri' was not declared in this scope; did you mean 'minpre'?
75 | if (minpri >= 60){
| ^~~~~~
| minpre
a.cc:83:9: error: could not convert 'wea.std::__cxx11::basic_string<char>::operator=(((const char*)"B"))' from 'std::__cxx11::basic_string<char>' to 'bool'
83 | if (wea = "B"){
| ~~~~^~~~~
| |
| std::__cxx11::basic_string<char>
a.cc:90:9: error: could not convert 'wea.std::__cxx11::basic_string<char>::operator=(((const char*)"C"))' from 'std::__cxx11::basic_string<char>' to 'bool'
90 | if (wea = "C"){
| ~~~~^~~~~
| |
| std::__cxx11::basic_string<char>
a.cc:91:13: error: could not convert 'dry.std::__cxx11::basic_string<char>::operator=(((int)((char)((((const char*)"s") != 0) && (minpre < (double)30)))))' from 'std::__cxx11::basic_string<char>' to 'bool'
91 | if (dry = "s" && minpre < 30){
| ~~~~^~~~~~~~~~~~~~~~~~~~
| |
| std::__cxx11::basic_string<char>
a.cc:93:19: error: could not convert 'dry.std::__cxx11::basic_string<char>::operator=(((const char*)"w"))' from 'std::__cxx11::basic_string<char>' to 'bool'
93 | }else if (dry = "w"){
| ~~~~^~~~~
| |
| std::__cxx11::basic_string<char>
a.cc:95:19: error: could not convert 'dry.std::__cxx11::basic_string<char>::operator=(((int)((char)((((const char*)"f") != 0) && (maxtem >= (double)22)))))' from 'std::__cxx11::basic_string<char>' to 'bool'
95 | }else if (dry = "f" && maxtem >= 22){
| ~~~~^~~~~~~~~~~~~~~~~~~~~
| |
| std::__cxx11::basic_string<char>
a.cc:101:9: error: could not convert 'wea.std::__cxx11::basic_string<char>::operator=(((const char*)"D"))' from 'std::__cxx11::basic_string<char>' to 'bool'
101 | if (wea = "D"){
| ~~~~^~~~~
| |
| std::__cxx11::basic_string<char>
a.cc:102:13: error: could not convert 'dry.std::__cxx11::basic_string<char>::operator=(((const char*)"f"))' from 'std::__cxx11::basic_string<char>' to 'bool'
102 | if (dry = "f"){
| ~~~~^~~~~
| |
| std::__cxx11::basic_string<char>
a.cc:108:9: error: could not convert 'wea.std::__cxx11::basic_string<char>::operator=(((const char*)"E"))' from 'std::__cxx11::basic_string<char>' to 'bool'
108 | if (wea = "E"){
| ~~~~^~~~~
| |
| std::__cxx11::basic_string<char>
|
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, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
if(a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if(a < b) {
a = b;
return true;
}
return false;
}
void print(const std::vector<int> &v) {
std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
std::cout << std::endl;
}
int main() {
vector<int> A[3];
cin >> A[0] >> A[1] >> A[3];
sort(A.begin(), A.end());
if(A[0] == 5 and A[1] == 5 and A[2] == 7) {
cout << "YES" << endl;
return 0;
}
cout << "NO" << endl;
return 0;
}
|
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 {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
| ~~~~~~~~~~~~~~~~~~^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.
|
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; ///< Linked to standard input
| ^~~
a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout >> "YES" >> end1;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:22: error: 'end1' was not declared in this scope
7 | cout >> "YES" >> end1;
| ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout >> "NO" >> emd1;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:21: error: 'emd1' was not declared in this scope
10 | cout >> "NO" >> emd1;
| ^~~~
|
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)
cout >> "Yes" >> endl;
else
cout >> "No" >> endl;
return 0;
}
|
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::basic_ostream<char>}
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:22:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
22 | cout >> "Yes" >> endl;
| ^~~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:22:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
22 | cout >> "Yes" >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:22:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
22 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:22:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
22 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:22:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
22 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:22:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
22 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:22:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
22 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:22:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
22 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]':
a.cc:22:13: required from here
22 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:24:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
24 | cout >> "No" >> endl;
| ~~~~ ^~ ~~~~
| | |
| | const char [3]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:24:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
24 | cout >> "No" >> endl;
| ^~~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:24:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
24 | cout >> "No" >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:24:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
24 | cout >> "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:24:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
24 | cout >> "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:24:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
24 | cout >> "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:24:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
24 | cout >> "No" >> endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substi
|
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, in function returning void [-Wreturn-mismatch]
3 | return (int*)a*-(int*)b*;}
| ^
main.c:2:6: note: declared here
2 | void cmp(const void*a,const void*b){
| ^~~
main.c: In function 'main':
main.c:6:14: error: expected ';' before ':' token
6 | for(i=0;i<3:i++)
| ^
| ;
main.c:8:3: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
8 | qsort(a,3,sizeof(int),cmp);
| ^~~~~
|
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 (int*)*a-(int*)*b;}
| ^~
main.c:3:19: error: invalid use of void expression
3 | return (int*)*a-(int*)*b;}
| ^
main.c:3:10: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
3 | return (int*)*a-(int*)*b;}
| ^
main.c:2:6: note: declared here
2 | void cmp(const void*a,const void*b){
| ^~~
main.c: In function 'main':
main.c:6:14: error: expected ';' before ':' token
6 | for(i=0;i<3:i++)
| ^
| ;
main.c:8:3: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
8 | qsort(a,3,sizeof(int),cmp);
| ^~~~~
|
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 '{' before ',' token
a.cc: In function 'int main()':
a.cc:8:9: error: no match for 'operator==' (operand types are 'std::vector<int>' and 'main()::<lambda()>')
8 | if(ans==[5,5,7]) {
| ~~~^~~~
| | |
| | main()::<lambda()>
| std::vector<int>
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'main()::<lambda()>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'main()::<lambda()>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
8 | if(ans==[5,5,7]) {
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::pair<_T1, _T2>'
8 | if(ans==[5,5,7]) {
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(ans==[5,5,7]) {
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::fpos<_StateT>'
8 | if(ans==[5,5,7]) {
| ^
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'const std::allocator<_CharT>'
8 | if(ans==[5,5,7]) {
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:8:13: note: 'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if(ans==[5,5,7]) {
| ^
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_st
|
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/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
8 | if(ans==5,5,7){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::pair<_T1, _T2>'
8 | if(ans==5,5,7){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(ans==5,5,7){
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::fpos<_StateT>'
8 | if(ans==5,5,7){
| ^
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'const std::allocator<_CharT>'
8 | if(ans==5,5,7){
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:8:11: note: 'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if(ans==5,5,7){
| ^
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(
|
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 << "NO" << std::endl; }
return 0;
|
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;
| ~~^~~~
a.cc:9:26: error: lvalue required as left operand of assignment
9 | else if(A = 7 && B = 5 && 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;
| ~~^~~~
a.cc:9:26: error: lvalue required as left operand of assignment
9 | else if(A = 7 && B = 5 && 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 namespace std;
a.cc:5:10: error: expected primary-expression before 'int'
5 | vector<int> v(3);
| ^~~
a.cc:6:8: error: 'v' was not declared in this scope
6 | cin>>v[0]>>v[1]>>v[2];
| ^
a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'short'?
7 | sort(v.begin(),v.end());
| ^~~~
| short
|
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\n");
else printf("NO\n");
free(iroha);
return 0;
}
|
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( iroha[i] == 5 )count[0] += 1;
| ^
main.c:10:19: error: subscripted value is neither array nor pointer nor vector
10 | else if( iroha[i] == 7)count[1] += 1;
| ^
main.c:15:8: error: passing argument 1 of 'free' makes pointer from integer without a cast [-Wint-conversion]
15 | free(iroha);
| ^~~~~
| |
| int
In file included from main.c:2:
/usr/include/stdlib.h:687:25: note: expected 'void *' but argument is of type 'int'
687 | extern void free (void *__ptr) __THROW;
| ~~~~~~^~~~~
|
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:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:7:20: error: 'string' was not declared in this scope
7 | bool fun(string a, string b){
| ^~~~~~
a.cc:7:20: note: suggested alternatives:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:7:28: error: expression list treated as compound expression in initializer [-fpermissive]
7 | bool fun(string a, string b){
| ^
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
12 | cin>>n>>l;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:13:3: error: 'string' was not declared in this scope
13 | string a[n];
| ^~~~~~
a.cc:13:3: note: suggested alternatives:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:15:10: error: 'a' was not declared in this scope
15 | cin>>a[i];
| ^
a.cc:17:8: error: 'a' was not declared in this scope
17 | sort(a,a+n,fun);
| ^
a.cc:17:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
17 | sort(a,a+n,fun);
| ^~~~
| std::sort
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
| ^~~~
a.cc:19:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
19 | cout<<a[i];
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
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 header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<string>
+++ |+#include <iostream>
3 | using namespace std;
a.cc:15:18: error: 'endl' was not declared in this scope
15 | cout<<"YES"<<endl;
| ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
2 | #include<string>
+++ |+#include <ostream>
3 | using namespace std;
a.cc:17:5: error: 'cout' was not declared in this scope
17 | cout<<"NO"<<endl;
| ^~~~
a.cc:17:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:17: error: 'endl' was not declared in this scope
17 | cout<<"NO"<<endl;
| ^~~~
a.cc:17:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
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 '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #inlude<bits/stdc++.h>
a.cc:16:5: error: 'cout' was not declared in this scope
16 | cout<<"YES"<<endl;
| ^~~~
a.cc:16:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:18: error: 'endl' was not declared in this scope
16 | cout<<"YES"<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #inlude<bits/stdc++.h>
a.cc:18:5: error: 'cout' was not declared in this scope
18 | cout<<"NO"<<endl;
| ^~~~
a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:17: error: 'endl' was not declared in this scope
18 | cout<<"NO"<<endl;
| ^~~~
a.cc:18:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
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 in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<string>
+++ |+#include <iostream>
3 | using namespace std;
a.cc:15:18: error: 'endl' was not declared in this scope
15 | cout<<"YES"<<endl;
| ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
2 | #include<string>
+++ |+#include <ostream>
3 | using namespace std;
a.cc:17:5: error: 'cout' was not declared in this scope
17 | cout<<"NO"<<endl;
| ^~~~
a.cc:17:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:17: error: 'endl' was not declared in this scope
17 | cout<<"NO"<<endl;
| ^~~~
a.cc:17:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
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();
cnt5 = (a == 5) ? cnt5 + 1:cnt5;
cnt7 = (a == 7) ? cnt7 + 1:cnt5;
int c = sc.nextInt();
cnt5 = (a == 5) ? cnt5 + 1:cnt5;
cnt7 = (a == 7) ? cnt7 + 1:cnt5;
if (cnt5 == 2 && cnt7 == 1) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
|
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"<<endl;
}
else cout<<"NO"<<endl;
return 0;
}
|
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 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
11 | sort(s.begin(),s.end());
| ^~~
|
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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:800:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
800 | basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:800:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
/usr/include/c++/14/bits/basic_string.h:149:8: required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = int; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
149 | using _If_sv = enable_if_t<
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:797:30: required from here
797 | template<typename _Tp, typename = _If_sv<_Tp, void>>
| ^~~~~~~~
/usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, void>'
2711 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
788 | basic_string(const _Tp& __t, size_type __pos, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:788:9: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
765 | basic_string(_InputIterator __beg, _InputIterator __end,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:765:9: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
669 | basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:669:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:646:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
646 | basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:646:7: note: template argument deduction/substitution failed:
a.cc:7:15: note: cannot convert '(n - 1)' (type 'int') to type 'const char*'
7 | string s(n-1);
| ~^~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
721 | basic_string(basic_string&& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:721:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
716 | basic_string(const basic_string& __str, const _Alloc& __a)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:716:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:711:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:711:45: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<char>'
711 | basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:682:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
682 | basic_string(basic_string&& __str) noexcept
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:682:35: note: no known conversion for argument 1 from 'int' to 'std::__cxx11::basic_string<char>&&'
682 | basic_string(basic_string&& __str) noexcept
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
624 | basic_string(const _CharT* __s, size_type __n,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:624:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
604 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:604:7: note: candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
586 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:586:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
569 | basic_string(const basic_string& __str, size_type __pos,
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:569:7: note: candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
552 | basic_string(const basic_string& __str)
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:552:40: note: no known conversion for argument 1 from 'int' to 'const std::__cxx11::basic_string<char>&'
552 | basic_string(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:540:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:540:34: note: no known conversion for argument 1 from 'int' to 'const std::allocator<char>&'
540 | basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:527:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = ch
|
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: error: 'cin' does not name a type
5 | cin >> a >> b >> c;
| ^~~
a.cc:6:3: error: expected unqualified-id before 'if'
6 | if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||(a==7&&b==5&&c==5)){
| ^~
a.cc:8:4: error: expected unqualified-id before 'else'
8 | }else{
| ^~~~
a.cc:11:3: error: expected unqualified-id before 'return'
11 | return 0;
| ^~~~~~
a.cc:12:1: error: expected declaration before '}' token
12 | }
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.