submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s750581904
|
p04043
|
C
|
#include<stdio.h>
int main(void)
{
int A,B,C;
puts("整数を入力してください。");
printf("a:\n"); scanf("%d",&A);
printf("b:\n"); scanf("%d",&B);
printf("c:\n"); scanf("%d",&C);
if(a+b+c==17)
puts("YES");
else
puts("NO");
return 0;
}
|
main.c: In function 'main':
main.c:11:6: error: 'a' undeclared (first use in this function)
11 | if(a+b+c==17)
| ^
main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:8: error: 'b' undeclared (first use in this function)
11 | if(a+b+c==17)
| ^
main.c:11:10: error: 'c' undeclared (first use in this function)
11 | if(a+b+c==17)
| ^
|
s184723936
|
p04043
|
C
|
#include<stdio.h>
int main(void)
{
int A,B,C;
puts("整数を入力してください。");
printf("a:\n"); scanf("%d",&a);
printf("b:\n"); scanf("%d",&b);
printf("c:\n"); scanf("%d",&c);
if(a+b+c==17)
puts("YES");
else
puts("NO");
return 0;
}
|
main.c: In function 'main':
main.c:7:31: error: 'a' undeclared (first use in this function)
7 | printf("a:\n"); scanf("%d",&a);
| ^
main.c:7:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:31: error: 'b' undeclared (first use in this function)
8 | printf("b:\n"); scanf("%d",&b);
| ^
main.c:9:31: error: 'c' undeclared (first use in this function)
9 | printf("c:\n"); scanf("%d",&c);
| ^
|
s076749270
|
p04043
|
C
|
#inlcude<stdio.h>
int main(void)
{
int a,b,c;
puts("整数を入力してください。");
printf("a:\n"); scanf("%d",&a);
printf("b:\n"); scanf("%d",&b);
printf("c:\n"); scanf("%d",&c);
if(a+b+c==17)
puts("YES");
else
puts("NO");
return 0
}
#inlcude<stdio.h>
int main(void)
{
int a,b,c;
puts("整数を入力してください。");
printf("a:\n"); scanf("%d",&a);
printf("b:\n"); scanf("%d",&b);
printf("c:\n"); scanf("%d",&c);
if(a+b+c==17)
puts("YES");
else
puts("NO");
return 0;
}
|
main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
6 | puts("整数を入力してください。");
| ^~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
+++ |+#include <stdio.h>
1 | #inlcude<stdio.h>
main.c:7:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | printf("a:\n"); scanf("%d",&a);
| ^~~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | printf("a:\n"); scanf("%d",&a);
| ^~~~~
main.c:7:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:7:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:16:11: error: expected ';' before '}' token
16 | return 0
| ^
| ;
17 | }
| ~
main.c: At top level:
main.c:18:2: error: invalid preprocessing directive #inlcude; did you mean #include?
18 | #inlcude<stdio.h>
| ^~~~~~~
| include
main.c:19:5: error: redefinition of 'main'
19 | int main(void)
| ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int(void)'
2 | int main(void)
| ^~~~
main.c: In function 'main':
main.c:24:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
24 | printf("a:\n"); scanf("%d",&a);
| ^~~~~~
main.c:24:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
24 | printf("a:\n"); scanf("%d",&a);
| ^~~~~
main.c:24:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
|
s387798943
|
p04043
|
C
|
#include<stdio.h>
int main(void)
{
int a,b,c;
puts("整数を入力してください。");
printf("a:\n"); scanf("%d",&a);
printf("b:\n"); scanf("%d",&b);
printf("c:\n"); scanf("%d",&c);
if(a+b+c==17)
puts("YES");
else
puts("NO");
return 0
}
#inlcude<stdio.h>
int main(void)
{
int a,b,c;
puts("整数を入力してください。");
printf("a:\n"); scanf("%d",&a);
printf("b:\n"); scanf("%d",&b);
printf("c:\n"); scanf("%d",&c);
if(a+b+c==17)
puts("YES");
else
puts("NO");
return 0
}
提出情報
提出日時
|
main.c: In function 'main':
main.c:16:11: error: expected ';' before '}' token
16 | return 0
| ^
| ;
17 | }
| ~
main.c: At top level:
main.c:18:2: error: invalid preprocessing directive #inlcude; did you mean #include?
18 | #inlcude<stdio.h>
| ^~~~~~~
| include
main.c:19:5: error: redefinition of 'main'
19 | int main(void)
| ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int(void)'
2 | int main(void)
| ^~~~
main.c: In function 'main':
main.c:33:11: error: expected ';' before '}' token
33 | return 0
| ^
| ;
34 | }
| ~
main.c: At top level:
main.c:35:1: error: unknown type name '\U000063d0\U000051fa\U000060c5\U00005831'
35 | 提出情報
| ^~~~~~~~
main.c:36:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
36 | 提出日時
| ^~~~~~~~
|
s091092319
|
p04043
|
C
|
#inlcude<stdio.h>
int main(void)
{
int a,b,c;
puts("整数を入力してください。");
printf("a:\n"); scanf("%d",&a);
printf("b:\n"); scanf("%d",&b);
printf("c:\n"); scanf("%d",&c);
if(a+b+c==17)
puts("YES");
else
puts("NO");
return 0
}
|
main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
6 | puts("整数を入力してください。");
| ^~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
+++ |+#include <stdio.h>
1 | #inlcude<stdio.h>
main.c:7:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | printf("a:\n"); scanf("%d",&a);
| ^~~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | printf("a:\n"); scanf("%d",&a);
| ^~~~~
main.c:7:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:7:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:16:11: error: expected ';' before '}' token
16 | return 0
| ^
| ;
17 | }
| ~
|
s719565119
|
p04043
|
Java
|
import java.util.*;
public class Main {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int a = scan.nextInt(), b = scan.nextInt();
String[] ABC = new int[a];
String small = ABC[0];
String output = "";
for (int x : ABC)
{
ABC[x] = scan.next();
}
for (int i = 1; i < ABC.length;i++)
{
for (int x = 1; x < ABC.length;x++)
if (small > ABC[x]) small = ABC[x];
output+=small;
}
System.out.println(small);
}
}
|
Main.java:7: error: incompatible types: int[] cannot be converted to String[]
String[] ABC = new int[a];
^
Main.java:10: error: incompatible types: String cannot be converted to int
for (int x : ABC)
^
Main.java:17: error: bad operand types for binary operator '>'
if (small > ABC[x]) small = ABC[x];
^
first type: String
second type: String
3 errors
|
s690368004
|
p04043
|
Java
|
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int n, l;
n = in.nextInt();
l = in.nextInt();
String[] S = new String[n];
for (int i = 0; i < n; i++) S[i] = in.next();
S.sort();
for (int i = 0; i < n; i++) System.out.print(S[i]);
System.out.println();
}
}
|
Main.java:12: error: cannot find symbol
S.sort();
^
symbol: method sort()
location: variable S of type String[]
1 error
|
s110876614
|
p04043
|
C++
|
import java.util.*;
public class Main {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int[] ABC = new int[3];
int counter1 = 0;
int counter2 = 0;
for (int i = 0; i < 3; i++)
{
ABC[i] = scan.nextInt();
}
for (int a: ABC)
{
if (a == 5)
{
counter1++;
}
if (a == 7)
{
counter2++;
}
}
if (counter1 == 2 && counter2 == 1)
System.out.println("YES");
else
System.out.println("NO");
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s679426709
|
p04043
|
Java
|
import java.util.*;
public class a{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int[] nums = new int[3];
for (int i = 0; i < 3; i++) nums[i] = in.nextInt();
int fives = 0, sevens = 0;
for (int i = 0; i < 3; i++) {
if (nums[i] == 5) fives++;
if (nums[i] == 7) sevens++;
}
if (sevens == 1 && fives == 2) System.out.println("YES");
else System.out.println("NO");
}
}
|
Main.java:3: error: class a is public, should be declared in a file named a.java
public class a{
^
1 error
|
s331787128
|
p04043
|
Java
|
import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args) throws Exception {
hayami saori = new hayami();
int a= 0;
int five = 0;
int seven = 0;
for(int i = 0;i < num.length;i++){
a = saori.saori_hayami();
if(num[i] == 5){
five++;
}
if(num[i] == 7){
seven++;
}
}
if(five == 2 && seven == 1){
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
class hayami implements Closeable {
private final InputStream in = System.in;
private final byte[] hayami = new byte[1024];
private int Hayami = 0;
private int saori = 0;
private boolean HayamiSaori() {
if (Hayami < saori) {
return true;
}else{
Hayami = 0;
try {
saori = in.read(hayami);
} catch (IOException e) {
e.printStackTrace();
}
if (saori <= 0) {
return false;
}
}
return true;
}
private int SaoriHayami() {
if (HayamiSaori()) {
return hayami[Hayami++];
}else{
return -1;
}
}
private static boolean hayami_saori(int hayami) {
return 33 <= hayami && hayami <= 126;
}
public boolean hayamisaori() {
while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();
}
public String nextHayami() {
if (!hayamisaori()) throw new NoSuchElementException();
StringBuilder hayamin = new StringBuilder();
int saori = SaoriHayami();
while(hayami_saori(saori)) {
hayamin.appendCodePoint(saori);
saori = SaoriHayami();
}
return hayamin.toString();
}
public long saorihayami() {//nextLong
if (!hayamisaori()) throw new NoSuchElementException();
long hayami = 0;
boolean misao = false;
int saori = SaoriHayami();
if (saori == '-') {
misao = true;
saori = SaoriHayami();
}
if (saori < '0' || '9' < saori) {
throw new NumberFormatException();
}
while(true){
if ('0' <= saori && saori <= '9') {
hayami *= 10;
hayami += saori - '0';
}else if(saori == -1 || !hayami_saori(saori)){
return misao ? -hayami : hayami;
}else{
throw new NumberFormatException();
}
saori = SaoriHayami();
}
}
public int saori_hayami() {//nextInt
long hayami = saorihayami();
if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();
return (int) hayami;
}
public double Hayamin() { //nextDouble
return Double.parseDouble(nextHayami());
}
public void close() {
try {
in.close();
} catch (IOException e) {
}
}
}
|
Main.java:9: error: cannot find symbol
for(int i = 0;i < num.length;i++){
^
symbol: variable num
location: class Main
Main.java:11: error: cannot find symbol
if(num[i] == 5){
^
symbol: variable num
location: class Main
Main.java:14: error: cannot find symbol
if(num[i] == 7){
^
symbol: variable num
location: class Main
3 errors
|
s736579582
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int arr[3];
cin >> arr[0] >> arr[1] >> arr[2];
sort(arr,arr+3)
cout << ((arr[0] == 5 && arr[1] == 5 && arr[2] == 7)?"YES":"NO");
}
|
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before 'cout'
7 | sort(arr,arr+3)
| ^
| ;
8 | cout << ((arr[0] == 5 && arr[1] == 5 && arr[2] == 7)?"YES":"NO");
| ~~~~
|
s108491830
|
p04043
|
C++
|
#inclide<bits/stdc++.h>
using namespace std;
int main(){
int arr[10];
for(int i=0;i<3;i++)
{
cin>>arr[i]
}
sort(arr,arr+3);
if(arr[0]==5 && arr[1]==5 && arr[2]==7)
{
cout<<"YES"<<endl;
}
else
{
cout<<"NO"<<endl;
}
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #inclide; did you mean #include?
1 | #inclide<bits/stdc++.h>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin>>arr[i]
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #inclide<bits/stdc++.h>
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(arr,arr+3);
| ^~~~
| short
a.cc:12:5: error: 'cout' was not declared in this scope
12 | cout<<"YES"<<endl;
| ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:18: error: 'endl' was not declared in this scope
12 | cout<<"YES"<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #inclide<bits/stdc++.h>
a.cc:16:5: error: 'cout' was not declared in this scope
16 | cout<<"NO"<<endl;
| ^~~~
a.cc:16:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:17: error: 'endl' was not declared in this scope
16 | cout<<"NO"<<endl;
| ^~~~
a.cc:16:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s583398073
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
std::vector<int> v(3);
cin >> v[0] >> v[1] >> v[2];
sort(v.begin(),v.end());
if(v[0] == 5 && v[1] == 5 && v[2] == 7){
cout >> "YES" >> endl;
}else{
cout >> "NO" >> endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
9 | cout >> "YES" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/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:9:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> "YES" >> endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/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:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
In file included from /usr/include/c++/14/istream:1109,
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/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:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]':
a.cc:9:13: required from here
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 |
|
s716679323
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;
int main() {
vector<int> a(n);
cin >> a[0] >> a[1] >> a[2];
sort(all(a));
if (a[0]==5 && a[1]==5 && a[2]==7) cout << "YES" << endl;
else cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:16:17: error: 'n' was not declared in this scope
16 | vector<int> a(n);
| ^
|
s277666287
|
p04043
|
Java
|
import java.util.Scanner;
Scanner scanner = new Scanner (System.in);
int [] a;a=new int [3];boolean dool =false;
for (int i=0;i<3;i++) {
int x = scanner.nextInt();
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
a[i]=x;
}
if (dool==false) {
boolean chool =false;
for (int i=0;i<2;i++) {
if (a[i]>a[i+1]) {System.out.println("NO");chool=true;break;}
}
if (chool==false) System.out.println("YES");
}
|
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
Scanner scanner = new Scanner (System.in);
^
(use --enable-preview to enable unnamed classes)
Main.java:3: error: class, interface, enum, or record expected
int [] a;a=new int [3];boolean dool =false;
^
Main.java:4: error: class, interface, enum, or record expected
for (int i=0;i<3;i++) {
^
Main.java:4: error: class, interface, enum, or record expected
for (int i=0;i<3;i++) {
^
Main.java:4: error: class, interface, enum, or record expected
for (int i=0;i<3;i++) {
^
Main.java:6: error: class, interface, enum, or record expected
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
^
Main.java:6: error: class, interface, enum, or record expected
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
^
Main.java:6: error: class, interface, enum, or record expected
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
^
Main.java:6: error: class, interface, enum, or record expected
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
^
Main.java:8: error: class, interface, enum, or record expected
}
^
Main.java:11: error: class, interface, enum, or record expected
for (int i=0;i<2;i++) {
^
Main.java:11: error: class, interface, enum, or record expected
for (int i=0;i<2;i++) {
^
Main.java:11: error: class, interface, enum, or record expected
for (int i=0;i<2;i++) {
^
Main.java:12: error: class, interface, enum, or record expected
if (a[i]>a[i+1]) {System.out.println("NO");chool=true;break;}
^
Main.java:12: error: class, interface, enum, or record expected
if (a[i]>a[i+1]) {System.out.println("NO");chool=true;break;}
^
Main.java:12: error: class, interface, enum, or record expected
if (a[i]>a[i+1]) {System.out.println("NO");chool=true;break;}
^
Main.java:15: error: class, interface, enum, or record expected
}
^
17 errors
|
s419606617
|
p04043
|
Java
|
import java.util.Scanner;
public class ABC {
public static void main(String[] args) {
Scanner scanner = new Scanner (System.in);
int [] a;a=new int [3];boolean dool =false;
for (int i=0;i<3;i++) {
int x = scanner.nextInt();
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
a[i]=x;
}
if (dool==false) {
boolean chool =false;
for (int i=0;i<2;i++) {
if (a[i]>a[i+1]) {System.out.println("NO");chool=true;break;}
}
if (chool==false) System.out.println("YES");
}
scanner.close();
}
}
|
Main.java:2: error: class ABC is public, should be declared in a file named ABC.java
public class ABC {
^
1 error
|
s684374713
|
p04043
|
Java
|
import java.util.Scanner;
public static void main(String[] args) {
Scanner scanner = new Scanner (System.in);
int [] a;a=new int [3];boolean dool =false;
for (int i=0;i<3;i++) {
int x = scanner.nextInt();
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
a[i]=x;
}
if (dool==false) {
boolean chool =false;
for (int i=0;i<2;i++) {
if (a[i]>a[i+1]) {System.out.println("NO");chool=true;break;}
}
if (chool==false) System.out.println("YES");
}
scanner.close();
}
|
Main.java:2: 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)
1 error
|
s565832240
|
p04043
|
Java
|
import java.util.Scanner;
public static void main(String[] args) {
Scanner scanner = new Scanner (System.in);
int [] a;a=new int [3];boolean dool =false;
for (int i=0;i<3;i++) {
int x = scanner.nextInt();
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
a[i]=x;
}
if (dool==false) {
boolean chool =false;
for (int i=0;i<2;i++) {
if (a[i]>a[i+1]) {System.out.println("NO");chool=true;break;}
}
if (chool==false) System.out.println("YES");
}
scanner.close();
}
}
|
Main.java:2: 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:20: error: class, interface, enum, or record expected
}
^
2 errors
|
s966259633
|
p04043
|
Java
|
import java.util.Scanner;
public class tamrini {
public static void main(String[] args) {
Scanner scanner = new Scanner (System.in);
int [] a;a=new int [3];boolean dool =false;
for (int i=0;i<3;i++) {
int x = scanner.nextInt();
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
a[i]=x;
}
if (dool==false) {
boolean chool =false;
for (int i=0;i<2;i++) {
if (a[i]>a[i+1]) {System.out.println("NO");chool=true;break;}
}
if (chool==false) System.out.println("YES");
}
scanner.close();
}
}
|
Main.java:2: error: class tamrini is public, should be declared in a file named tamrini.java
public class tamrini {
^
1 error
|
s985895214
|
p04043
|
Java
|
import java.util.Scanner;
public class tamrini {
public static void main(String[] args) {
Scanner scanner = new Scanner (System.in);
int [] a;a=new int [3];boolean dool =false;
for (int i=0;i<3;i++) {
int x = scanner.nextInt();
if (x!=5&&x!=7) {System.out.println("NO");dool=true; break;}
a[i]=x;
}
if (dool==false) {
boolean chool =false;
for (int i=0;i<2;i++) {
if (a[i]>a[i+1]) {System.out.println("NO");chool=true;break;}
}
if (chool==false) System.out.println("YES");
}
scanner.close();
}
}
|
Main.java:2: error: class tamrini is public, should be declared in a file named tamrini.java
public class tamrini {
^
1 error
|
s680313898
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
int c5=c7=0;
cin>>a>>b>>c;
if(a==5)
{
c5++;
}
if(a==7)
{
c7++;
}
if(b==5)
{
c5++;
}
if(b==7)
{
c7++;
}
if(c==5)
{
c5++;
}
if(c==7)
{
c7++;
}
if(c5==2 && c7==1)
{
cout<<"YES";
}
else
{
cout<<"NO";
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:10: error: 'c7' was not declared in this scope; did you mean 'c5'?
6 | int c5=c7=0;
| ^~
| c5
|
s182881674
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
int c5=c7=0;
cin>>a>>b>>c;
if(a==5)
{
c5++;
}
if(a==7)
{
c7++;
}
if(b==5)
{
c5++;
}
if(b==7)
{
c7++;
}
if(c==5)
{
c5++;
}
if(c==7)
{
c7++;
}
if(c5==2 && c7==1)
{
cout<<"YES";
}
else
{
cout<<"NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:10: error: 'c7' was not declared in this scope; did you mean 'c5'?
6 | int c5=c7=0;
| ^~
| c5
a.cc:40:2: error: expected '}' at end of input
40 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s891386336
|
p04043
|
C++
|
#include<iostream>
#include <string>
using namespace std;
int main()
{
int[3] a;
int b;
bool ans=false;
for(int i=0;i<3;i++){
cin >> a[i];//入力
if(a[i]==7){
b++;
}
}
if(b==2){
cout << "NO"
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:7: error: expected identifier before numeric constant
6 | int[3] a;
| ^
a.cc:6:7: error: expected ']' before numeric constant
6 | int[3] a;
| ^
| ]
a.cc:6:6: error: structured binding declaration cannot have type 'int'
6 | int[3] a;
| ^
a.cc:6:6: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:6:6: error: empty structured binding declaration
a.cc:6:10: error: expected initializer before 'a'
6 | int[3] a;
| ^
a.cc:10:10: error: 'a' was not declared in this scope
10 | cin >> a[i];//入力
| ^
a.cc:16:15: error: expected ';' before '}' token
16 | cout << "NO"
| ^
| ;
17 | }
| ~
|
s083302620
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin A >> B >> C;
if (A.size() == 5 || B.size() == 7 || C.size() == 5){
cout << "YES" << endl;
}
else if (A.size() == 7 || B.size() == 5 || C.size() == 5){
cout << "YES"<< endl;
}
else if (A.size() == 5 || B.size() == 5 || C.size() == 7){
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'A'
6 | cin A >> B >> C;
| ^~
| ;
|
s455142387
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin A << B << C;
if (A.size() == 5 || B.size() == 7 || C.size() == 5){
cout << "YES" << endl;
}
else if (A.size() == 7 || B.size() == 5 || C.size() == 5){
cout << "YES"<< endl;
}
else if (A.size() == 5 || B.size() == 5 || C.size() == 7){
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'A'
6 | cin A << B << C;
| ^~
| ;
|
s599261753
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin A << B << C;
if (A.size == 5 || B.size == 7 || C.size == 5){
cout << "YES" << endl;
}
else if (A.size == 7 || B.size == 5 || C.size == 5){
cout << "YES"<< endl;
}
else if (A.size == 5 || B.size == 5 || C.size == 7){
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'A'
6 | cin A << B << C;
| ^~
| ;
a.cc:8:9: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
8 | if (A.size == 5 || B.size == 7 || C.size == 5){
| ~~^~~~
| ()
a.cc:8:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
8 | if (A.size == 5 || B.size == 7 || C.size == 5){
| ~~^~~~
| ()
a.cc:8:39: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
8 | if (A.size == 5 || B.size == 7 || C.size == 5){
| ~~^~~~
| ()
a.cc:11:14: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
11 | else if (A.size == 7 || B.size == 5 || C.size == 5){
| ~~^~~~
| ()
a.cc:11:29: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
11 | else if (A.size == 7 || B.size == 5 || C.size == 5){
| ~~^~~~
| ()
a.cc:11:44: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
11 | else if (A.size == 7 || B.size == 5 || C.size == 5){
| ~~^~~~
| ()
a.cc:14:14: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
14 | else if (A.size == 5 || B.size == 5 || C.size == 7){
| ~~^~~~
| ()
a.cc:14:29: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
14 | else if (A.size == 5 || B.size == 5 || C.size == 7){
| ~~^~~~
| ()
a.cc:14:44: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
14 | else if (A.size == 5 || B.size == 5 || C.size == 7){
| ~~^~~~
| ()
|
s512790945
|
p04043
|
C++
|
#include<bits/stdhc++.h>
using namespace std;
int main(){
string A, B, C;
cin A << B << C;
if (A.size == 5 || B.size == 7 || C.size == 5){
cout << "YES" << endl;
}
else if (A.size == 7 || B.size == 5 || C.size == 5){
cout << "YES"<< endl;
}
else if (A.size == 5 || B.size == 5 || C.size == 7){
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
|
a.cc:1:9: fatal error: bits/stdhc++.h: No such file or directory
1 | #include<bits/stdhc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s163081716
|
p04043
|
C++
|
include<bits/stdhc++.h>
using namespace std;
int main(){
string A, B, C;
cin A << B << C;
if (A.size == 5 || B.size == 7 || C.size == 5){
cout << "YES" << endl;
}
else if (A.size == 7 || B.size == 5 || C.size == 5){
cout << "YES"<< endl;
}
else if (A.size == 5 || B.size == 5 || C.size == 7){
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
|
a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdhc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
5 | string A, B, C;
| ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin A << B << C;
| ^~~
a.cc:8:7: error: 'A' was not declared in this scope
8 | if (A.size == 5 || B.size == 7 || C.size == 5){
| ^
a.cc:8:22: error: 'B' was not declared in this scope
8 | if (A.size == 5 || B.size == 7 || C.size == 5){
| ^
a.cc:8:37: error: 'C' was not declared in this scope
8 | if (A.size == 5 || B.size == 7 || C.size == 5){
| ^
a.cc:9:5: error: 'cout' was not declared in this scope
9 | cout << "YES" << endl;
| ^~~~
a.cc:9:22: error: 'endl' was not declared in this scope
9 | cout << "YES" << endl;
| ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope
12 | cout << "YES"<< endl;
| ^~~~
a.cc:12:21: error: 'endl' was not declared in this scope
12 | cout << "YES"<< endl;
| ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope
15 | cout << "YES" << endl;
| ^~~~
a.cc:15:22: error: 'endl' was not declared in this scope
15 | cout << "YES" << endl;
| ^~~~
a.cc:18:5: error: 'cout' was not declared in this scope
18 | cout << "NO" << endl;
| ^~~~
a.cc:18:21: error: 'endl' was not declared in this scope
18 | cout << "NO" << endl;
| ^~~~
|
s095271304
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main()
{
int count5 = 2;
int count7 = 1;
for(i=0; i++; i<3){
int N;
cin >> N;
if(N == 5){
count5--;
}else if(N == 7){
count7--;
}
}
if(count5 == 0 && count7 == 0){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
8 | for(i=0; i++; i<3){
| ^
|
s760603840
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int A,B,C;
int five,seven;
cin >> A >> B >> C;
if(A == 5) {
five++;
}
if(B == 5) {
five++;
}
if(C == 5) {
five++;
}
if(A == 7 || B == 7 || C == 7) {
seven=1;
}
if(five == 2 && seven == 1) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:25:4: error: expected '}' at end of input
25 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s778124180
|
p04043
|
C++
|
#include <iostream>
#include <string>
using namespace std;
int main(void){
int A,B,C
cin >> A >> B >> C;
if((A == 5 && B == 7 && C == 5) || (A == 7 && B == 5 && C == 5) || (A == 5 && B == 5 && C == 7)){
cout << "yes¥n";
}else{
cout << "no¥n";
}
}
|
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'cin'
7 | cin >> A >> B >> C;
| ^~~
a.cc:8:33: error: 'C' was not declared in this scope
8 | if((A == 5 && B == 7 && C == 5) || (A == 7 && B == 5 && C == 5) || (A == 5 && B == 5 && C == 7)){
| ^
|
s510132161
|
p04043
|
C
|
#include(stdio.h)
int main(){
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if(A==5 && B==5 && C==7){
printf("YES");}
else if(A==5 && B==7 && C==5){
printf("YES");}
else if(A==7 && B==5 && C==5){
printf("YES");}
else{
printf("NO");}
return 0;
}
|
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include(stdio.h)
| ^
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%d %d %d", &A, &B, &C);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #include(stdio.h)
main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
5 | scanf("%d %d %d", &A, &B, &C);
| ^~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | printf("YES");}
| ^~~~~~
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
9 | printf("YES");}
| ^~~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
11 | printf("YES");}
| ^~~~~~
main.c:11:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
13 | printf("NO");}
| ^~~~~~
main.c:13:5: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s675615783
|
p04043
|
C
|
#include<stdio.h>
#include<string.h>
int main(){
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if(A=5 && B=5 && C=7){
printf("YES");}
else if(A=5 && B=7 && C=5){
printf("YES");}
else if(A=7 && B=5 && C=5){
printf("YES");}
else{
printf("NO");}
return 0;
}
|
main.c: In function 'main':
main.c:7:21: error: lvalue required as left operand of assignment
7 | if(A=5 && B=5 && C=7){
| ^
main.c:9:26: error: lvalue required as left operand of assignment
9 | else if(A=5 && B=7 && C=5){
| ^
main.c:11:26: error: lvalue required as left operand of assignment
11 | else if(A=7 && B=5 && C=5){
| ^
|
s720469502
|
p04043
|
Java
|
import java.util.*;
class Main
{
public static void main(String[] args)
{
int[] a=new int[8];
for(int i=0;i<3;i++)
{
int x=sc.nextInt();
a[x]++;
}
if(a[5]==2 && a[7]==1)
{
System.out.println("YES");
}
else
{
System.out.println("NO");
}
}
}
|
Main.java:9: error: cannot find symbol
int x=sc.nextInt();
^
symbol: variable sc
location: class Main
1 error
|
s958490882
|
p04043
|
C++
|
#include<iostream>
#include<string>
using namespace std;
bool Smaller(char a[], int a_length, char b[], int b_length){
int i;
int min_length = a_length < b_length ? a_length : b_length;
for(i=0; i<min_length; i++){
if(a[i] < b[i])return true;
else if(a[i] > b[i]) return false;
}
return false;
}
void Swap(char a[], char b[], int length){
int i;
for(i=0;i<length;i++){
char c;
c = a[i];
a[i] = b[i];
b[i] = c;
}
return;
}
int main(){
int string_length,string_num;
cin >> string_length >> string_num;
char strContainer[string_num][string_length];
int i;
for(i=0;i<string_num;i++){
cin >> strContainer[i];
}
//今回はバブルソートで
bool sorting = true;
while(sorting){
sorting=false;
for(i=0;i<sorting_num-1;i++){
if(!Smaller(strContainer[i], string_length, strContainer[i+1], string_length){
Swap(strContainer[i], strContainer[i+1], string_length);
sorting=true;
}
}
char result[] = "";
for(i=0; i < string_num;i++){
cout << strContainer[i];
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:42:15: error: 'sorting_num' was not declared in this scope; did you mean 'string_num'?
42 | for(i=0;i<sorting_num-1;i++){
| ^~~~~~~~~~~
| string_num
a.cc:43:84: error: expected ')' before '{' token
43 | if(!Smaller(strContainer[i], string_length, strContainer[i+1], string_length){
| ~ ^
| )
a.cc:47:5: error: expected primary-expression before '}' token
47 | }
| ^
|
s161277649
|
p04043
|
C++
|
#include<iostream>
#include<string>
using namespace std;
bool Smaller(char a[], int a_length, char b[], int b_length){
int i;
int min_length = a_length < b_length ? a_length : b_length;
for(i=0; i<min_length; i++){
if(a[i] < b[i])return true;
else if(a[i] > b[i]) return false;
}
return false;
}
void Swap(char a[], char b[], int length){
int i;
for(i=0;i<length;i++){
char c;
c = a[i];
a[i] = b[i];
b[i] = c;
}
return;
}
int main(){
cin >> string_length >> string_num;
char strContainer[string_num][string_length];
int i;
for(i=0;i<string_num;i++){
cin >> strContainer[i];
}
//今回はバブルソートで
bool sorting = true;
while(sorting){
sorting=false;
for(i=0;i<sorting_num-1;i++){
if(!Smaller(strContainer[i], string_length, strContainer[i+1], string_length){
Swap(strContainer[i], strContainer[i+1], string_length);
sorting=true;
}
}
char result[] = "";
for(i=0; i < string_num;i++){
cout << strContainer[i];
}
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:27:10: error: 'string_length' was not declared in this scope
27 | cin >> string_length >> string_num;
| ^~~~~~~~~~~~~
a.cc:27:27: error: 'string_num' was not declared in this scope
27 | cin >> string_length >> string_num;
| ^~~~~~~~~~
a.cc:34:12: error: 'strContainer' was not declared in this scope
34 | cin >> strContainer[i];
| ^~~~~~~~~~~~
a.cc:41:15: error: 'sorting_num' was not declared in this scope; did you mean 'sorting'?
41 | for(i=0;i<sorting_num-1;i++){
| ^~~~~~~~~~~
| sorting
a.cc:42:19: error: 'strContainer' was not declared in this scope
42 | if(!Smaller(strContainer[i], string_length, strContainer[i+1], string_length){
| ^~~~~~~~~~~~
a.cc:42:84: error: expected ')' before '{' token
42 | if(!Smaller(strContainer[i], string_length, strContainer[i+1], string_length){
| ~ ^
| )
a.cc:46:5: error: expected primary-expression before '}' token
46 | }
| ^
a.cc:51:15: error: 'strContainer' was not declared in this scope
51 | cout << strContainer[i];
| ^~~~~~~~~~~~
|
s897436331
|
p04043
|
Java
|
#include <iostream>
using namespace std;
int main(){
int five = 0 , seven = 0 , n;
for(int i = 0 ; i< 3 ; i++)
{
cin >> n;
if(n == 5)
{
five++;
}
else if(n==7)
{
seven++;
}
}
if(seven == 1 && five ==2)
{
cout << "YES\n";
}
else{
cout << "NO\n";
}
}
|
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
^
Main.java:9: error: not a statement
cin >> n;
^
Main.java:22: error: not a statement
cout << "YES\n";
^
Main.java:25: error: not a statement
cout << "NO\n";
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
(use --enable-preview to enable unnamed classes)
6 errors
|
s187344749
|
p04043
|
C++
|
# -*- coding: utf-8 -*-
a = list(map(int,input().split()))
if sum(a)==17:
print("YES")
else:
print("NO")
|
a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:2:1: error: 'a' does not name a type
2 | a = list(map(int,input().split()))
| ^
|
s313594224
|
p04043
|
Java
|
import java.util.Scanner;
public class ProblemA
{
public static void main ( String[] args )
{
Scanner sc = new Scanner ( System.in );
int n, five = 0, seven = 0;
for ( int i = 0; i < 3; i++ )
{
n = sc.nextInt ();
if ( n == 5 )
{
five++;
}
else if ( n == 7 )
{
seven++;
}
}
if ( five == 2 && seven == 1 )
{
System.out.println ( "YES" );
}
else
{
System.out.println ( "NO" );
}
}
}
|
Main.java:3: error: class ProblemA is public, should be declared in a file named ProblemA.java
public class ProblemA
^
1 error
|
s412897377
|
p04043
|
Java
|
import java.util.Scanner;
public class ProblemA
{
public static void main ( String[] args )
{
Scanner sc = new Scanner ( System.in );
int n, five = 0, seven = 0;
for ( int i = 0; i < 3; i++ )
{
n = sc.nextInt ();
if ( n == 5 )
{
five++;
}
else if ( n == 7 )
{
seven++;
}
}
if ( five == 2 && seven == 1 )
{
System.out.println ( "YES" );
}
else
{
System.out.println ( "NO" );
}
}
}
|
Main.java:3: error: class ProblemA is public, should be declared in a file named ProblemA.java
public class ProblemA
^
1 error
|
s991370238
|
p04043
|
Java
|
import java.util.Scanner;
public class ProblemA
{
public static void main ( String[] args )
{
Scanner sc = new Scanner ( System.in );
int n, five = 0, seven = 0;
for ( int i = 0; i < 3; i++ )
{
n = sc.nextInt ();
if ( n == 5 )
{
five++;
}
else if ( n == 7 )
{
seven++;
}
}
if ( five == 2 && seven == 1 )
{
System.out.println ( "YES" );
}
else
{
System.out.println ( "NO" );
}
}
}
|
Main.java:3: error: class ProblemA is public, should be declared in a file named ProblemA.java
public class ProblemA
^
1 error
|
s424937131
|
p04043
|
Java
|
import java.util.Scanner;
public class ProblemA
{
public static void main ( String[] args )
{
Scanner sc = new Scanner ( System.in );
int n, five = 0, seven = 0;
for ( int i = 0; i < 3; i++ )
{
n = sc.nextInt ();
if ( n == 5 )
{
five++;
}
else if ( n == 7 )
{
seven++;
}
}
if ( five == 2 && seven == 1 )
{
System.out.println ( "YES" );
}
else
{
System.out.println ( "NO" );
}
}
}
|
Main.java:3: error: class ProblemA is public, should be declared in a file named ProblemA.java
public class ProblemA
^
1 error
|
s415223120
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int string_length;
int string_num;
std::cin >> string_length >> string_num;
std::vector<std::string> strings;
int i;
for(i=0; i < string_num; i++){
std::string input;
std::cin >> input;
strings.push_back(input);
}
std::string result;
while(strings.size() > 0){
std::string minimum;
int minimum_pos;
minimum = strings[0];
minimum_pos = 0;
for(i=0; i<strings.size(); i++){
if(strings[i].compare(minimum) < 0){
minimum = strings[i];
minimum_pos = i;
}
}
result = result + minimum;
strings.erase(strings.begin() + minimum_pos);
}
std::cout << result << std::endl;
return 0;
|
a.cc: In function 'int main()':
a.cc:41:12: error: expected '}' at end of input
41 | return 0;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s358644572
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int string_length;
int string_num;
std::cin >> string_length >> string_num;
std::vector<std::string> strings;
int i;
for(i=0; i < string_num; i++){
std::string input;
std::cin >> input;
strings.push_back(input);
}
std::string result;
while(strings.size() > 0){
std::string minimum;
int minimum_pos;
minimum = strings[0];
minimum_pos = 0;
for(i=0; i<strings.size(); i++){
if(strings[i].compare(minimum) < 0){
minimum = strings[i];
minimum_pos = i;
}
}
result = result + minimum;
strings.erase(minimum);
}
std::cout << result;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:36:22: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(std::string&)'
36 | strings.erase(minimum);
| ~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1536 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
1536 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1564 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate expects 2 arguments, 1 provided
|
s012849733
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int string_length;
int string_num;
std::cin >> string_length >> string_num;
std::vector<std::string> strings;
int i;
for(i=0; i < string_num; i++){
std::string input;
std::cin >> input;
strings.push_back(input);
}
std::string result;
while(strings.size() > 0){
std::string minimum;
int minimum_pos;
minimum = strings[0];
minimum_pos = 0;
for(i=0; i<strings.size(); i++){
if(strings[i].compare(minimum) < 0){
minimum = strings[i];
minimum_pos = i;
}
}
result = result + minimum;
strings.erase(minimum_pos);
}
std::cout << result;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:36:22: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(int&)'
36 | strings.erase(minimum_pos);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1536 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note: no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
1536 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1564 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate expects 2 arguments, 1 provided
|
s751782537
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int string_length;
int string_num;
std::cin >> string_length >> string_num;
std::vector<std::string> strings;
int i;
for(i=0; i < string_num; i++){
std::string input;
std::cin >> input;
strings.push_back(input);
}
std::string result;
while(strings.size > 0){
std::string minimum;
int minimum_pos;
minimum = strings[0];
minimum_pos = 0;
for(i=0; i<strings.size; i++){
if(strings[i].compare(minimum) < 0){
minimum = strings[i];
minimum_pos = i;
}
}
result = result + minimum;
strings.erase(minimum_pos);
}
std::cout << result;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:22:17: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
22 | while(strings.size > 0){
| ~~~~~~~~^~~~
| ()
a.cc:29:24: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
29 | for(i=0; i<strings.size; i++){
| ~~~~~~~~^~~~
| ()
a.cc:36:22: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(int&)'
36 | strings.erase(minimum_pos);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1536 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note: no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
1536 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1564 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate expects 2 arguments, 1 provided
|
s899704819
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int string_length;
int string_num;
std::cin >> string_length >> string_num;
std::vector<std::string> strings;
int i;
for(i=0; i < string_num; i++){
string input;
std::cin >> input;
strings.push_back(input);
}
std::string result;
while(strings.size > 0){
std::string minimum;
int minimum_pos;
minimum = strings[0];
minimum_pos = 0;
for(i=0; i<strings.size; i++){
if(strings[i].compare(minimum) < 0){
minimum = strings[i];
minimum_pos = i;
}
}
result = result + minimum;
strings.erase(minimum_pos);
}
std::cout << result;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:5: error: 'string' was not declared in this scope
15 | string input;
| ^~~~~~
a.cc:15:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:16:17: error: 'input' was not declared in this scope; did you mean 'int'?
16 | std::cin >> input;
| ^~~~~
| int
a.cc:22:17: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
22 | while(strings.size > 0){
| ~~~~~~~~^~~~
| ()
a.cc:29:24: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
29 | for(i=0; i<strings.size; i++){
| ~~~~~~~~^~~~
| ()
a.cc:36:22: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(int&)'
36 | strings.erase(minimum_pos);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1536 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note: no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
1536 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1564 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate expects 2 arguments, 1 provided
|
s896613583
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int string_length;
int string_num;
std::cin >> string_length >> string_num;
std::vector<std::string> strings;
int i;
for(i=0; i < string_num; i++){
string input;
cin >> input;
strings.push_back(input);
}
std::string result;
while(strings.size > 0){
std::string minimum;
int minimum_pos;
minimum = strings[0];
minimum_pos = 0;
for(i=0; i<strings.size; i++){
if(strings[i].compare(minimum) < 0){
minimum = strings[i];
minimum_pos = i;
}
}
result = result + minimum;
strings.erase(minimum_pos);
}
std::cout << result;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:5: error: 'string' was not declared in this scope
15 | string input;
| ^~~~~~
a.cc:15:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:16:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
16 | cin >> input;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:16:12: error: 'input' was not declared in this scope; did you mean 'int'?
16 | cin >> input;
| ^~~~~
| int
a.cc:22:17: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
22 | while(strings.size > 0){
| ~~~~~~~~^~~~
| ()
a.cc:29:24: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
29 | for(i=0; i<strings.size; i++){
| ~~~~~~~~^~~~
| ()
a.cc:36:22: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(int&)'
36 | strings.erase(minimum_pos);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1536 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note: no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
1536 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
1564 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate expects 2 arguments, 1 provided
|
s140418442
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int string_length;
int string_num;
std::cin >> string_length >> string_num;
std::vector<string> strings;
int i;
for(i=0; i < string_num; i++){
string input;
cin >> input;
strings.push_back(input);
}
string result;
while(strings.size > 0){
string minimum;
int minimum_pos;
minimum = strings[0];
minimum_pos = 0;
for(i=0; i<strings.size; i++){
if(strings[i].compare(minimum) < 0){
minimum = strings[i];
minimum_pos = i;
}
}
result = result + minimum;
strings.erase(minimum_pos);
}
std::cout << result;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:15: error: 'string' was not declared in this scope
11 | std::vector<string> strings;
| ^~~~~~
a.cc:11:15: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:11:21: error: template argument 1 is invalid
11 | std::vector<string> strings;
| ^
a.cc:11:21: error: template argument 2 is invalid
a.cc:15:11: error: expected ';' before 'input'
15 | string input;
| ^~~~~~
| ;
a.cc:16:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
16 | cin >> input;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:16:12: error: 'input' was not declared in this scope; did you mean 'int'?
16 | cin >> input;
| ^~~~~
| int
a.cc:17:13: error: request for member 'push_back' in 'strings', which is of non-class type 'int'
17 | strings.push_back(input);
| ^~~~~~~~~
a.cc:21:9: error: expected ';' before 'result'
21 | string result;
| ^~~~~~~
| ;
a.cc:23:17: error: request for member 'size' in 'strings', which is of non-class type 'int'
23 | while(strings.size > 0){
| ^~~~
a.cc:24:11: error: expected ';' before 'minimum'
24 | string minimum;
| ^~~~~~~~
| ;
a.cc:27:9: error: 'minimum' was not declared in this scope; did you mean 'minimum_pos'?
27 | minimum = strings[0];
| ^~~~~~~
| minimum_pos
a.cc:27:26: error: invalid types 'int[int]' for array subscript
27 | minimum = strings[0];
| ^
a.cc:30:24: error: request for member 'size' in 'strings', which is of non-class type 'int'
30 | for(i=0; i<strings.size; i++){
| ^~~~
a.cc:31:17: error: invalid types 'int[int]' for array subscript
31 | if(strings[i].compare(minimum) < 0){
| ^
a.cc:32:26: error: invalid types 'int[int]' for array subscript
32 | minimum = strings[i];
| ^
a.cc:36:5: error: 'result' was not declared in this scope
36 | result = result + minimum;
| ^~~~~~
a.cc:37:17: error: request for member 'erase' in 'strings', which is of non-class type 'int'
37 | strings.erase(minimum_pos);
| ^~~~~
a.cc:40:16: error: 'result' was not declared in this scope
40 | std::cout << result;
| ^~~~~~
|
s619127492
|
p04043
|
C++
|
#include<iostream>
#include<string>
int main(){
int string_length;
int string_num;
std::cin >> string_length >> string_num;
std::vector<string> strings;
int i;
for(i=0; i < string_num; i++){
string input;
cin >> input;
strings.push_back(input);
}
string result;
while(strings.size > 0){
string minimum;
int minimum_pos;
minimum = strings[0];
minimum_pos = 0;
for(i=0; i<strings.size; i++){
if(strings[i].compare(minimum) < 0){
minimum = strings[i];
minimum_pos = i;
}
}
result = result + minimum;
strings.erase(minimum_pos);
}
std::cout << result;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:8: error: 'vector' is not a member of 'std'
10 | std::vector<string> strings;
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
2 | #include<string>
a.cc:10:15: error: 'string' was not declared in this scope
10 | std::vector<string> strings;
| ^~~~~~
a.cc:10:15: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:10:23: error: 'strings' was not declared in this scope; did you mean 'stdin'?
10 | std::vector<string> strings;
| ^~~~~~~
| stdin
a.cc:14:11: error: expected ';' before 'input'
14 | string input;
| ^~~~~~
| ;
a.cc:15:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
15 | cin >> input;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:15:12: error: 'input' was not declared in this scope; did you mean 'int'?
15 | cin >> input;
| ^~~~~
| int
a.cc:20:9: error: expected ';' before 'result'
20 | string result;
| ^~~~~~~
| ;
a.cc:23:11: error: expected ';' before 'minimum'
23 | string minimum;
| ^~~~~~~~
| ;
a.cc:26:9: error: 'minimum' was not declared in this scope; did you mean 'minimum_pos'?
26 | minimum = strings[0];
| ^~~~~~~
| minimum_pos
a.cc:35:5: error: 'result' was not declared in this scope
35 | result = result + minimum;
| ^~~~~~
a.cc:39:16: error: 'result' was not declared in this scope
39 | std::cout << result;
| ^~~~~~
|
s765347931
|
p04043
|
C++
|
#include<iostream>
int main(){
int A,B,C;
cin >> A >> B >> C;
int five = 0;
int seven = 0;
if(A==5)five++;
if(B==5)five++;
if(C==5)five++;
if(A==7)seven++;
if(B==7)seven++;
if(C==7)seven++;
if(five==2 && seven==1)std::cout << "YES";
else std::cout << "NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> A >> B >> C;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
|
s114304195
|
p04043
|
C++
|
#include<iostream>
int main(){
int A,B,C;
cin >> A >> B >> C;
int five = 0;
int seven = 0;
if(A==5)five++;
if(B==5)five++;
if(C==5)five++;
if(A==7)seven++;
if(B==7)seven++;
if(C==7)seven++;
if(five==2 && seven==1)cout << "YES";
else cout << "NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> A >> B >> C;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:18:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
18 | if(five==2 && seven==1)cout << "YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:19:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
19 | else cout << "NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s602725660
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int A,B,C;
int five,seven;
std::cin >> A >> B >> C;
std::vector<int> inputs;
inputs.push_back(A);
inputs.push_back(B);
inputs.push_back(C);
five = std::count(inputs.begin(),inputs.end(),5);
seven = std::count(inputs.begin(),inputs.end(),7);
if(five == 2 && seven == 1)std::cout << "YES";
else std::cout << "NO";
}
|
a.cc: In function 'int main()':
a.cc:17:15: error: 'count' is not a member of 'std'; did you mean 'cout'?
17 | five = std::count(inputs.begin(),inputs.end(),5);
| ^~~~~
| cout
a.cc:18:16: error: 'count' is not a member of 'std'; did you mean 'cout'?
18 | seven = std::count(inputs.begin(),inputs.end(),7);
| ^~~~~
| cout
|
s335017405
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int A,B,C;
int five,seven;
std::cin >> A >> B >> C;
std::vector<int> inputs;
inputs.push_back(A);
inputs.push_back(B);
inputs.push_back(C);
if(inputs.count(5) == 2 && inputs.count(7) == 1)std::cout << "YES";
else std::cout << "NO";
}
|
a.cc: In function 'int main()':
a.cc:17:13: error: 'class std::vector<int>' has no member named 'count'
17 | if(inputs.count(5) == 2 && inputs.count(7) == 1)std::cout << "YES";
| ^~~~~
a.cc:17:37: error: 'class std::vector<int>' has no member named 'count'
17 | if(inputs.count(5) == 2 && inputs.count(7) == 1)std::cout << "YES";
| ^~~~~
|
s365951763
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int A,B,C;
int five,seven;
std::cin >> A >> B >> C;
std::vector<int> inputs;
inputs.push_back(A);
inputs.push_back(B);
inputs.push_back(C);
five = std::count(inputs.begin(),inputs.end(),5);
seven = std::count(inputs.begin(),inputs.end(),7);
if(five == 2 && seven == 1)std::cout << "YES";
else std::cout << "NO";
}
|
a.cc: In function 'int main()':
a.cc:17:15: error: 'count' is not a member of 'std'; did you mean 'cout'?
17 | five = std::count(inputs.begin(),inputs.end(),5);
| ^~~~~
| cout
a.cc:18:16: error: 'count' is not a member of 'std'; did you mean 'cout'?
18 | seven = std::count(inputs.begin(),inputs.end(),7);
| ^~~~~
| cout
|
s471860572
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int A,B,C;
std::cin >> A >> B >> C;
std::vector<int> inputs;
inputs.push_back(A);
inputs.push_back(B);
inputs.push_back(C);
five = std::count(inputs.begin(),inputs.end(),5);
seven = std::count(inputs.begin(),inputs.end(),7);
if(five == 2 && seven == 1)std::cout << "YES";
else std::cout << "NO";
}
|
a.cc: In function 'int main()':
a.cc:16:3: error: 'five' was not declared in this scope
16 | five = std::count(inputs.begin(),inputs.end(),5);
| ^~~~
a.cc:16:15: error: 'count' is not a member of 'std'; did you mean 'cout'?
16 | five = std::count(inputs.begin(),inputs.end(),5);
| ^~~~~
| cout
a.cc:17:3: error: 'seven' was not declared in this scope; did you mean 'setenv'?
17 | seven = std::count(inputs.begin(),inputs.end(),7);
| ^~~~~
| setenv
a.cc:17:16: error: 'count' is not a member of 'std'; did you mean 'cout'?
17 | seven = std::count(inputs.begin(),inputs.end(),7);
| ^~~~~
| cout
|
s321490421
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
int A,B,C;
cin >> A >> B >> C;
vector<int> inputs;
inputs.push_back(A);
inputs.push_back(B);
inputs.push_back(C);
five = std::count(inputs.begin(),inputs.end(),5);
seven = std::count(inputs.begin(),inputs.end(),7);
if(five == 2 && seven == 1)cout << "YES";
else cout << "NO";
}
|
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> A >> B >> C;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:3: error: 'vector' was not declared in this scope
10 | vector<int> inputs;
| ^~~~~~
a.cc:10:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:428:11: note: 'std::vector'
428 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/usr/include/c++/14/vector:93:13: note: 'std::pmr::vector'
93 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
a.cc:10:10: error: expected primary-expression before 'int'
10 | vector<int> inputs;
| ^~~
a.cc:12:3: error: 'inputs' was not declared in this scope; did you mean 'puts'?
12 | inputs.push_back(A);
| ^~~~~~
| puts
a.cc:16:3: error: 'five' was not declared in this scope
16 | five = std::count(inputs.begin(),inputs.end(),5);
| ^~~~
a.cc:16:15: error: 'count' is not a member of 'std'; did you mean 'cout'?
16 | five = std::count(inputs.begin(),inputs.end(),5);
| ^~~~~
| cout
a.cc:17:3: error: 'seven' was not declared in this scope; did you mean 'setenv'?
17 | seven = std::count(inputs.begin(),inputs.end(),7);
| ^~~~~
| setenv
a.cc:17:16: error: 'count' is not a member of 'std'; did you mean 'cout'?
17 | seven = std::count(inputs.begin(),inputs.end(),7);
| ^~~~~
| cout
a.cc:19:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
19 | if(five == 2 && seven == 1)cout << "YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | else cout << "NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s232929404
|
p04043
|
C++
|
#include<iostream>
#include<string>
#include<vector>
int main(){
cin >> A >> B >> C;
vector<int> inputs;
inputs.push_back(A);
inputs.push_back(B);
inputs.push_back(C);
five = std::count(inputs.begin(),inputs.end(),5);
seven = std::count(inputs.begin(),inputs.end(),7);
if(five == 2 && seven == 1)cout << "YES";
else cout << "NO";
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> A >> B >> C;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:6:10: error: 'A' was not declared in this scope
6 | cin >> A >> B >> C;
| ^
a.cc:6:15: error: 'B' was not declared in this scope
6 | cin >> A >> B >> C;
| ^
a.cc:6:20: error: 'C' was not declared in this scope
6 | cin >> A >> B >> C;
| ^
a.cc:8:3: error: 'vector' was not declared in this scope
8 | vector<int> inputs;
| ^~~~~~
a.cc:8:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:428:11: note: 'std::vector'
428 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/usr/include/c++/14/vector:93:13: note: 'std::pmr::vector'
93 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
a.cc:8:10: error: expected primary-expression before 'int'
8 | vector<int> inputs;
| ^~~
a.cc:10:3: error: 'inputs' was not declared in this scope; did you mean 'puts'?
10 | inputs.push_back(A);
| ^~~~~~
| puts
a.cc:14:3: error: 'five' was not declared in this scope
14 | five = std::count(inputs.begin(),inputs.end(),5);
| ^~~~
a.cc:14:15: error: 'count' is not a member of 'std'; did you mean 'cout'?
14 | five = std::count(inputs.begin(),inputs.end(),5);
| ^~~~~
| cout
a.cc:15:3: error: 'seven' was not declared in this scope; did you mean 'setenv'?
15 | seven = std::count(inputs.begin(),inputs.end(),7);
| ^~~~~
| setenv
a.cc:15:16: error: 'count' is not a member of 'std'; did you mean 'cout'?
15 | seven = std::count(inputs.begin(),inputs.end(),7);
| ^~~~~
| cout
a.cc:17:30: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | if(five == 2 && seven == 1)cout << "YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:18:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
18 | else cout << "NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s191146748
|
p04043
|
C++
|
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <unordered_map>
#define endl '\n';
#define all(v) ((v).begin()), ((v).end())
#define sz(s) (int)s.size()
#define Ceil(x,y) ((x+y-1)/y)
#define RT(x) return cout<<x,0;
#define mem(x,y) memset(x,y,sizeof(x))
#define vi vector<int>
#define pii pair<int,int>
#define fx(n) fixed<<setprecision(n)
#define watch(x) cout<<(#x)<<" = "<<x<<endl
#define forr(i, n) for (int i = 0; i < int(n); i++)
typedef long long ll;
typedef unsigned long long ull;
typedef double dl;
const double PI = acos(-1), EPS = 1e-7;
const int OO = 0x3f3f3f3f, N = 1e7 + 5, MOD = 1e9 + 7;
using namespace std;
void fast() { std::ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); }
int main()
{
fast();
vector<ll>v(3);
for(int i=0;i<3;i++)
cin>>v[i];
sort(all(v));
if(v[0]==5 && v[1]==5 &&v[2]==7)
cout<<"YES\n":
else
cout<<"NO\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:30:22: error: expected ';' before ':' token
30 | cout<<"YES\n":
| ^
| ;
|
s580794084
|
p04043
|
C++
|
sdfdsd
|
a.cc:1:1: error: 'sdfdsd' does not name a type
1 | sdfdsd
| ^~~~~~
|
s582724455
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main(void)
{
int a,b,c; cin>>a>>b>>c;
if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||
(a==7&&b==5&&c==5))cout<<"YES"<<endl;
else cout<<"NO"<<endl
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before 'return'
8 | else cout<<"NO"<<endl
| ^
| ;
9 |
10 | return 0;
| ~~~~~~
|
s584548791
|
p04043
|
C
|
#include<stdio.h>
int main()
{
int A,B,C;
scanf(“%d %d %d”,&A,&B,&C);
if(A%7==0)
{
if(B%5==0 && C%5==0)
{
printf(“Yes”);
}
}
else if(A%5==0)
{
if(B%5==0 && C%7==0)
printf(“Yes”);
else if(B%7==0 && C%5==0)
printf(“Yes”);
}
else
{
printf(“No”);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:11: error: stray '\342' in program
5 | scanf(<U+201C>%d %d %d<U+201D>,&A,&B,&C);
| ^~~~~~~~
main.c:5:12: error: expected expression before '%' token
5 | scanf(“%d %d %d”,&A,&B,&C);
| ^
main.c:5:20: error: stray '\342' in program
5 | scanf(<U+201C>%d %d %d<U+201D>,&A,&B,&C);
| ^~~~~~~~
main.c:10:32: error: stray '\342' in program
10 | printf(<U+201C>Yes<U+201D>);
| ^~~~~~~~
main.c:10:36: error: stray '\342' in program
10 | printf(<U+201C>Yes<U+201D>);
| ^~~~~~~~
main.c:10:33: error: 'Yes' undeclared (first use in this function)
10 | printf(“Yes”);
| ^~~
main.c:10:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:25: error: stray '\342' in program
16 | printf(<U+201C>Yes<U+201D>);
| ^~~~~~~~
main.c:16:29: error: stray '\342' in program
16 | printf(<U+201C>Yes<U+201D>);
| ^~~~~~~~
main.c:18:26: error: stray '\342' in program
18 | printf(<U+201C>Yes<U+201D>);
| ^~~~~~~~
main.c:18:30: error: stray '\342' in program
18 | printf(<U+201C>Yes<U+201D>);
| ^~~~~~~~
main.c:22:26: error: stray '\342' in program
22 | printf(<U+201C>No<U+201D>);
| ^~~~~~~~
main.c:22:29: error: stray '\342' in program
22 | printf(<U+201C>No<U+201D>);
| ^~~~~~~~
main.c:22:27: error: 'No' undeclared (first use in this function)
22 | printf(“No”);
| ^~
|
s733448594
|
p04043
|
C
|
#include<studio.h>
int main()
{
int A,B,C;
scanf(“%d %d %d”,&A,&B,&C);
if(A%7==0)
{
if(B%5==0 && C%5==0)
{
printf(“Yes”);
}
}
else if(A%5==0)
{
if(B%5==0 && C%7==0)
printf(“Yes”);
else if(B%7==0 && C%5==0)
printf(“Yes”);
}
else
{
printf(“No”);
}
return 0;
}
|
main.c:1:9: fatal error: studio.h: No such file or directory
1 | #include<studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s610318305
|
p04043
|
C
|
#include<stdio.h>
int main()
{
int A,B,C;
scanf(“%d %d %d\n”,&A,&B,&C);
if(A%7==0)
{
if(B%5==0 && C%5==0)
{
printf(“Yes\n”);
}
}
else if(A%5==0)
{
if(B%5==0 && C%7==0)
printf(“Yes\n”);
else if(B%7==0 && C%5==0)
printf(“Yes\n”);
}
else
{
printf(“No\n”);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:11: error: stray '\342' in program
5 | scanf(<U+201C>%d %d %d\n<U+201D>,&A,&B,&C);
| ^~~~~~~~
main.c:5:12: error: expected expression before '%' token
5 | scanf(“%d %d %d\n”,&A,&B,&C);
| ^
main.c:5:20: error: stray '\' in program
5 | scanf(“%d %d %d\n”,&A,&B,&C);
| ^
main.c:5:22: error: stray '\342' in program
5 | scanf(<U+201C>%d %d %d\n<U+201D>,&A,&B,&C);
| ^~~~~~~~
main.c:10:32: error: stray '\342' in program
10 | printf(<U+201C>Yes\n<U+201D>);
| ^~~~~~~~
main.c:10:36: error: stray '\' in program
10 | printf(“Yes\n”);
| ^
main.c:10:33: error: 'Yes' undeclared (first use in this function)
10 | printf(“Yes\n”);
| ^~~
main.c:10:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:36: error: expected ')' before 'n'
10 | printf(“Yes\n”);
| ~ ^~
| )
main.c:10:38: error: stray '\342' in program
10 | printf(<U+201C>Yes\n<U+201D>);
| ^~~~~~~~
main.c:16:25: error: stray '\342' in program
16 | printf(<U+201C>Yes\n<U+201D>);
| ^~~~~~~~
main.c:16:29: error: stray '\' in program
16 | printf(“Yes\n”);
| ^
main.c:16:29: error: expected ')' before 'n'
16 | printf(“Yes\n”);
| ~ ^~
| )
main.c:16:31: error: stray '\342' in program
16 | printf(<U+201C>Yes\n<U+201D>);
| ^~~~~~~~
main.c:18:26: error: stray '\342' in program
18 | printf(<U+201C>Yes\n<U+201D>);
| ^~~~~~~~
main.c:18:30: error: stray '\' in program
18 | printf(“Yes\n”);
| ^
main.c:18:30: error: expected ')' before 'n'
18 | printf(“Yes\n”);
| ~ ^~
| )
main.c:18:32: error: stray '\342' in program
18 | printf(<U+201C>Yes\n<U+201D>);
| ^~~~~~~~
main.c:22:26: error: stray '\342' in program
22 | printf(<U+201C>No\n<U+201D>);
| ^~~~~~~~
main.c:22:29: error: stray '\' in program
22 | printf(“No\n”);
| ^
main.c:22:27: error: 'No' undeclared (first use in this function)
22 | printf(“No\n”);
| ^~
main.c:22:29: error: expected ')' before 'n'
22 | printf(“No\n”);
| ~ ^~
| )
main.c:22:31: error: stray '\342' in program
22 | printf(<U+201C>No\n<U+201D>);
| ^~~~~~~~
|
s623466660
|
p04043
|
C
|
#include<studio.h>
int main()
{
int A,B,C;
scanf(“%d %d %d\n”,&A,&B,&C);
if(A%7==0)
{
if(B%5==0 && C%5==0)
{
printf(“Yes\n”);
}
}
else if(A%5==0)
{
if(B%5==0 && C%7==0)
printf(“Yes\n”);
else if(B%7==0 && C%5==0)
printf(“Yes\n”);
}
else
{
printf(“No\n”);
}
return 0;
}
|
main.c:1:9: fatal error: studio.h: No such file or directory
1 | #include<studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s171778515
|
p04043
|
C++
|
#include <stdio.h>
using std::cin;
using std::cout;
void answer()
{
int a,five=0,seven=0;
for(int i=0;i<3;i++){
cin>>a;
if(a==5)
five++;
else
if(a==7)
seven++;
}
if(2==five||1==seven)
cout<<"YES";
else
cout<<"NO";
}
int main(){
answer();
return 0;
}
|
a.cc:2:12: error: 'cin' has not been declared in 'std'
2 | using std::cin;
| ^~~
a.cc:3:12: error: 'cout' has not been declared in 'std'
3 | using std::cout;
| ^~~~
a.cc: In function 'void answer()':
a.cc:8:17: error: 'cin' was not declared in this scope
8 | cin>>a;
| ^~~
a.cc:16:17: error: 'cout' was not declared in this scope
16 | cout<<"YES";
| ^~~~
a.cc:18:17: error: 'cout' was not declared in this scope
18 | cout<<"NO";
| ^~~~
|
s287036948
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a[3],s=0,f=0;
for(int i=0;i<3;i++)
{cin>>a[i];
if(a[i]==5)f++;
if(a[i]==7)s++;}
if(f==2&&s==1)
cout<<"YES"
else cout<<"NO";
return 0;}
|
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before 'else'
10 | cout<<"YES"
| ^
| ;
11 | else cout<<"NO";
| ~~~~
|
s581886067
|
p04043
|
C++
|
#include<iostream>
int main(){
int a[3],s=0,f=0;
for(int i=0;i<3;i++)
{cin>>a[i];
if(a[i]==5)f++;
if(a[i]==7)s++;}
if(f==2&&s==1)
cout<<"YES"
else cout<<"NO";
return 0;}
|
a.cc: In function 'int main()':
a.cc:5:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | {cin>>a[i];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout<<"YES"
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s535769699
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
void main()
{ vector<int>a;int k=0,l=0;
a.resize(3);
for(int i=0;i<a.size();i++)
cin>>a[i];
for(int i=0;i<a.size();i++)
{ if(a[i]==5)
k++;
else if(a[i]==7)
l++;}
if(k==2&&l==1)
cout<<"YES";
else
cout<<"NO";
}
|
a.cc:3:1: error: '::main' must return 'int'
3 | void main()
| ^~~~
|
s832596694
|
p04043
|
C
|
#include<stdio.h>
int main()
{
int a[3],f=0,s=0,i,t;
for(i=0;i<3;i++)
{
scanf("%d ",&a[i])
if(a[i]==5)
f++;
else if(a[i]==7)
s++;
}
t=f+s;
if(t==3&&f==2&&s==1)
printf("YES");
else
printf("NO");
}
|
main.c: In function 'main':
main.c:7:19: error: expected ';' before 'if'
7 | scanf("%d ",&a[i])
| ^
| ;
8 | if(a[i]==5)
| ~~
main.c:10:1: error: 'else' without a previous 'if'
10 | else if(a[i]==7)
| ^~~~
|
s312662876
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
{ vector<int>a;int k=0,l=0;
a.resize(3);
for(int i=0;i<a.size();i++)
cin>>a[i];
for(int i=0;i<a.size();i++)
{ if(a[i]==5)
k++;
else if(a[i]==7)
l++;}
if(k==2&&l==1)
cout<<"YES";
else
cout<<"NO";
}
|
a.cc:3:1: error: expected unqualified-id before '{' token
3 | { vector<int>a;int k=0,l=0;
| ^
|
s123461936
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if((a==5&&b==5&&c==7)||(a==5&&b==7&&c==5)||(a==7&&b==5&&c==5))
{
cout<<"YES";
}
else
{
cout<<"NO";
}
return 0;
|
a.cc: In function 'int main()':
a.cc:15:12: error: expected '}' at end of input
15 | return 0;
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s206113163
|
p04043
|
C++
|
#include <bits/stdc++.h>
#define endl '\n'
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector < vi >
#define pii pair<int,int>
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 1000000000000000001;
#define all(c) c.begin(),c.end()
#define mp(x,y) make_pair(x,y)
#define mem(a,val) memset(a,val,sizeof(a))
#define eb emplace_back
#define f first
#define faster ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define s second
#define rep(i, a, b) for(int i = int(a); i <= int(b); ++i)
using namespace std;
int main(){
faster
int T = 1;
while(T--){
int n5=0;,n7=0;
int a;
for(int i=0; i<3; i++){
cin>>a;
if(a == 5) n5++;
if(a == 7) n7++;
}
if(n5 == 2 && n7 == 1) cout<<"YES";
else cout<<"NO";
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:26:18: error: expected primary-expression before ',' token
26 | int n5=0;,n7=0;
| ^
a.cc:26:19: error: 'n7' was not declared in this scope; did you mean 'n5'?
26 | int n5=0;,n7=0;
| ^~
| n5
|
s294326980
|
p04043
|
C++
|
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
int N, L, i;
cin >> N;
cin >> L;
vector<int> A(data, data+N)
for (i=0; i<N; i++){
cin >> A[i];
}
sort(A.begin(), A.end());
for(i=0; i<N; i++){
cout << A[i];
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
10 | vector<int> A(data, data+N)
| ~~~~^~
a.cc:12:5: error: expected ',' or ';' before 'for'
12 | for (i=0; i<N; i++){
| ^~~
a.cc:12:23: error: expected ';' before ')' token
12 | for (i=0; i<N; i++){
| ^
| ;
|
s960112882
|
p04043
|
C++
|
//B - Iroha Loves Strings: 2Min;
//Assunto: Sort;
#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define loop(i, a, b) for(int i = a; i < b; i++)
#define loopBack(i, a, b) for(int i = a; i >= b; i--)
#define INF INT_MAX
#define LINF LLONG_MAX
#define DINF DBL_MAX
#define MAX 100050
#define MOD 1000000007
using namespace std;
typedef long long int ll;
typedef pair<int, int> ii;
int main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
cin >> a >> b >> c;
show[a]++; show[b]++; show[c]++;
if(show[5] == 2 and show[7] == 1) cout << "YES\n";
else cout << "NO\n";
}
|
a.cc: In function 'int main()':
a.cc:24:12: error: 'a' was not declared in this scope
24 | cin >> a >> b >> c;
| ^
a.cc:24:17: error: 'b' was not declared in this scope; did you mean 'pb'?
24 | cin >> a >> b >> c;
| ^
| pb
a.cc:24:22: error: 'c' was not declared in this scope
24 | cin >> a >> b >> c;
| ^
a.cc:25:5: error: 'show' was not declared in this scope
25 | show[a]++; show[b]++; show[c]++;
| ^~~~
|
s048949330
|
p04043
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABC042A
{
class Program
{
static void Main(string[] args)
{
int a, b, c;
var word = Console.ReadLine().Split(' ');
a = int.Parse(word[0]);
b = int.Parse(word[1]);
c = int.Parse(word[2]);
if(a==5&&b==7&&c==5||a==7&&b==5&&c==5||a==5&&b==5&&c==7)
Console.WriteLine("Yes");
else
Console.WriteLine("No");
Console.ReadKey();
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:11:26: error: 'string' has not been declared
11 | static void Main(string[] args)
| ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
11 | static void Main(string[] args)
| ^~~~
a.cc:27:6: error: expected ';' after class definition
27 | }
| ^
| ;
a.cc: In static member function 'static void ABC042A::Program::Main(int*)':
a.cc:14:13: error: 'var' was not declared in this scope
14 | var word = Console.ReadLine().Split(' ');
| ^~~
a.cc:15:17: error: expected primary-expression before 'int'
15 | a = int.Parse(word[0]);
| ^~~
a.cc:16:17: error: expected primary-expression before 'int'
16 | b = int.Parse(word[1]);
| ^~~
a.cc:17:17: error: expected primary-expression before 'int'
17 | c = int.Parse(word[2]);
| ^~~
a.cc:19:17: error: 'Console' was not declared in this scope
19 | Console.WriteLine("Yes");
| ^~~~~~~
a.cc:21:17: error: 'Console' was not declared in this scope
21 | Console.WriteLine("No");
| ^~~~~~~
a.cc:25:13: error: 'Console' was not declared in this scope
25 | Console.ReadKey();
| ^~~~~~~
|
s128904030
|
p04043
|
C++
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABC042A
{
class Program
{
static void Main(string[] args)
{
int a, b, c;
var word = Console.ReadLine().Split(' ');
a = int.Parse(word[0]);
b = int.Parse(word[1]);
c = int.Parse(word[2]);
if(a==5&&b==7&&c==5||a==7&&b==5&&c==5||a==5&&b==5&&c==7)
Console.WriteLine("Yes");
else
Console.WriteLine("No");
Console.ReadKey();
}
}
}
|
a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:11:26: error: 'string' has not been declared
11 | static void Main(string[] args)
| ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
11 | static void Main(string[] args)
| ^~~~
a.cc:27:6: error: expected ';' after class definition
27 | }
| ^
| ;
a.cc: In static member function 'static void ABC042A::Program::Main(int*)':
a.cc:14:13: error: 'var' was not declared in this scope
14 | var word = Console.ReadLine().Split(' ');
| ^~~
a.cc:15:17: error: expected primary-expression before 'int'
15 | a = int.Parse(word[0]);
| ^~~
a.cc:16:17: error: expected primary-expression before 'int'
16 | b = int.Parse(word[1]);
| ^~~
a.cc:17:17: error: expected primary-expression before 'int'
17 | c = int.Parse(word[2]);
| ^~~
a.cc:19:17: error: 'Console' was not declared in this scope
19 | Console.WriteLine("Yes");
| ^~~~~~~
a.cc:21:17: error: 'Console' was not declared in this scope
21 | Console.WriteLine("No");
| ^~~~~~~
a.cc:25:13: error: 'Console' was not declared in this scope
25 | Console.ReadKey();
| ^~~~~~~
|
s619117140
|
p04043
|
C++
|
#include<iostream>
#include<alogrithm>
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\n";
else
cout << "No\n";
return 0;
}
|
a.cc:2:9: fatal error: alogrithm: No such file or directory
2 | #include<alogrithm>
| ^~~~~~~~~~~
compilation terminated.
|
s642643769
|
p04043
|
C++
|
#include<iostream>
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\n";
else
cout << "No\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'sort' was not declared in this scope; did you mean 'short'?
6 | sort(a,a+3);
| ^~~~
| short
|
s741541187
|
p04043
|
C++
|
import java.util.*
fun main(args:Array<String>){
val a = readLine()!!.split(" ").map{it.toInt()}.sorted()
println(if(a[0] == 5 && a[1] == 5 && a[2] == 7) "YES" else "NO")
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s241438802
|
p04043
|
C++
|
# AtCode 042
if gets.split(' ').map(&:to_i).sort == [5, 5, 7]
puts "YES"
else
puts "NO"
end
|
a.cc:1:3: error: invalid preprocessing directive #AtCode
1 | # AtCode 042
| ^~~~~~
a.cc:3:1: error: expected unqualified-id before 'if'
3 | if gets.split(' ').map(&:to_i).sort == [5, 5, 7]
| ^~
|
s535930650
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
bool check_digit(int arr[], int, int);
int main(){
int K;
string N;
cin >> N >> K;
int *arr = new int[K];
int num = 0;
int c, flag = 0;
for(int i = 0; N[i] != '\0'; i++){
c = (N[i] - '0')*pow(10,N.size()-i-1);
num = num + c;
}
cout << num;
for(int i = 0; i < K; i++){
cin >> arr[i];
}
int digit;
for(int i = num; ; i++){
for(int j = i; j != 0; j /= 10){
digit = j%10;
if(!check_digit(arr, K, digit)){
break;
}
if(j < 10)
flag = 1;
}
if(flag == 1){
cout << i;
break;
}
}
|
a.cc: In function 'int main()':
a.cc:34:10: error: expected '}' at end of input
34 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s162790197
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
int flag = 0;
if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
if(A==7 || B==7 || C==7)
flag = 1;
if(flag=1)
cout << "YES";
else
cout << "NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:12: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ~^~~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
7 | if((A==5&&B==5&&C==7) || (B==5&&C==5&&A==7) || (C==5&&A==5&&B==7))
| ^
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:7:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
7 | if
|
s794990870
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
int flag = 0;
if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
if(A==7 || B==7 || C==7)
flag = 1;
if(flag=1)
cout << "YES";
else
cout << "NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ~^~~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/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:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/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:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
/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:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
7 | if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
| ^
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> >)'
6
|
s838637327
|
p04043
|
C++
|
#include <bits/stdc++.h#include <bits/stdc++.h>
using namespace std;
int main(){
string A, B, C;
cin >> A >> B >> C;
int flag = 0;
if((A==5&&B==5) || (B==5&&C==5) || (C==5&&A==5))
if(A==7 || B==7 || C==7)
flag = 1;
if(flag=1)
cout << "YES";
else
cout << "NO";
return 0;
}
|
a.cc:1:10: fatal error: bits/stdc++.h#include <bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h#include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s404424514
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < (N); i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back
using ll = long long;
using i_i = tuple<int, int>;
int main(){
vector<int> a(3);
rep(i, 3) cin >> a[i];
bool x = ((a[0]==5 && a[1] == 5 && a[2] == 7)||(a[0]==5 && a[1] == 7 && a[2] == 5)||(a[0]==7 && a[1] == 5 && a[2] == 5));
cout << (x ? "YES" : "NO") << endl;
return;
}
|
a.cc: In function 'int main()':
a.cc:16:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
16 | return;
| ^~~~~~
|
s999469844
|
p04043
|
C++
|
//UTF-8でコーディングしています
#include <bits/stdc++.h>
using namespace std;
int main() {
int A,B,C;
cin >> A >> B >> C;
if(A*B*C=5*5*7){
cout << "YES" << "\n";
}else{
cout << "NO" << "\n";
}
}
|
a.cc: In function 'int main()':
a.cc:8:9: error: lvalue required as left operand of assignment
8 | if(A*B*C=5*5*7){
| ~~~^~
|
s370242431
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
int t=0;
cin >> a >> b >> c;
if(a>b){
t=a;
a=b;
b=t;
}
if(b>c){
t=b;
b=c;
c=t;
}
if(a>b){
t=a;
a=b;
b=t;
}
if(a==5&&b==5&&c==7){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:32:4: error: expected '}' at end of input
32 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s201693934
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int N = Integer.parseInt(str);
str = scan.next();
int L = Integer.parseInt(str);
ArrayList<String> list = new ArrayList<>();
for(int i = 0; i < N; i++){
String input = scan.next();
list.add(input);
}
Collections.sort(list);
for(int i = 0; i < 3 ; i++){
String input = list.get(i);
System.out.print(input);
}
System.out.println(ans);
}
}
|
Main.java:22: error: cannot find symbol
System.out.println(ans);
^
symbol: variable ans
location: class Main
1 error
|
s403663210
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int N = Integer.parseInt(str);
str = scan.next();
int L = Integer.parseInt(str);
ArrayList<String> list = new ArrayList<>();
for(int i = 0; i < N; i++){
String input = scan.next();
list.add(input);
}
Collections.sort(list);
for(int i = 0; i < 3 ; i++){
String input = list.get(i);
System.out.print(input)
}
System.out.println(ans);
}
}
|
Main.java:19: error: ';' expected
System.out.print(input)
^
1 error
|
s286086573
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int N = Integer.parseInt(str);
str = scan.next();
int L = Integer.parseInt(str);
ArrayList<String> list = new ArrayList<>();
for(int i = 0; i < N; i++){
String input = scan.next();
list.add(input);
}
Collections.sort(list);
for(int i = 0; i < 3 ; i++){
String input = list.get(i);
String ans = ans + input;
}
System.out.println(ans);
}
}
|
Main.java:21: error: cannot find symbol
System.out.println(ans);
^
symbol: variable ans
location: class Main
1 error
|
s734150567
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int N = Integer.parseInt(str);
str = scan.next();
int L = Integer.parseInt(str);
ArrayList<String> list = new ArrayList<>();
for(int i = 0; i < N; i++){
String input = scan.next();
list.add(input);
}
Collections.sort(list);
String ans;
for(int i = 0; i < 3 ; i++){
String input = list.get(i);
ans = ans + input;
}
System.out.println(ans);
}
}
|
Main.java:20: error: variable ans might not have been initialized
ans = ans + input;
^
Main.java:22: error: variable ans might not have been initialized
System.out.println(ans);
^
2 errors
|
s845052068
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int N = Integer.parseInt(str);
str = scan.next();
int L = Integer.parseInt(str);
ArrayList<String> list = new ArrayList<>();
for(int i = 0; i < N; i++){
String input = scan.next();
list.add(input);
}
Collections.sort(list);
String ans;
for(int i = 0; 2 ; i++){
String input = list.get(i);
ans = ans + input;
}
System.out.println(ans);
}
}
|
Main.java:18: error: incompatible types: int cannot be converted to boolean
for(int i = 0; 2 ; i++){
^
1 error
|
s125103451
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int N = Integer.parseInt(str);
str = scan.next();
int L = Integer.parseInt(str);
ArrayList<String> list = new ArrayList<>();
for(int i = 0; i < N; i++){
String input = scan.next();
list.add(input);
}
Collections.sort(list);
String ans;
for(i = 0; 2 ; i++){
input = list.get(i);
ans = ans + input;
}
System.out.println(ans);
}
}
|
Main.java:18: error: cannot find symbol
for(i = 0; 2 ; i++){
^
symbol: variable i
location: class Main
Main.java:18: error: incompatible types: int cannot be converted to boolean
for(i = 0; 2 ; i++){
^
Main.java:18: error: cannot find symbol
for(i = 0; 2 ; i++){
^
symbol: variable i
location: class Main
Main.java:19: error: cannot find symbol
input = list.get(i);
^
symbol: variable input
location: class Main
Main.java:19: error: cannot find symbol
input = list.get(i);
^
symbol: variable i
location: class Main
Main.java:20: error: cannot find symbol
ans = ans + input;
^
symbol: variable input
location: class Main
6 errors
|
s537563646
|
p04043
|
Java
|
import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int N = Integer.parseInt(str);
str = scan.next();
int L = Integer.parseInt(str);
List<String> list = new ArrayList<>();
for(int i = 0; i < N; i++){
String input = scan.next();
list.add(input);
}
Arrays.sort(list);
String ans;
for(i = 0; 2 ; i++){
input = list.get(i);
ans = ans + input;
}
System.out.println(ans);
}
}
|
Main.java:17: error: no suitable method found for sort(List<String>)
Arrays.sort(list);
^
method Arrays.sort(int[]) is not applicable
(argument mismatch; List<String> cannot be converted to int[])
method Arrays.sort(long[]) is not applicable
(argument mismatch; List<String> cannot be converted to long[])
method Arrays.sort(short[]) is not applicable
(argument mismatch; List<String> cannot be converted to short[])
method Arrays.sort(char[]) is not applicable
(argument mismatch; List<String> cannot be converted to char[])
method Arrays.sort(byte[]) is not applicable
(argument mismatch; List<String> cannot be converted to byte[])
method Arrays.sort(float[]) is not applicable
(argument mismatch; List<String> cannot be converted to float[])
method Arrays.sort(double[]) is not applicable
(argument mismatch; List<String> cannot be converted to double[])
method Arrays.sort(Object[]) is not applicable
(argument mismatch; List<String> cannot be converted to Object[])
method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
(cannot infer type-variable(s) T#1
(actual and formal argument lists differ in length))
method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
(cannot infer type-variable(s) T#2
(actual and formal argument lists differ in length))
where T#1,T#2 are type-variables:
T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Main.java:19: error: cannot find symbol
for(i = 0; 2 ; i++){
^
symbol: variable i
location: class Main
Main.java:19: error: incompatible types: int cannot be converted to boolean
for(i = 0; 2 ; i++){
^
Main.java:19: error: cannot find symbol
for(i = 0; 2 ; i++){
^
symbol: variable i
location: class Main
Main.java:20: error: cannot find symbol
input = list.get(i);
^
symbol: variable input
location: class Main
Main.java:20: error: cannot find symbol
input = list.get(i);
^
symbol: variable i
location: class Main
Main.java:21: error: cannot find symbol
ans = ans + input;
^
symbol: variable input
location: class Main
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
7 errors
|
s766873952
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int num_1 = Integer.parseInt(str);
str = scan.next();
int num_2 = Integer.parseInt(str);
str = scan.next();
int num_3 = Integer.parseInt(str);
if (num_1 == "7"){
if (num_2 == "5" && num_3 == "5"){
System.out.println("YES");
}else{
System.out.println("NO");
}
}else if (num_2 == 7){
if (num_1 == 5 && num_3 == 5){
System.out.println("YES");
}else{
System.out.println("NO");
}
}else if (num_3 == 7){
if (num_2 == 5 && num_1 == 5){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
}
|
Main.java:11: error: bad operand types for binary operator '=='
if (num_1 == "7"){
^
first type: int
second type: String
Main.java:12: error: bad operand types for binary operator '=='
if (num_2 == "5" && num_3 == "5"){
^
first type: int
second type: String
Main.java:12: error: bad operand types for binary operator '=='
if (num_2 == "5" && num_3 == "5"){
^
first type: int
second type: String
3 errors
|
s255343664
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int num_1 = Integer.parseInt(str);
String str = scan.next();
int num_2 = Integer.parseInt(str);
String str = scan.next();
int num_3 = Integer.parseInt(str);
if (num_1 = "7"){
if (num_2 = "5" && num_3 = "5"){
System.out.println("YES");
}else{
System.out.println("NO");
}
}else if (num_2 = "7"){
if (num_1 = "5" && num_3 = "5"){
System.out.println("YES");
}else{
System.out.println("NO");
}
}else if (num_3 = "7"){
if (num_2 = "5" && num_1 = "5"){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
}
|
Main.java:7: error: variable str is already defined in method main(String[])
String str = scan.next();
^
Main.java:9: error: variable str is already defined in method main(String[])
String str = scan.next();
^
Main.java:11: error: incompatible types: String cannot be converted to int
if (num_1 = "7"){
^
Main.java:11: error: incompatible types: int cannot be converted to boolean
if (num_1 = "7"){
^
Main.java:12: error: bad operand types for binary operator '&&'
if (num_2 = "5" && num_3 = "5"){
^
first type: String
second type: int
Main.java:12: error: incompatible types: int cannot be converted to boolean
if (num_2 = "5" && num_3 = "5"){
^
Main.java:17: error: incompatible types: String cannot be converted to int
}else if (num_2 = "7"){
^
Main.java:17: error: incompatible types: int cannot be converted to boolean
}else if (num_2 = "7"){
^
Main.java:18: error: bad operand types for binary operator '&&'
if (num_1 = "5" && num_3 = "5"){
^
first type: String
second type: int
Main.java:18: error: incompatible types: int cannot be converted to boolean
if (num_1 = "5" && num_3 = "5"){
^
Main.java:23: error: incompatible types: String cannot be converted to int
}else if (num_3 = "7"){
^
Main.java:23: error: incompatible types: int cannot be converted to boolean
}else if (num_3 = "7"){
^
Main.java:24: error: bad operand types for binary operator '&&'
if (num_2 = "5" && num_1 = "5"){
^
first type: String
second type: int
Main.java:24: error: incompatible types: int cannot be converted to boolean
if (num_2 = "5" && num_1 = "5"){
^
14 errors
|
s908568947
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str = scan.next();
int num_1 = Integer.parseInt(str);
String str = scan.next();
int num_2 = Integer.parseInt(str);
String str = scan.next();
int num_3 = Integer.parseInt(str);
if (num_1 = "7"){
if (num_2 = "5" && num_3 = "5"){
System.out.println("YES");
}else{
System.out.println("NO");
}
}else if (num_2 = "7"){
if (num_1 = "5" && num_3 = "5"){
System.out.println("YES");
}else{
System.out.println("NO");
}
}else if (num_3 = "7"){
if (num_2 = "5" && num_1 = "5"){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
}
|
Main.java:7: error: variable str is already defined in method main(String[])
String str = scan.next();
^
Main.java:9: error: variable str is already defined in method main(String[])
String str = scan.next();
^
Main.java:11: error: incompatible types: String cannot be converted to int
if (num_1 = "7"){
^
Main.java:11: error: incompatible types: int cannot be converted to boolean
if (num_1 = "7"){
^
Main.java:12: error: bad operand types for binary operator '&&'
if (num_2 = "5" && num_3 = "5"){
^
first type: String
second type: int
Main.java:12: error: incompatible types: int cannot be converted to boolean
if (num_2 = "5" && num_3 = "5"){
^
Main.java:17: error: incompatible types: String cannot be converted to int
}else if (num_2 = "7"){
^
Main.java:17: error: incompatible types: int cannot be converted to boolean
}else if (num_2 = "7"){
^
Main.java:18: error: bad operand types for binary operator '&&'
if (num_1 = "5" && num_3 = "5"){
^
first type: String
second type: int
Main.java:18: error: incompatible types: int cannot be converted to boolean
if (num_1 = "5" && num_3 = "5"){
^
Main.java:23: error: incompatible types: String cannot be converted to int
}else if (num_3 = "7"){
^
Main.java:23: error: incompatible types: int cannot be converted to boolean
}else if (num_3 = "7"){
^
Main.java:24: error: bad operand types for binary operator '&&'
if (num_2 = "5" && num_1 = "5"){
^
first type: String
second type: int
Main.java:24: error: incompatible types: int cannot be converted to boolean
if (num_2 = "5" && num_1 = "5"){
^
14 errors
|
s074117368
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin >>a>>b>>c;
if(a+b+c==19){
if((a==5||b==5||c==5)&&(a==7||b==7||c==7)){
cout << Yes;
}
}else{
cout << No;
}
}
|
a.cc: In function 'int main()':
a.cc:9:15: error: 'Yes' was not declared in this scope
9 | cout << Yes;
| ^~~
a.cc:12:17: error: 'No' was not declared in this scope
12 | cout << No;
| ^~
|
s859903282
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main(){
int s1, s2, s3;
cin >> s1 >> s2 > s3;
vector<int> v;
v.push_back(s1);
v.push_back(s2);
v.push_back(s3);
int i = 0;
int j = 0;
for(auto m : v) {
if(m == 5){
i++;
}
if(m == 7){
j++;
}
}
if((i == 2) && j == 1){
cout << "YES";
}
else{
cout << "NO";
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:25: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
8 | cin >> s1 >> s2 > s3;
| ~~~~~~~~~~~~~~~ ^ ~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:8:25: note: candidate: 'operator>(int, int)' (built-in)
8 | cin >> s1 >> s2 > s3;
| ~~~~~~~~~~~~~~~~^~~~
a.cc:8:25: 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/string:48,
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_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cin >> s1 >> s2 > s3;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cin >> s1 >> s2 > s3;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | cin >> s1 >> s2 > s3;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | cin >> s1 >> s2 > s3;
| ^~
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:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
8 | cin >> s1 >> s2 > s3;
| ^~
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:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cin >> s1 >> s2 > s3;
| ^~
/usr/include/c++/14/string_view:702: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> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cin >> s1 >> s2 > s3;
| ^~
/usr/include/c++/14/string_view:710: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>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | cin >> s1 >> s2 > s3;
| ^~
/usr/include/c++/14/bits/basic_string.h:3915: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>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cin >> s1 >> s2 > s3;
| ^~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cin >> s1 >> s2 > s3;
| ^~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3942 | operator>(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>'
8 | cin >> s1 >> s2 > s3;
| ^~
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:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2619 | operator>(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed:
a.cc:8:27: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
8 | cin >> s1 >> s2 > s3;
| ^~
a.cc:10:9: error: 'vector' was not declared in this scope
10 | vector<int> v;
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+#include <vector>
2 |
a.cc:10:16: error: expected primary-expression before 'int'
10 | vector<int> v;
| ^~~
a.cc:11:9: error: 'v' was not declared in this scope
11 | v.push_back(s1);
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.