submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s517635478
|
p04043
|
Java
|
import java.util.*;
public class Main
{
public static void main(String [] args)
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String [] anArray = reader.readLine().split(" ");
int counterFor7 = 0;
int counterFor5 = 0;
for(int i = 0; i < anArray.length(); i++)
{
if(Integer.parseInt(anArray[i]) == 7)
{
counterFor7++;
}
else if(Integer.parseInt(anArray[i]) == 5)
{
counterFor5++;
}
}
if(counterFor7 == 2 && counterFor5 == 1)
{
System.out.println("Yes");
}
else
{
System.out.println("No");
}
}
}
|
Main.java:7: error: cannot find symbol
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:7: error: cannot find symbol
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:7: error: cannot find symbol
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
Main.java:13: error: cannot find symbol
for(int i = 0; i < anArray.length(); i++)
^
symbol: method length()
location: variable anArray of type String[]
4 errors
|
s904606558
|
p04043
|
Java
|
import java.util.*;
public class Main
{
public static void main(String [] args)
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String [] anArray = reader.readLine().split(" ");
int counterFor7 = 0;
int counterFor5 = 0;
for(int i = 0; i < anArray.length(); i++)
{
if(Integer.parseInt(anArray[i]) == 7)
{
counterFor7++;
}
else if(Integer.parseInt(anArray[i]) == 5)
{
counterFor5++;
}
}
if(counterFor7 == 2 && counterFor5 == 1)
{
System.out.println("Yes")
}
else
{
System.out.println("No")
}
}
}
|
Main.java:27: error: ';' expected
System.out.println("Yes")
^
Main.java:31: error: ';' expected
System.out.println("No")
^
2 errors
|
s878415440
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int x ,y;
void process(int n){
if(n == 5) ++x;
if(n == 7) ++y;
}
int main(){
int a;
for(int i = 0;i < 3 ; ++i){
cin >> a;
process();
}
if(x == 2 && y == 1) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:16: error: too few arguments to function 'void process(int)'
15 | process();
| ~~~~~~~^~
a.cc:6:6: note: declared here
6 | void process(int n){
| ^~~~~~~
|
s079037017
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if(a*b*c==175 && a!=1 && b!=1 && c!=1)
cout << "YES" <<endl;
else
cout << "NO" NNendl;
}
|
a.cc: In function 'int main()':
a.cc:11:19: error: expected ';' before 'NNendl'
11 | cout << "NO" NNendl;
| ^~~~~~~
| ;
|
s117058386
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
main void(){
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:4:1: error: 'main' does not name a type
4 | main void(){
| ^~~~
|
s026085867
|
p04043
|
C++
|
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{ int n;
cin>>n;
string a[n];
for(int i=0;i<n;i++)
{ cin>>a[i];
}
sort(a,a+n);
for(int j=0;j<n;j++)
{ cout<<a[i];
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:13:12: error: 'i' was not declared in this scope
13 | { cout<<a[i];
| ^
|
s571888463
|
p04043
|
C++
|
#include<iostream>
using namespace std;
bool search();
int main(){
int a[3];
int a_size = sizeof(a)/sizeof(a[0]);
for(int i=0;i<a_size;i++){
cout << "a[" << i << "]: ";
cin >> a[i];
}
if(search(a , a_size)){
cout << "YES";
}else{
cout << "NO";
}
}
bool search(int* p, int n){
int count=0;
if(*p++ == 5){
count++;
if(*p++ == 5){
count++;
*p = *p-count;
if(*p++ == 7){
count++;
return 1;
}
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:14: error: no matching function for call to 'search(int [3], int&)'
14 | if(search(a , a_size)){
| ~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
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/stl_algobase.h:2332:5: note: candidate: 'template<class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> _ForwardIterator1 std::search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate)'
2332 | search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
| ^~~~~~
/usr/include/c++/14/bits/stl_algobase.h:2332:5: note: candidate expects 5 arguments, 2 provided
a.cc:5:6: note: candidate: 'bool search()'
5 | bool search();
| ^~~~~~
a.cc:5:6: note: candidate expects 0 arguments, 2 provided
|
s672773335
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A=5 && B=5) {
if(C=7){
cout<< "Yes" <<endl;
}
else {
cout<< "No" <<endl;
}
}
if(C=5 && B=5) {
if(A=7){
cout<< "Yes" <<endl;
}
else {
cout<< "No" <<endl;
}
}
if(A=5 && C=5) {
if(B=7){
cout<< "Yes" <<endl;
}
else {
cout<< "No" <<endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:7:13: error: lvalue required as left operand of assignment
7 | if(A=5 && B=5) {
| ~~^~~~
a.cc:15:16: error: lvalue required as left operand of assignment
15 | if(C=5 && B=5) {
| ~~^~~~
a.cc:23:16: error: lvalue required as left operand of assignment
23 | if(A=5 && C=5) {
| ~~^~~~
|
s328759151
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A=5 && B=5){
if(C=7){
cout<< "Yes" <<endl;
}
else {
cout<< "No" <<endl;
}
}
if(C=5 && B=5){
if(A=7){
cout<< "Yes" <<endl;
}
else {
cout<< "No" <<endl;
}
}
if(A=5 && C=5){
if(B=7){
cout<< "Yes" <<endl;
}
else {
cout<< "No" <<endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:7:13: error: lvalue required as left operand of assignment
7 | if(A=5 && B=5){
| ~~^~~~
a.cc:15:16: error: lvalue required as left operand of assignment
15 | if(C=5 && B=5){
| ~~^~~~
a.cc:23:16: error: lvalue required as left operand of assignment
23 | if(A=5 && C=5){
| ~~^~~~
|
s817276360
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A=5||B=5){
if(C=7){
cout<<"Yes"<<endl;
}
else {
cout<<"No"<<endl;
}
}
if(C=5||B=5){
if(A=7){
cout<<"Yes"<<endl;
}
else {
cout<<"No"<<endl;
}
}
if(A=5||C=5){
if(B=7){
cout<<"Yes"<<endl;
}
else {
cout<<"No"<<endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:7:12: error: lvalue required as left operand of assignment
7 | if(A=5||B=5){
| ~^~~
a.cc:15:15: error: lvalue required as left operand of assignment
15 | if(C=5||B=5){
| ~^~~
a.cc:23:15: error: lvalue required as left operand of assignment
23 | if(A=5||C=5){
| ~^~~
|
s151395309
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A=5||B=5){
if(C=7){
cout<<"Yes"<<endl;
}
else {
cout<<"No"<<endl;
}
if(C=5||B=5){
if(A=7){
cout<<"Yes"<<endl;
}
else {
cout<<"No"<<endl;
}
if(A=5||C=5){
if(B=7){
cout<<"Yes"<<endl;
}
else {
cout<<"No"<<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:7:12: error: lvalue required as left operand of assignment
7 | if(A=5||B=5){
| ~^~~
a.cc:14:15: error: lvalue required as left operand of assignment
14 | if(C=5||B=5){
| ~^~~
a.cc:21:15: error: lvalue required as left operand of assignment
21 | if(A=5||C=5){
| ~^~~
a.cc:29:2: error: expected '}' at end of input
29 | }
| ^
a.cc:14:21: note: to match this '{'
14 | if(C=5||B=5){
| ^
a.cc:29:2: error: expected '}' at end of input
29 | }
| ^
a.cc:7:18: note: to match this '{'
7 | if(A=5||B=5){
| ^
a.cc:29:2: error: expected '}' at end of input
29 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s529492589
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A+B+C=17){
if(A=B=10||B=C=10||A=C=10){
cout<<"Yes"<<endl;
}
else {
cout<<"No"<<endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:7:11: error: lvalue required as left operand of assignment
7 | if(A+B+C=17){
| ~~~^~
a.cc:8:26: error: lvalue required as left operand of assignment
8 | if(A=B=10||B=C=10||A=C=10){
| ~~^~~
|
s095064662
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A+B+C=17){
if(A=B=5||B=C=5||A=C=5){
cout<<"Yes"<<endl;
}
else {
cout<<"No"<<endl;
}
}
}
|
a.cc: In function 'int main()':
a.cc:7:11: error: lvalue required as left operand of assignment
7 | if(A+B+C=17){
| ~~~^~
a.cc:8:24: error: lvalue required as left operand of assignment
8 | if(A=B=5||B=C=5||A=C=5){
| ~^~~
|
s621112715
|
p04043
|
C++
|
#include<iostream>
#include<string>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a==5)cnt5++;
else if(a==7)cnt7++;
if(b==5)cnt5++;
else if(b==7)cnt7++;
if(c==5)cnt5++;
else if(c==7)cnt7++;
if(cnt5==2&&cnt7==1)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:11: error: 'cnt5' was not declared in this scope
9 | if(a==5)cnt5++;
| ^~~~
a.cc:10:16: error: 'cnt7' was not declared in this scope
10 | else if(a==7)cnt7++;
| ^~~~
a.cc:12:11: error: 'cnt5' was not declared in this scope
12 | if(b==5)cnt5++;
| ^~~~
a.cc:13:16: error: 'cnt7' was not declared in this scope
13 | else if(b==7)cnt7++;
| ^~~~
a.cc:15:11: error: 'cnt5' was not declared in this scope
15 | if(c==5)cnt5++;
| ^~~~
a.cc:16:16: error: 'cnt7' was not declared in this scope
16 | else if(c==7)cnt7++;
| ^~~~
a.cc:18:6: error: 'cnt5' was not declared in this scope
18 | if(cnt5==2&&cnt7==1)cout<<"Yes"<<endl;
| ^~~~
a.cc:18:15: error: 'cnt7' was not declared in this scope
18 | if(cnt5==2&&cnt7==1)cout<<"Yes"<<endl;
| ^~~~
|
s815549410
|
p04043
|
C++
|
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define ull unsigned long long
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
#define yes cout << "Yes" << endl
#define no cout << "No" << endl
#define FOR(i,start,stop) for(int i=(start); i < (stop); i++)
#define FORD(i,start,stop) for(int i=(start); i >= (stop); i--)
#define RIP(i,stop) FOR(i,0,stop)
#define PI 3.141592653589793
#define PRECISION(c,f) fixed << setprecision(c) << f
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int a,b,c; cin >> a >> b >> c;
ans5 = 0;
ans7 = 0;
if(a == 5) ans5++;
if(b == 5) ans5++;
if(c == 5) ans5++;
if(a == 7) ans7++;
if(b == 7) ans7++;
if(c == 7) ans7++;
if(ans5 == 2 and ans7 == 1) YES;
else NO;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:26:3: error: 'ans5' was not declared in this scope
26 | ans5 = 0;
| ^~~~
a.cc:27:3: error: 'ans7' was not declared in this scope
27 | ans7 = 0;
| ^~~~
|
s352427079
|
p04043
|
C
|
#include<stdio.h>
int main(){
int x[10],a=0,b=0,i;
for(i=0;i<x;i++){
scanf("%d",&x[i]);
if(x[i]==5){
a++;
}
if(x[i]==7){
b++;
}
else if(a==2&&b==1){
printf("YES");
}
else {
printf("NO");
}
}
return0;
}
|
main.c: In function 'main':
main.c:6:10: warning: comparison between pointer and integer
6 | for(i=0;i<x;i++){
| ^
main.c:22:1: error: 'return0' undeclared (first use in this function)
22 | return0;
| ^~~~~~~
main.c:22:1: note: each undeclared identifier is reported only once for each function it appears in
|
s050557087
|
p04043
|
C
|
#include<stdio.h>
int main()
{
int arr[10],i,a=0,b=055 5;
for(i=1;i<=3;i++){
scanf("%d",&arr[i]);
if(arr[i]==5){
a++;
}
else if(arr[i]==7){
b++;
}
}
if(a==2&&b==1){
printf("YES");
}
else{
printf("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:5:29: error: expected ',' or ';' before numeric constant
5 | int arr[10],i,a=0,b=055 5;
| ^
|
s737267395
|
p04043
|
C
|
#include<stdio.h>
int mian()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a==7&&b==5&&c==5)
{
printf("YES");
}
else if(b==7&&a==5&&c==5)
{
printf("YES");
}
else if(c==7&&a==5&&b==5)
{
printf("YES");
}
else
{
printf("NO");
}
return 0;
}
|
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s040908566
|
p04043
|
C++
|
#include<iostream.h>
using namespace std;
int main()
{
int a,b,c;
if((a==7&&b==5&&c==5)||(a==5&&b==7&&c==5)||(c==7&&a==5&&b==5))
cout<<"Yes";
else
cout<<"No";
return 0;
}
|
a.cc:1:9: fatal error: iostream.h: No such file or directory
1 | #include<iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s469822525
|
p04043
|
Java
|
import java.util.Scanner;
public class A042 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
int count = 0;
if(A == 5 || A == 7) {
count++;
}
if(A == 7) {
if(B == 5) {
count++;
}
} else if(A == 5) {
if(B == 5 || B == 7) {
count++;
}
}
if(A == 7 && B == 5) {
if(C == 5) {
count++;
}
} else if(A == 5 && B == 7) {
if(C == 5) {
count++;
}
} else if(A == 5 && B == 5) {
if(C == 7) {
count++;
}
}
if(count == 3) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:3: error: class A042 is public, should be declared in a file named A042.java
public class A042 {
^
1 error
|
s793812183
|
p04043
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int total = a + b + c;
if(total == 17){
System.out.println("YES");
}else{
System.out.println("NO");
}
|
Main.java:15: error: reached end of file while parsing
}
^
1 error
|
s498513170
|
p04043
|
C++
|
using namespace std;
typedef long long ll;
#define rep(k,i,n) for(ll i=k;i<n;++i)
int main(void){
// Your code here!
ll c5=0,c7=0,a[3];
rep(0,i,3)cin>>a[i];
rep(0,i,3){
if(a[i]==7)++c7;
if(a[i]==5)++c5;
}
if(c7==1&&c5==2)cout<<"YES";
else cout<<"NO";
}
|
a.cc: In function 'int main()':
a.cc:7:15: error: 'cin' was not declared in this scope
7 | rep(0,i,3)cin>>a[i];
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:12:21: error: 'cout' was not declared in this scope
12 | if(c7==1&&c5==2)cout<<"YES";
| ^~~~
a.cc:12:21: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:10: error: 'cout' was not declared in this scope
13 | else cout<<"NO";
| ^~~~
a.cc:13:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s526315731
|
p04043
|
Java
|
import java.util.*; import java.io.*; import java.math.*;
public class Main{
//Don't have to see. start------------------------------------------
static class InputIterator{
ArrayList<String> inputLine = new ArrayList<String>(1024);
int index = 0; int max; String read;
InputIterator(){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try{
while((read = br.readLine()) != null){
inputLine.add(read);
}
}catch(IOException e){}
max = inputLine.size();
}
boolean hasNext(){return (index < max);}
String next(){
if(hasNext()){
return inputLine.get(index++);
}else{
throw new IndexOutOfBoundsException("There is no more input");
}
}
}
static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
static PrintWriter out = new PrintWriter(System.out);
static void flush(){out.flush();}
static void myout(Object t){out.println(t);}
static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
static String next(){return ii.next();}
static boolean hasNext(){return ii.hasNext();}
static int nextInt(){return Integer.parseInt(next());}
static long nextLong(){return Long.parseLong(next());}
static double nextDouble(){return Double.parseDouble(next());}
static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
static ArrayList<Integer> nextIntArray(){
ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
for(int i = 0; i < input.size(); i++){
ret.add(Integer.parseInt(input.get(i)));
}
return ret;
}
static ArrayList<Long> nextLongArray(){
ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
for(int i = 0; i < input.size(); i++){
ret.add(Long.parseLong(input.get(i)));
}
return ret;
}
static String myconv(Object list, int no){//only join
String joinString = CONVSTR.get(no);
if(list instanceof String[]){
return String.join(joinString, (String[])list);
}else if(list instanceof ArrayList){
return String.join(joinString, (ArrayList)list);
}else{
throw new ClassCastException("Don't join");
}
}
static ArrayList<String> myconv(String str, int no){//only split
String splitString = CONVSTR.get(no);
return new ArrayList<String>(Arrays.asList(str.split(splitString)));
}
public static void main(String[] args){
CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
solve();flush();
}
//Don't have to see. end------------------------------------------
static void solve(){//Here is the main function
ArrayList<Integer> one = nextIntArray();
int five = 0;
int sven = 0;
for(int i = 0; i < one.size(); i++){
if(one.get(i) == 5){
five++;
}else if(one.get(i) == 7){
seven++;
}
}
if(five == 2 && seven == 1){
myout("YES");
}else{
myout("NO");
}
}
//Method addition frame start
//Method addition frame end
}
|
Main.java:79: error: cannot find symbol
seven++;
^
symbol: variable seven
location: class Main
Main.java:82: error: cannot find symbol
if(five == 2 && seven == 1){
^
symbol: variable seven
location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
|
s113814036
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
vector<int>vec(3);
sort(vec.begin(),vec.end());
if(vec.(0)==5&&vec.(1)==5&&vec.(2)==7){
cout<<"YES"<<endl;}
else{cout<<"NO"<<endl;}
}
|
a.cc: In function 'int main()':
a.cc:6:10: error: expected unqualified-id before '(' token
6 | if(vec.(0)==5&&vec.(1)==5&&vec.(2)==7){
| ^
a.cc:6:22: error: expected unqualified-id before '(' token
6 | if(vec.(0)==5&&vec.(1)==5&&vec.(2)==7){
| ^
a.cc:6:34: error: expected unqualified-id before '(' token
6 | if(vec.(0)==5&&vec.(1)==5&&vec.(2)==7){
| ^
|
s109767211
|
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
{
printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:6:24: error: 'c' undeclared (first use in this function)
6 | if(A==5 || B==5 && c==7)
| ^
main.c:6:24: note: each undeclared identifier is reported only once for each function it appears in
|
s569826868
|
p04043
|
C++
|
saadfasda
|
a.cc:1:1: error: 'saadfasda' does not name a type
1 | saadfasda
| ^~~~~~~~~
|
s055309615
|
p04043
|
C
|
#include <stdio.h>
inline int Mayor(int A, B){
return A>B? A: B;
}
inline bool Equal(int A, B){
if(A == 5)
return A == B;
return false;
}
int main(){
int A, B, C, Aux;
scanf("%d%d%d", &A, &B, &C);
Aux = Mayor(C, Mayor(A, B));
if(Aux == 7 && (Equal(A, B) || Equal(B, C) || Equal (C, A)))
printf("YES\n");
else
printf("NO\n");
return 0;
}
|
main.c:2:25: error: unknown type name 'B'
2 | inline int Mayor(int A, B){
| ^
main.c:5:8: error: unknown type name 'bool'
5 | inline bool Equal(int A, B){
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include <stdio.h>
+++ |+#include <stdbool.h>
2 | inline int Mayor(int A, B){
main.c:5:26: error: unknown type name 'B'
5 | inline bool Equal(int A, B){
| ^
main.c: In function 'main':
main.c:15:15: error: implicit declaration of function 'Mayor' [-Wimplicit-function-declaration]
15 | Aux = Mayor(C, Mayor(A, B));
| ^~~~~
main.c:16:25: error: implicit declaration of function 'Equal' [-Wimplicit-function-declaration]
16 | if(Aux == 7 && (Equal(A, B) || Equal(B, C) || Equal (C, A)))
| ^~~~~
|
s866305938
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
int cnt[8]={0,0,0,0,0,0,0,0};
cnt[a]++;
cnt[b]++;
cnt[c]++;
if(cnt[5]==2 && cnt[7]==1) cout << "YES\n;
else cout << "NO\n;
return 0;
}
|
a.cc:12:38: warning: missing terminating " character
12 | if(cnt[5]==2 && cnt[7]==1) cout << "YES\n;
| ^
a.cc:12:38: error: missing terminating " character
12 | if(cnt[5]==2 && cnt[7]==1) cout << "YES\n;
| ^~~~~~~
a.cc:13:16: warning: missing terminating " character
13 | else cout << "NO\n;
| ^
a.cc:13:16: error: missing terminating " character
13 | else cout << "NO\n;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:13:3: error: expected primary-expression before 'else'
13 | else cout << "NO\n;
| ^~~~
|
s668247858
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= ll(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= ll(b); i--)
#define FORA(i, I) for (const auto &i : I)
// vector
#define ALL(x) x.begin(), x.end()
// output
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
cout << a;
ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
cout << a << ' ';
}
int ans = 0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
int main()
{
int a, b, c, n, x, y;
string s;
vector<int> v(3);
vector<int> p(3) = {5, 5, 7};
rep(i, 3) cin >> v[i];
sort(v.begin(), v.end());
rep(i, 3)
{
if (v[i] != p[i])
{
NO();
return 0;
}
}
YES();
return 0;
}
|
a.cc: In function 'int main()':
a.cc:61:20: error: expected ',' or ';' before '=' token
61 | vector<int> p(3) = {5, 5, 7};
| ^
|
s690811785
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int c=0;
int a[3],b[3];
for(int i=0;i<3;i++){
cin>>a[i];
b[i]=a[i];
}
sort(b,b+3);
for(int j=0;j<3;j++){
if(a[j]==b[j]){
c++;
}
}
if(c==n){
cout<<"YES\n";
}
else{
cout<<"NO\n";
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:10: error: 'n' was not declared in this scope
16 | if(c==n){
| ^
|
s786971273
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
long long n,q,m,k,t,l;
int main(){
vector<int>l(n,0);
cin>>v[0]>>v[1]>>v[2];
sort(v.begin(), v.end());
if (v[0]==5 and v[1]==5 and v[2]==7){
cout<<"YES";
return 0;
}
cout<<"NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:10: error: 'v' was not declared in this scope
10 | cin>>v[0]>>v[1]>>v[2];
| ^
|
s479614930
|
p04043
|
C++
|
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
using ll = long long;
using p = pair<int,int>;
int cnt_five=0,cnt_seven=0;
int main(int argc, const char * argv[]) {
cin.tie(0);
ios::sync_with_stdio(false);
int a,b,c;
cin>>a>>b>>c;
judge(a);
judge(b);
judge(c);
if(cnt_five==2&&cnt_seven==1)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
}
int judge(int n){
if(n==5)cnt_five++;
else if(n==7)cnt_seven++;
}
|
a.cc: In function 'int main(int, const char**)':
a.cc:16:5: error: 'judge' was not declared in this scope
16 | judge(a);
| ^~~~~
a.cc: In function 'int judge(int)':
a.cc:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
27 | }
| ^
|
s971069346
|
p04043
|
C
|
#include<stdio.h>
int main(){
int a;
int count1=0,count2=0;
for(int i=0;i<3;i++){
scanf("%d ",&a);
if(a==5) count1++;
if(a==7) count2++;
}
if(count1==2 && count2==1) printf("YES"\n);
else printf("NO"\n);
return 0;
}
|
main.c: In function 'main':
main.c:10:42: error: stray '\' in program
10 | if(count1==2 && count2==1) printf("YES"\n);
| ^
main.c:10:42: error: expected ')' before 'n'
10 | if(count1==2 && count2==1) printf("YES"\n);
| ~ ^~
| )
main.c:11:19: error: stray '\' in program
11 | else printf("NO"\n);
| ^
main.c:11:19: error: expected ')' before 'n'
11 | else printf("NO"\n);
| ~ ^~
| )
|
s063663089
|
p04043
|
C
|
#include<stdio.h>
int main(){
int a;
int count1=0,count2=0;
for(int i=0;i<3;i++){
scanf("%d ",&a);
if(a==5) count1++;
if(a==7) count2++;
}
if(count1==2 && count2==1) printf("YES\n);
else printf("NO\n);
return 0;
}
|
main.c: In function 'main':
main.c:10:37: warning: missing terminating " character
10 | if(count1==2 && count2==1) printf("YES\n);
| ^
main.c:10:37: error: missing terminating " character
10 | if(count1==2 && count2==1) printf("YES\n);
| ^~~~~~~~
main.c:11:3: error: expected expression before 'else'
11 | else printf("NO\n);
| ^~~~
main.c:11:15: warning: missing terminating " character
11 | else printf("NO\n);
| ^
main.c:11:15: error: missing terminating " character
11 | else printf("NO\n);
| ^~~~~~~
main.c:13:2: error: expected declaration or statement at end of input
13 | }
| ^
|
s360663940
|
p04043
|
C++
|
/*
author : nishi5451
created : 12.08.2020 23:44:07
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;
int main(){
vector<int> s(3);
rep(i,3) cin >> s[i];
sort(a.begin(),a.end());
if(s[0]==5 && s[1]==5 && s[2]==7) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:10: error: 'a' was not declared in this scope
15 | sort(a.begin(),a.end());
| ^
|
s323898556
|
p04043
|
C++
|
/*
author : nishi5451
created : 12.08.2020 23:44:07
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;
int main(){
vector<int> a(3);
rep(i,3) cin >> a[i];
sort(a.begin(),a.end());
if(s[0]==5 && s[1]==5 && s[2]==7) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:16:8: error: 's' was not declared in this scope
16 | if(s[0]==5 && s[1]==5 && s[2]==7) cout << "YES" << endl;
| ^
|
s782498168
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
int i=0,l=0,m=0,n=0;
while(i<3)
{
if(a==5 || b==5 ||c==5)
{
l++;
}
else if(a==7 || b==7 ||c==7)
{
m++;
}i++;
}
if(l==2 && m==1)
{
cout<<"YES";
}
else
cout<<"NO"
}
|
a.cc: In function 'int main()':
a.cc:23:15: error: expected ';' before '}' token
23 | cout<<"NO"
| ^
| ;
24 | }
| ~
|
s788039703
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if((a==b&&a==5&&c==7)||(ca==b&&c==5&&a==7)||(a==c&&a==5&&b==7)){
cout<<"YES";
}
else{
cout<<"NO";
}}
|
a.cc: In function 'int main()':
a.cc:6:29: error: 'ca' was not declared in this scope; did you mean 'c'?
6 | if((a==b&&a==5&&c==7)||(ca==b&&c==5&&a==7)||(a==c&&a==5&&b==7)){
| ^~
| c
|
s805990935
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if((a==b&&a==5&&c==7)||(ca==b&&c==5&&a==7)||(a==c&&a==5&&bc==7)){
cout<<"YES";
}
else{
cout<<"NO";
}}
|
a.cc: In function 'int main()':
a.cc:6:25: error: 'ca' was not declared in this scope; did you mean 'c'?
6 | if((a==b&&a==5&&c==7)||(ca==b&&c==5&&a==7)||(a==c&&a==5&&bc==7)){
| ^~
| c
a.cc:6:58: error: 'bc' was not declared in this scope; did you mean 'c'?
6 | if((a==b&&a==5&&c==7)||(ca==b&&c==5&&a==7)||(a==c&&a==5&&bc==7)){
| ^~
| c
|
s636390883
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if((a==b&&a==5&&c=7)||(c==b&&c==5&&a=7)||(a==c&&a==5&&b==7)){
cout<<"YES";
}
else{
cout<<"NO";
}}
|
a.cc: In function 'int main()':
a.cc:6:15: error: lvalue required as left operand of assignment
6 | if((a==b&&a==5&&c=7)||(c==b&&c==5&&a=7)||(a==c&&a==5&&b==7)){
| ~~~~~~~~~~^~~
a.cc:6:34: error: lvalue required as left operand of assignment
6 | if((a==b&&a==5&&c=7)||(c==b&&c==5&&a=7)||(a==c&&a==5&&b==7)){
| ~~~~~~~~~~^~~
|
s720010835
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if((a==b&&a==5&&c=7)||(ca==b&&c==5&&a=7)||(a==c&&a==5&&bc=7)){
cout<<"YES";
}
else{
cout<<"NO";
}}
|
a.cc: In function 'int main()':
a.cc:6:15: error: lvalue required as left operand of assignment
6 | if((a==b&&a==5&&c=7)||(ca==b&&c==5&&a=7)||(a==c&&a==5&&bc=7)){
| ~~~~~~~~~~^~~
a.cc:6:24: error: 'ca' was not declared in this scope; did you mean 'c'?
6 | if((a==b&&a==5&&c=7)||(ca==b&&c==5&&a=7)||(a==c&&a==5&&bc=7)){
| ^~
| c
a.cc:6:56: error: 'bc' was not declared in this scope; did you mean 'c'?
6 | if((a==b&&a==5&&c=7)||(ca==b&&c==5&&a=7)||(a==c&&a==5&&bc=7)){
| ^~
| c
|
s290102206
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if((a==b&&a==5&&c=7)||(ca==b&&c==5&&a=7)||(a==c&&a==5&bc=7)){
cout<<"YES";
}
else{
cout<<"NO";
}
}
|
a.cc: In function 'int main()':
a.cc:6:15: error: lvalue required as left operand of assignment
6 | if((a==b&&a==5&&c=7)||(ca==b&&c==5&&a=7)||(a==c&&a==5&bc=7)){
| ~~~~~~~~~~^~~
a.cc:6:24: error: 'ca' was not declared in this scope; did you mean 'c'?
6 | if((a==b&&a==5&&c=7)||(ca==b&&c==5&&a=7)||(a==c&&a==5&bc=7)){
| ^~
| c
a.cc:6:55: error: 'bc' was not declared in this scope; did you mean 'c'?
6 | if((a==b&&a==5&&c=7)||(ca==b&&c==5&&a=7)||(a==c&&a==5&bc=7)){
| ^~
| c
|
s243292310
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a[3],i,num5,num7;
cin>>a[0];
cin>>a[1];
cin>>a[2];
for(i=0;i<3;i++){
if(a[i]==5){num5++;}
if(a[i]==7){num7++;}
}
if(num5==2&&num7==1){cout<<"YES"<<endl;}
else{cout<<"NO"<<<endl;}
}
|
a.cc: In function 'int main()':
a.cc:13:20: error: expected primary-expression before '<' token
13 | else{cout<<"NO"<<<endl;}
| ^
|
s964807594
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a[3],i,num5,num7;
cin>>a[0]>>a[1]>>a[2];
for(i=0;i<3;i++){
if(a[i]==5){num5++;}
if(a[i]==7){num7++;}
}
if(num5==2&&num7==1){cout<<"YES"<<endl;}
else{cout<<"NO"<<<endl;}
}
|
a.cc: In function 'int main()':
a.cc:11:20: error: expected primary-expression before '<' token
11 | else{cout<<"NO"<<<endl;}
| ^
|
s377763622
|
p04043
|
C++
|
else if(
|
a.cc:1:1: error: expected unqualified-id before 'else'
1 | else if(
| ^~~~
|
s383888423
|
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) cout << YES;
else if(a==5&&b==5&&c==7) cout << YES;
else if(a==7&&b==5&&c==5) cout << YES;
else cout << NO;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:32: error: 'YES' was not declared in this scope
7 | if(a==5&&b==7&&c==5) cout << YES;
| ^~~
a.cc:8:37: error: 'YES' was not declared in this scope
8 | else if(a==5&&b==5&&c==7) cout << YES;
| ^~~
a.cc:9:37: error: 'YES' was not declared in this scope
9 | else if(a==7&&b==5&&c==5) cout << YES;
| ^~~
a.cc:10:16: error: 'NO' was not declared in this scope
10 | else cout << NO;
| ^~
|
s228261842
|
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) cout << YES;
else if(a==5&&b==5&&c==7) cout << YES;
else if(a==7&&b==5&&c==5) cout << YES;
else cout << NO;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:12: error: no match for 'operator<<' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
6 | cin >> a << b << c;
| ~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:6:12: note: candidate: 'operator<<(int, int)' (built-in)
6 | cin >> a << b << c;
| ~~~~~~~~~^~~~
a.cc:6:12: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to '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:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin >> a << b << c;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:6:7: note: cannot convert 'std::cin.std::basic_istream<char>::operator>>(a)' (type 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'}) to type 'std::byte'
6 | cin >> a << b << c;
| ~~~~^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
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:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin >> a << b << c;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin >> a << b << c;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin >> a << b << c;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin >> a << b << c;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin >> a << b << c;
| ^
In file included from /usr/include/c++/14/istream:41,
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:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin >> a << b << c;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin >> a << b << c;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin >> a << b << c;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin >> a << b << c;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin >> a << b << c;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin >> a << b << c;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:6:15: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _T
|
s691527257
|
p04043
|
C++
|
#include <iostream>
int main() {
int five = 0;
int seven = 0;
using namespace std;
int i;
cin >> i;
if (i == 5) ++five; else if (i == 7) ++seven;
cin >> i;
if (i == 5) ++five; else if (i == 7) ++seven;
cin >> i;
if (i == 5) ++five; else if (i == 7) ++seven;
cout << five == 2 && seven == 1 ? "YES" : "NO";
}
|
a.cc: In function 'int main()':
a.cc:15:16: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int')
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ~~~~~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_ostream<char>
a.cc:15:16: note: candidate: 'operator==(int, int)' (built-in)
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ~~~~~~~~~~~~~^~~~
a.cc:15:16: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
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:1:
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/string:43,
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/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/string:48:
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string: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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
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:15:19: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: 'std::basic_ostream<char>' is not derived
|
s931902230
|
p04043
|
C++
|
#include <iostream>
int main() {
int five = 0;
int seven = 0;
using namespace std;
int i
cin >> i;
if (i == 5) ++five; else if (i == 7) ++seven;
cin >> i;
if (i == 5) ++five; else if (i == 7) ++seven;
cin >> i;
if (i == 5) ++five; else if (i == 7) ++seven;
cout << five == 2 && seven == 1 ? "YES" : "NO";
}
|
a.cc: In function 'int main()':
a.cc:9:3: error: expected initializer before 'cin'
9 | cin >> i;
| ^~~
a.cc:10:7: error: 'i' was not declared in this scope
10 | if (i == 5) ++five; else if (i == 7) ++seven;
| ^
a.cc:11:10: error: 'i' was not declared in this scope
11 | cin >> i;
| ^
a.cc:15:16: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int')
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ~~~~~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_ostream<char>
a.cc:15:16: note: candidate: 'operator==(int, int)' (built-in)
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ~~~~~~~~~~~~~^~~~
a.cc:15:16: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
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:1:
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/string:43,
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/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/string:48:
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string: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:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
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:15:19: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/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:15:19: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:15:19: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
15 | cout << five == 2 && seven == 1 ? "YES" : "NO";
| ^
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const i
|
s413243011
|
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";
}
else if(A==5 && C==5 && B == 7){
cout<< "yes";
}
else if(B==5 && C==5&& A==7){
cout<< "yes";
}
else
cout<<"NO";
|
a.cc: In function 'int main()':
a.cc:16:16: error: expected '}' at end of input
16 | cout<<"NO";
| ^
a.cc:3:12: note: to match this '{'
3 | int main (){
| ^
|
s090334907
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a(3);
for(int i = 0;i < 3){
cin >> a.at(i);
}
sort(a.begin(), a.end());
if(a.at(0) == 5) {
if(a.at(1) == 5) {
if(a.at(2) == 7) {
cout << "Yes" << endl;
return 0;
} else {
cout << "No" << endl;
return 0;
}
}
}
}
|
a.cc: In function 'int main()':
a.cc:6:22: error: expected ';' before ')' token
6 | for(int i = 0;i < 3){
| ^
| ;
|
s193896021
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a(3);
for(int = 0;i < 3){
cin >> a.at(i);
}
sort(a.begin(), a.end());
if(a.at(0) == 5) {
if(a.at(1) == 5) {
if(a.at(2) == 7) {
cout << "Yes" << endl;
return 0;
} else {
cout << "No" << endl;
return 0;
}
}
}
}
|
a.cc: In function 'int main()':
a.cc:6:11: error: expected unqualified-id before '=' token
6 | for(int = 0;i < 3){
| ^
a.cc:6:10: error: expected ';' before '=' token
6 | for(int = 0;i < 3){
| ^~
| ;
a.cc:6:11: error: expected primary-expression before '=' token
6 | for(int = 0;i < 3){
| ^
a.cc:6:15: error: 'i' was not declared in this scope
6 | for(int = 0;i < 3){
| ^
|
s801272077
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if (a == 7 && b.size() == 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:10:19: error: request for member 'size' in 'b', which is of non-class type 'int'
10 | if (a == 7 && b.size() == 5 && c == 5){
| ^~~~
|
s219122319
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if (a.size() == 7 && b.size() == 5 && b.size() == 5){
cout << "YES" << endl;
}else if (a.size() == 5 && b.size() == 7 && b.size() == 5){
cout << "YES" << endl;
}else if (a.size() == 5 && b.size() == 5 && b.size() == 7){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:10:9: error: request for member 'size' in 'a', which is of non-class type 'int'
10 | if (a.size() == 7 && b.size() == 5 && b.size() == 5){
| ^~~~
a.cc:10:26: error: request for member 'size' in 'b', which is of non-class type 'int'
10 | if (a.size() == 7 && b.size() == 5 && b.size() == 5){
| ^~~~
a.cc:10:43: error: request for member 'size' in 'b', which is of non-class type 'int'
10 | if (a.size() == 7 && b.size() == 5 && b.size() == 5){
| ^~~~
a.cc:13:15: error: request for member 'size' in 'a', which is of non-class type 'int'
13 | }else if (a.size() == 5 && b.size() == 7 && b.size() == 5){
| ^~~~
a.cc:13:32: error: request for member 'size' in 'b', which is of non-class type 'int'
13 | }else if (a.size() == 5 && b.size() == 7 && b.size() == 5){
| ^~~~
a.cc:13:49: error: request for member 'size' in 'b', which is of non-class type 'int'
13 | }else if (a.size() == 5 && b.size() == 7 && b.size() == 5){
| ^~~~
a.cc:15:15: error: request for member 'size' in 'a', which is of non-class type 'int'
15 | }else if (a.size() == 5 && b.size() == 5 && b.size() == 7){
| ^~~~
a.cc:15:32: error: request for member 'size' in 'b', which is of non-class type 'int'
15 | }else if (a.size() == 5 && b.size() == 5 && b.size() == 7){
| ^~~~
a.cc:15:49: error: request for member 'size' in 'b', which is of non-class type 'int'
15 | }else if (a.size() == 5 && b.size() == 5 && b.size() == 7){
| ^~~~
|
s343464279
|
p04043
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a==5 && b==5 && c==7 || a==5 && b==7 && c ==5 =|| a==7 && b==5 && c==5){
System.out.println("YES");
}
else System.out.println("NO");
}
}
|
Main.java:10: error: illegal start of expression
if(a==5 && b==5 && c==7 || a==5 && b==7 && c ==5 =|| a==7 && b==5 && c==5){
^
1 error
|
s562334687
|
p04043
|
C
|
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
int i;
int cnt_5 = 0, cnt_7 = 0;
for(i = 0; i < 3; i++) {
if(strcmp(argv[i], "5") == 0) cnt_5++;
if(strcmp(argv[i], "7") == 0) cnt_7++;
}
if(cnt_5 == 2 && cnt_7 == 1) printf("%s\n", "YES");
else printf("%s\n", "NO");
return 0;
}
|
main.c: In function 'main':
main.c:6:12: error: stray '\343' in program
6 | int cnt_5<U+3000>= 0, cnt_7 = 0;
| ^~~~~~~~
|
s931202182
|
p04043
|
C
|
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
int i;
int cnt_5, cnt_7 = 0, 0;
for(i = 0; i < 3; i++) {
if(strcmp(argv[i], "5") == 0) cnt_5++;
if(strcmp(argv[i], "7") == 0) cnt_7++;
}
if(cnt_5 == 2 && cnt_7 == 1) printf("%s\n", "YES");
else printf("%s\n", "NO");
return 0;
}
|
main.c: In function 'main':
main.c:6:25: error: expected identifier or '(' before numeric constant
6 | int cnt_5, cnt_7 = 0, 0;
| ^
|
s934925414
|
p04043
|
C
|
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
int i;
int cnt_5, cnt_7 = 0, 0;
for(i = 0; i < 3; i++) {
if(strcmp(argv[i], "5") == 0) cnt_5++;
if(strcmp(argv[i], "7") == 0) cnt_7++;
}
if(cnt_5 == 2 && cnt_7 == 1) print("%s\n", "YES");
else printf("%s\n", "NO");
return 0;
}
|
main.c: In function 'main':
main.c:6:25: error: expected identifier or '(' before numeric constant
6 | int cnt_5, cnt_7 = 0, 0;
| ^
main.c:11:32: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
11 | if(cnt_5 == 2 && cnt_7 == 1) print("%s\n", "YES");
| ^~~~~
| printf
|
s982591674
|
p04043
|
C
|
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
int i;
int cnt_5, cnt_7 = 0, 0;
for(i = 0; i < 3; i++) {
strcmp(argv[i] == "5") cnt_5++;
strcmp(argv[i] == "7") cnt_7++;
}
if(cnt_5 == 2 && cnt_7 == 1) print("%s\n", "YES");
else printf("%s\n", "NO");
return 0;
}
|
main.c: In function 'main':
main.c:6:25: error: expected identifier or '(' before numeric constant
6 | int cnt_5, cnt_7 = 0, 0;
| ^
main.c:8:20: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
8 | strcmp(argv[i] == "5") cnt_5++;
| ~~~~~~~~^~~~~~
| |
| int
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
main.c:8:5: error: too few arguments to function 'strcmp'
8 | strcmp(argv[i] == "5") cnt_5++;
| ^~~~~~
/usr/include/string.h:156:12: note: declared here
156 | extern int strcmp (const char *__s1, const char *__s2)
| ^~~~~~
main.c:8:27: error: expected ';' before 'cnt_5'
8 | strcmp(argv[i] == "5") cnt_5++;
| ^~~~~~
| ;
main.c:9:20: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
9 | strcmp(argv[i] == "7") cnt_7++;
| ~~~~~~~~^~~~~~
| |
| int
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
main.c:9:5: error: too few arguments to function 'strcmp'
9 | strcmp(argv[i] == "7") cnt_7++;
| ^~~~~~
/usr/include/string.h:156:12: note: declared here
156 | extern int strcmp (const char *__s1, const char *__s2)
| ^~~~~~
main.c:9:27: error: expected ';' before 'cnt_7'
9 | strcmp(argv[i] == "7") cnt_7++;
| ^~~~~~
| ;
main.c:11:32: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
11 | if(cnt_5 == 2 && cnt_7 == 1) print("%s\n", "YES");
| ^~~~~
| printf
|
s687341970
|
p04043
|
C++
|
int main(){
int n[3];
int i, j;
bool f = false;
for (i=0; i<3; i++){
cin >> n[i];
}
if (n[0]+ n[1] + n[2] == 12){
for (i=0; i<3; i++){
if (n[i] == 7){
for (j=0; j<3; j++){
if (n[j] == 5){
f = true;
break;
}
}
}
}
}
if (f == true){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
7 | cin >> n[i];
| ^~~
a.cc:24:9: error: 'cout' was not declared in this scope
24 | cout << "YES" << endl;
| ^~~~
a.cc:24:26: error: 'endl' was not declared in this scope
24 | cout << "YES" << endl;
| ^~~~
a.cc:26:9: error: 'cout' was not declared in this scope
26 | cout << "NO" << endl;
| ^~~~
a.cc:26:25: error: 'endl' was not declared in this scope
26 | cout << "NO" << endl;
| ^~~~
|
s028481432
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define all(vec) vec.begin(),vec.end()
using vi = vector<int>;
using vvi = vector<vi>;
using ll = long long;
int main() {
map<int, int> mp;
rep(i, 3){
int s; cin >> s; mp[s]++;
}
if(map[5]==2 && map[7]==1) cout << "YES" << endl;
else cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:13:9: error: expected unqualified-id before '[' token
13 | if(map[5]==2 && map[7]==1) cout << "YES" << endl;
| ^
|
s550828535
|
p04043
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String a = sc.nextInt();
String b = sc.nextInt();
String c = sc.nextInt();
if(a== 5 && b == 7 && c ==5){
System.out.println("YES");
}else if(a== 5 && b== 5 &&c ==7){
System.out.println("YES");
}else if(a == 7 && b == 5&& c ==5){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
|
Main.java:5: error: incompatible types: int cannot be converted to String
String a = sc.nextInt();
^
Main.java:6: error: incompatible types: int cannot be converted to String
String b = sc.nextInt();
^
Main.java:7: error: incompatible types: int cannot be converted to String
String c = sc.nextInt();
^
Main.java:9: error: bad operand types for binary operator '=='
if(a== 5 && b == 7 && c ==5){
^
first type: String
second type: int
Main.java:9: error: bad operand types for binary operator '=='
if(a== 5 && b == 7 && c ==5){
^
first type: String
second type: int
Main.java:9: error: bad operand types for binary operator '=='
if(a== 5 && b == 7 && c ==5){
^
first type: String
second type: int
Main.java:11: error: bad operand types for binary operator '=='
}else if(a== 5 && b== 5 &&c ==7){
^
first type: String
second type: int
Main.java:11: error: bad operand types for binary operator '=='
}else if(a== 5 && b== 5 &&c ==7){
^
first type: String
second type: int
Main.java:11: error: bad operand types for binary operator '=='
}else if(a== 5 && b== 5 &&c ==7){
^
first type: String
second type: int
Main.java:13: error: bad operand types for binary operator '=='
}else if(a == 7 && b == 5&& c ==5){
^
first type: String
second type: int
Main.java:13: error: bad operand types for binary operator '=='
}else if(a == 7 && b == 5&& c ==5){
^
first type: String
second type: int
Main.java:13: error: bad operand types for binary operator '=='
}else if(a == 7 && b == 5&& c ==5){
^
first type: String
second type: int
12 errors
|
s294293169
|
p04043
|
Java
|
import java.util.Scanner;
pablic class Main{
pablic static void main(String[] args){
Scanner sc = new Scanner(System.in);
String a = sc.next();
String b = sc.next();
String c = sc.next();
if(a.length() == 5 && b.length() == 7 && c.length() ==5){
System.out.println("YES");
}else if(a.length() == 5 && b.length() == 5 && c.length() ==7){
System.out.println("YES");
}else if(a.length() == 5 && b.length() == 7 && c.length() ==5){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
|
Main.java:2: error: class, interface, enum, or record expected
pablic class Main{
^
Main.java:3: error: <identifier> expected
pablic static void main(String[] args){
^
2 errors
|
s560020772
|
p04043
|
C++
|
#include <bits/stdc++.h>
#include <string>
#include <algorithm>
using namespace std; //std::の省略のため
using ll = long long;
int main()
{
int N, K;
cin >> N >> K;
int D[K];
for (int i = 0; i < K; i++)
cin >> D[i];
int ans = N;
int tmp;
bool judge;
while ()
{
tmp = ans;
judge = true;
while (tmp != 0)
{
for (int i = 0; i < K; i++)
{
if ((tmp % 10) == D[i])
{
judge = false;
break;
}
}
if (!judge)
break;
tmp /= 10;
}
if (judge)
break;
else
ans++;
}
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:20:10: error: expected primary-expression before ')' token
20 | while ()
| ^
|
s738353916
|
p04043
|
C
|
#include<stdio.h>
int main(){
int a;
int b;
int c:
scanf("%d %d %d", &a, &b, &c);
if(a + b + c == 17){
printf("YES\n");
}else{
printf("NO/n");
}
return 0;
}
|
main.c: In function 'main':
main.c:7:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
7 | int c:
| ^
main.c:7:8: error: expected expression before ':' token
main.c:11:14: error: 'c' undeclared (first use in this function)
11 | if(a + b + c == 17){
| ^
main.c:11:14: note: each undeclared identifier is reported only once for each function it appears in
|
s503794973
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a[3];
int c5=0,c7=0;
fr(0,3){
cin >> a[i];
if(a[i]==5){ ++c5;continue;}
else if(a[i]==7) {++c7;continue;}
}
if(c5==2 && c7==1) cout << "YES";
else cout << "YES";
return 0;
|
a.cc: In function 'int main()':
a.cc:8:5: error: 'fr' was not declared in this scope
8 | fr(0,3){
| ^~
a.cc:18:18: error: expected '}' at end of input
18 | return 0;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s625901070
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
int A, B, C;
cin >> A >> B >> C
}
|
a.cc: In function 'int main()':
a.cc:8:27: error: expected ';' before '}' token
8 | cin >> A >> B >> C
| ^
| ;
......
11 | }
| ~
|
s410237826
|
p04043
|
Java
|
import java.util.*;
public class Main {
public static int five = 0;
public static int seven = 0;
public static void main(String[] args) {
String[] inputs = sc.next().split(" ");
check(args[0]);
check(args[1]);
check(args[2]);
System.out.println(five==2 && seven ==1 ? "YES":"NO");
}
public static void check(String str){
int number = Integer.parseInt(str);
if(number==5)five++;
if(number==7)seven++;
}
}
|
Main.java:7: error: cannot find symbol
String[] inputs = sc.next().split(" ");
^
symbol: variable sc
location: class Main
1 error
|
s051481318
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
int n5=0;
int n7=0;
if(A==5) n5++;
if(B==5) n5++;
if(C==5) n5++;
if(A==7) n7++;
if(B==7) n7++;
if(C==7) n7++;
if(n5==2 && n7==1) cout >> "YES";
else "NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:27: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
14 | if(n5==2 && n7==1) cout >> "YES";
| ~~~~ ^~ ~~~~~
| | |
| | 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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES";
| ^~~~~
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:14:22: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
14 | if(n5==2 && n7==1) cout >> "YES";
| ^~~~
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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES";
| ^~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES";
| ^~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES";
| ^~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES";
| ^~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES";
| ^~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES";
| ^~~~~
/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:14:30: required from here
14 | if(n5==2 && n7==1) cout >> "YES";
| ^~~~~
/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)
| ^~~~~~~~
|
s849701723
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
int n5=0;
int n7=0;
if(A==5) n5++;
if(B==5) n5++;
if(C==5) n5++;
if(A==7) n7++;
if(B==7) n7++;
if(C==7) n7++;
if(n5==2 && n7==1) cout >> "YES\n";
else "NO\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:27: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [5]')
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ~~~~ ^~ ~~~~~~~
| | |
| | const char [5]
| 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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
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:14:22: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~
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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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 (&)[5]]':
a.cc:14:30: required from here
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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)
| ^~~~~~~~
|
s527183637
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
int n5=0;
int n7=0;
if(A==5) n5++;
if(B==5) n5++;
if(C==5) n5++;
if(A==7) n7++;
if(B==7) n7++;
if(C==7) n7++;
if(n5==2 && n7==1) cout >> "YES\n";
else "NO\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:14:27: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [5]')
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ~~~~ ^~ ~~~~~~~
| | |
| | const char [5]
| 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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
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:14:22: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~
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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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:14:30: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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 (&)[5]]':
a.cc:14:30: required from here
14 | if(n5==2 && n7==1) cout >> "YES\n";
| ^~~~~~~
/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)
| ^~~~~~~~
|
s720519499
|
p04043
|
C
|
#include<stdio.h>
int main(){
iny a,b,c;
scanf("%d%d%d",&a,&b,&c);
if ( (a==b && a==5) || (b==c && b==5) || (a==c && a==5) ) {
printf("YES\n");
} else {
puts("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:3:3: error: unknown type name 'iny'; did you mean 'int'?
3 | iny a,b,c;
| ^~~
| int
|
s443678942
|
p04043
|
C++
|
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
constexpr char ln = '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1001001001LL;
constexpr long long LINF = 1001001001001001001;
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define rept(i, j, n) for(int i=(j); i<(n); i++)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int main(){
int a[3];
rep(i, 3)cin >> a[i];
sort(a, a+3);
if(a[0]==5 && a[1]==5 && a[2]==7)cout << "YES" << ln;
else cout << "NO" << ln;
}
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
constexpr char ln = '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1001001001LL;
constexpr long long LINF = 1001001001001001001;
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define rept(i, j, n) for(int i=(j); i<(n); i++)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int main(){
int a[3];
rep(i, 3)cin >> a[i];
sort(a, a+3);
if(a[0]==5 && a[1]==5 && a[2]==7)cout << "YES" << ln;
else cout << "NO" << ln;
}
|
a.cc:32:16: error: redefinition of 'constexpr const char ln'
32 | constexpr char ln = '\n';
| ^~
a.cc:7:16: note: 'constexpr const char ln' previously defined here
7 | constexpr char ln = '\n';
| ^~
a.cc:33:21: error: redefinition of 'constexpr const long long int MOD'
33 | constexpr long long MOD = 1000000007LL;
| ^~~
a.cc:8:21: note: 'constexpr const long long int MOD' previously defined here
8 | constexpr long long MOD = 1000000007LL;
| ^~~
a.cc:34:21: error: redefinition of 'constexpr const long long int INF'
34 | constexpr long long INF = 1001001001LL;
| ^~~
a.cc:9:21: note: 'constexpr const long long int INF' previously defined here
9 | constexpr long long INF = 1001001001LL;
| ^~~
a.cc:35:21: error: redefinition of 'constexpr const long long int LINF'
35 | constexpr long long LINF = 1001001001001001001;
| ^~~~
a.cc:10:21: note: 'constexpr const long long int LINF' previously defined here
10 | constexpr long long LINF = 1001001001001001001;
| ^~~~
a.cc:39:31: error: redefinition of 'template<class T> bool chmax(T&, T)'
39 | template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
| ^~~~~
a.cc:14:31: note: 'template<class T> bool chmax(T&, T)' previously declared here
14 | template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
| ^~~~~
a.cc:40:31: error: redefinition of 'template<class T> bool chmin(T&, T)'
40 | template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
| ^~~~~
a.cc:15:31: note: 'template<class T> bool chmin(T&, T)' previously declared here
15 | template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
| ^~~~~
a.cc:43:5: error: redefinition of 'int main()'
43 | int main(){
| ^~~~
a.cc:18:5: note: 'int main()' previously defined here
18 | int main(){
| ^~~~
|
s646670184
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
vector<int> length(11, 0);
length[A.size()]++;
length[B.size()]++;
length[C.size()]++;
if (length[5] == 2 && length[7] == 1) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:10:12: error: request for member 'size' in 'A', which is of non-class type 'int'
10 | length[A.size()]++;
| ^~~~
a.cc:11:12: error: request for member 'size' in 'B', which is of non-class type 'int'
11 | length[B.size()]++;
| ^~~~
a.cc:12:12: error: request for member 'size' in 'C', which is of non-class type 'int'
12 | length[C.size()]++;
| ^~~~
|
s799470041
|
p04043
|
Java
|
public static void main (String[] args){
int a;
int b;
int c;
if(a==5 && b==7 && c==5){
System.out.println("YES");
} else if(a==5 && b==5 && c==7){
System.out.println("YES");
} else if(a==7 && b==5 && c==5){
System.out.println("YES");
} else if {
System.out.println("NO");
}
}
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main (String[] args){
^
(use --enable-preview to enable unnamed classes)
Main.java:12: error: '(' expected
} else if {
^
Main.java:12: error: illegal start of expression
} else if {
^
3 errors
|
s320689765
|
p04043
|
C++
|
int main(){
int a = 1;
for(int i=0; i<3;i++){
int d; cin >> d;
a *= d;
}
string ans = "NO";
if(a == 25*7) ans = "YES";
cout << ans << endl;
}
|
a.cc: In function 'int main()':
a.cc:4:13: error: 'cin' was not declared in this scope
4 | int d; cin >> d;
| ^~~
a.cc:7:3: error: 'string' was not declared in this scope
7 | string ans = "NO";
| ^~~~~~
a.cc:8:17: error: 'ans' was not declared in this scope
8 | if(a == 25*7) ans = "YES";
| ^~~
a.cc:9:3: error: 'cout' was not declared in this scope
9 | cout << ans << endl;
| ^~~~
a.cc:9:11: error: 'ans' was not declared in this scope
9 | cout << ans << endl;
| ^~~
a.cc:9:18: error: 'endl' was not declared in this scope
9 | cout << ans << endl;
| ^~~~
|
s047537635
|
p04043
|
C++
|
#include <iostream> // Cでいうstdio.h 標準入出力ライブラリ
using namespace std; // 名前空間
int main(void){
// int変数定義
int num1;
int num2;
int num3;
// コンソール入力
cin >> num1;
cin >> num2;
cin >> num3;
if(num1 + num2 + num3 == 17) {
cout << "YES"
} else {
cout << "NO"
}
}
|
a.cc: In function 'int main()':
a.cc:17:22: error: expected ';' before '}' token
17 | cout << "YES"
| ^
| ;
18 | } else {
| ~
a.cc:19:21: error: expected ';' before '}' token
19 | cout << "NO"
| ^
| ;
20 | }
| ~
|
s364971627
|
p04043
|
Java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main1 {
public static void main(String[] args) {
int f = 2;
int s = 1;
int k = 0;
String str = null;
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
try {
str = br.readLine();
String[] i = str.split(" ");
for (int j = 0; j < 3; j++) {
if (i[j].equals("5")) {
--f;
} else if (i[j].equals("7")) {
--s;
}
}
} catch (NumberFormatException e) {
System.out.println("NO");
} catch (IOException e) {
System.out.println("NO");
}
if (f == 0 && s == 0) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:5: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
^
1 error
|
s031038628
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a[3];cin>>a[0]>>a[1]>>a[2];
sort(a, a+a.size());
if (a[0] == 5 && a[2] == 7 && a[1] == 5) cout << "YES" << endl;
else cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:6:15: error: request for member 'size' in 'a', which is of non-class type 'int [3]'
6 | sort(a, a+a.size());
| ^~~~
|
s100116414
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;cin>>a>>b>>c;
if (a+b+c == 12) cout << "YES" << endl;
else cotu << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:8: error: 'cotu' was not declared in this scope
7 | else cotu << "NO" << endl;
| ^~~~
|
s544203179
|
p04043
|
Java
|
package jp.AtCoder.seto_42;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class a {
public static void main(String[] args) {
int f = 2;
int s = 1;
int i;
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
try {
for (int j = 0; j < 3; j++) {
i = Integer.parseUnsignedInt(br.readLine());
if (i == 5) {
--f;
} else if (i == 7) {
--s;
}
}
} catch (NumberFormatException | IOException e) {
System.out.println("NO");
}
if (f == 0 && s == 0) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:7: error: class a is public, should be declared in a file named a.java
public class a {
^
1 error
|
s412112897
|
p04043
|
Java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class a {
public static void main(String[] args) {
int f = 2;
int s = 1;
int i;
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
try {
for (int j = 0; j < 3; j++) {
i = Integer.parseUnsignedInt(br.readLine());
if (i == 5) {
--f;
} else if (i == 7) {
--s;
}
}
} catch (NumberFormatException | IOException e) {
System.out.println("NO");
}
if (f == 0 && s == 0) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:5: error: class a is public, should be declared in a file named a.java
public class a {
^
1 error
|
s124863092
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
int a[3]
int main() {
rep(i,3) cin >> a[i];
sort(a,a+3);
if (a[0] == 5 && a[1] == 5 && a[2] == 7) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
|
a.cc:8:1: error: expected initializer before 'int'
8 | int main() {
| ^~~
|
s378714069
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] a){
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
if (a == 5 || a==7 || b == 5 || b == 7 || c == 5 || c == 7)
if (a + b + c == 17)
System.out.printf("YES");
else
System.out.printf("NO");
else
System.out.printf("NO");
}
}
|
Main.java:5: error: variable a is already defined in method main(String[])
int a = in.nextInt();
^
1 error
|
s778902350
|
p04043
|
Java
|
package javaapplication7;
import java.util.*;
public class JavaApplication7 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
if (a == 5 || a==7 || b == 5 || b == 7 || c == 5 || c == 7)
if (a + b + c == 17)
System.out.printf("YES");
else
System.out.printf("NO");
else
System.out.printf("NO");
}
}
|
Main.java:4: error: class JavaApplication7 is public, should be declared in a file named JavaApplication7.java
public class JavaApplication7 {
^
1 error
|
s961781193
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define CPP_STR(x) CPP_STR_I(x)
#define CPP_CAT(x,y) CPP_CAT_I(x,y)
#define CPP_STR_I(args...) #args
#define CPP_CAT_I(x,y) x ## y
#define ASSERT(expr...) assert((expr))
signed main() {
int a, b, c;
cin >> a;
cin >> b;
cin >> c;
if (
(a == 5 && b == 5 && c == 7)
(a == 5 && b == 7 && c == 5) ||
(a == 7 && b == 5 && c == 5)
) {
cout << "YES" << "\n" << endl;
} else {
cout << "NO" << "\n" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:19:8: error: expression cannot be used as a function
18 | (a == 5 && b == 5 && c == 7)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 | (a == 5 && b == 7 && c == 5) ||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
s885595519
|
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";
else cout<<"NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before '||' token
7 | if(a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||(a==7&&b==5&&c==5) cout<<"YES";
| ^~
|
s883406576
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
map <int,int> freq;
for(int i = 0; i < 3;i++)
{
int value = 0;
cin>>value;
freq[value]++;
}
if(freq[5] == 2 && freq[7] == 1)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
}
|
a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s354293828
|
p04043
|
C
|
#include <stdio.h>
int main (void){
int a[3];
int count5 = 0;
int count7 =0;
for (int i=0, i<=3; i++){
scanf("%d",&a[i]);
if(a[i] == 5) {
count5++;
}else if (a[i] == 7){
count7++;
}
}
if (count5 == 2 && count7 == 1){
printf("YES");
}else {
printf("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:7:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
7 | for (int i=0, i<=3; i++){
| ^~
main.c:7:26: error: expected ';' before ')' token
7 | for (int i=0, i<=3; i++){
| ^
| ;
|
s675605317
|
p04043
|
C
|
#include <stdio.h>
int main (void){
int a[3];
int count5 = 0;
int count7 =0;
for (int i=0, i<=3; i++){
scanf("%d",&a[i]);
if(a[i] = 5) {
count5++;
}else if (a[i] = 7){
count7++;
}
if (count5 == 2 && count7 == 1){
printf("YES");
}else {
printf("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:7:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
7 | for (int i=0, i<=3; i++){
| ^~
main.c:7:26: error: expected ';' before ')' token
7 | for (int i=0, i<=3; i++){
| ^
| ;
main.c:20:3: error: expected declaration or statement at end of input
20 | }
| ^
|
s977484353
|
p04043
|
C++
|
# -*- coding: utf-8 -*-
def main():
# input = "5 7 7"
input = list(map(int, input().split()))
print(input)
counter5 = 0
counter7 = 0
for num in input:
if num == 5:
counter5+=1
if num == 7:
counter7+=1
if counter5 == 2 and counter7 == 1:
print("Yes")
else:
print("No")
if __name__ == "__main__":
main()
|
a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:3:7: error: invalid preprocessing directive #input
3 | # input = "5 7 7"
| ^~~~~
a.cc:2:1: error: 'def' does not name a type
2 | def main():
| ^~~
|
s862207108
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int ans==0;
for(int i=1;i<=3;i++){
int a;std::cin>>a;
if(a==5)ans++;
else if(a==7)ans--;
else{
std::cout<<"NO";
return 0;
}
}
if(ans==1)std::cout<<"YES";
else cout<<"NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:10: error: expected initializer before '==' token
5 | int ans==0;
| ^~
a.cc:8:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
8 | if(a==5)ans++;
| ^~~
| abs
a.cc:9:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
9 | else if(a==7)ans--;
| ^~~
| abs
a.cc:15:6: error: 'ans' was not declared in this scope; did you mean 'abs'?
15 | if(ans==1)std::cout<<"YES";
| ^~~
| abs
|
s862888431
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c; cin >> a >> b >> c;
if(b < c)swap(b,c);
if(a < b)swap(a,b);
if(make_tuple(a,b,c) == {a,b,c})cout << "YES" << endl;
else cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:27: error: expected primary-expression before '{' token
7 | if(make_tuple(a,b,c) == {a,b,c})cout << "YES" << endl;
| ^
a.cc:7:26: error: expected ')' before '{' token
7 | if(make_tuple(a,b,c) == {a,b,c})cout << "YES" << endl;
| ~ ^~
| )
|
s292782612
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c; cin >> a >> b >> c;
if(b < c)swap(b,c);
if(a < b)swap(a,b);
if(make_tuple(a,b,c) == {a,b,c})cout << "YES" << endl;
else cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:7:27: error: expected primary-expression before '{' token
7 | if(make_tuple(a,b,c) == {a,b,c})cout << "YES" << endl;
| ^
a.cc:7:26: error: expected ')' before '{' token
7 | if(make_tuple(a,b,c) == {a,b,c})cout << "YES" << endl;
| ~ ^~
| )
|
s944055350
|
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) {
cout << YES << endl;
}if else (A == 5 && B == 5 && C == 7) {
cout << YES << endl;
}if else (A == 7 && B == 5 && C == 5) {
cout << YES << endl;
}else {
cout << NO << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:11:13: error: 'YES' was not declared in this scope
11 | cout << YES << endl;
| ^~~
a.cc:12:5: error: expected '(' before 'else'
12 | }if else (A == 5 && B == 5 && C == 7) {
| ^~~~
| (
a.cc:14:5: error: expected '(' before 'else'
14 | }if else (A == 7 && B == 5 && C == 5) {
| ^~~~
| (
a.cc:16:2: error: 'else' without a previous 'if'
16 | }else {
| ^~~~
a.cc:17:13: error: 'NO' was not declared in this scope
17 | cout << NO << endl;
| ^~
|
s610326357
|
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) {
cout << YES << endl;
}if else (A == 5 && B == 5 && C == 7) {
cout << YES << endl;
}if else (A == 7 && B == 5 && C == 5) {
cout << YES << endl;
}else {
cout << NO << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:11:13: error: 'YES' was not declared in this scope
11 | cout << YES << endl;
| ^~~
a.cc:12:5: error: expected '(' before 'else'
12 | }if else (A == 5 && B == 5 && C == 7) {
| ^~~~
| (
a.cc:14:5: error: expected '(' before 'else'
14 | }if else (A == 7 && B == 5 && C == 5) {
| ^~~~
| (
a.cc:16:2: error: 'else' without a previous 'if'
16 | }else {
| ^~~~
a.cc:17:13: error: 'NO' was not declared in this scope
17 | cout << NO << endl;
| ^~
|
s336879487
|
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) {
cout << YES << endl;
}if else (A == 5 && B == 5 && C == 7) {
cout << YES << endl;
}if else (A == 7 && B == 5 && C == 5) {
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.
|
s321156432
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a,a+3);
if ( a[0]==5&&a[1]==5&&a[2]=7 ) {
cout << "YES";
} else {
cout << "NO";
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:24: error: lvalue required as left operand of assignment
8 | if ( a[0]==5&&a[1]==5&&a[2]=7 ) {
| ~~~~~~~~~~~~~~~~^~~~~~
|
s858680967
|
p04043
|
C++
|
int main() {
int N, L;
cin >> N >> L;
if (N < 1 || 100 < N) return false;
if (L < 1 || 100 < L) return false;
string* s = new string[N];
for (int i = 0; i < N; i++)
{
//cout << "S" << i << " = ";
cin >> s[i];
}
int c[100];
for (int i = 0; i < N; i++)
{
c[i] = 0;
for (int j = 0; j < N; j++)
{
if (j == i) continue;
if (s[i] > s[j]) c[i]++;
}
}
int count = 0;
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
{
if (count == c[j]) cout << s[j];
}
count++;
}
delete[] s;
return true;
}
|
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin >> N >> L;
| ^~~
a.cc:8:5: error: 'string' was not declared in this scope
8 | string* s = new string[N];
| ^~~~~~
a.cc:8:13: error: 's' was not declared in this scope
8 | string* s = new string[N];
| ^
a.cc:8:21: error: 'string' does not name a type
8 | string* s = new string[N];
| ^~~~~~
a.cc:33:32: error: 'cout' was not declared in this scope; did you mean 'count'?
33 | if (count == c[j]) cout << s[j];
| ^~~~
| count
a.cc:38:5: error: type '<type error>' argument given to 'delete', expected pointer
38 | delete[] s;
| ^~~~~~~~~~
|
s064962155
|
p04043
|
C++
|
if(A != 7 && B != 7 && C != 7)
{
cout << "NO";
}
else
{
if((A == 5 && B == 5) || (A == 5 && C == 5) || (B == 5 && C == 5) )
{
cout << "YES";
}
else
{
cout << "NO";
}
}
|
a.cc:1:1: error: expected unqualified-id before 'if'
1 | if(A != 7 && B != 7 && C != 7)
| ^~
a.cc:5:1: error: expected unqualified-id before 'else'
5 | else
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.