submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s091804845
|
p04043
|
Java
|
String x = sc.nextLine();
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
String x = sc.nextLine();
^
(use --enable-preview to enable unnamed classes)
1 error
|
s029263118
|
p04043
|
Java
|
String x = sc.nextLine();
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
String x = sc.nextLine();
^
(use --enable-preview to enable unnamed classes)
1 error
|
s497199543
|
p04043
|
Java
|
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class A42 {
static InputStream is;
static PrintWriter out;
static String INPUT = "";
static void solve()
{
int[] arr = na(3);
Arrays.sort(arr);
if (arr[0] == 5 && arr[1] == 5 && arr[2] == 7) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
public static void main(String[] args) throws Exception
{
long S = System.currentTimeMillis();
is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
out = new PrintWriter(System.out);
solve();
out.flush();
long G = System.currentTimeMillis();
tr(G-S+"ms");
}
private static boolean eof()
{
if(lenbuf == -1)return true;
int lptr = ptrbuf;
while(lptr < lenbuf)if(!isSpaceChar(inbuf[lptr++]))return false;
try {
is.mark(1000);
while(true){
int b = is.read();
if(b == -1){
is.reset();
return true;
}else if(!isSpaceChar(b)){
is.reset();
return false;
}
}
} catch (IOException e) {
return true;
}
}
private static byte[] inbuf = new byte[1024];
static int lenbuf = 0, ptrbuf = 0;
private static int readByte()
{
if(lenbuf == -1)throw new InputMismatchException();
if(ptrbuf >= lenbuf){
ptrbuf = 0;
try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
if(lenbuf <= 0)return -1;
}
return inbuf[ptrbuf++];
}
private static boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
private static int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
private static double nd() { return Double.parseDouble(ns()); }
private static char nc() { return (char)skip(); }
private static String ns()
{
int b = skip();
StringBuilder sb = new StringBuilder();
while(!(isSpaceChar(b))){
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
private static char[] ns(int n)
{
char[] buf = new char[n];
int b = skip(), p = 0;
while(p < n && !(isSpaceChar(b))){
buf[p++] = (char)b;
b = readByte();
}
return n == p ? buf : Arrays.copyOf(buf, p);
}
private static char[][] nm(int n, int m)
{
char[][] map = new char[n][];
for(int i = 0;i < n;i++)map[i] = ns(m);
return map;
}
private static int[] na(int n)
{
int[] a = new int[n];
for(int i = 0;i < n;i++)a[i] = ni();
return a;
}
private static int ni()
{
int num = 0, b;
boolean minus = false;
while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
if(b == '-'){
minus = true;
b = readByte();
}
while(true){
if(b >= '0' && b <= '9'){
num = num * 10 + (b - '0');
}else{
return minus ? -num : num;
}
b = readByte();
}
}
private static long nl()
{
long num = 0;
int b;
boolean minus = false;
while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
if(b == '-'){
minus = true;
b = readByte();
}
while(true){
if(b >= '0' && b <= '9'){
num = num * 10 + (b - '0');
}else{
return minus ? -num : num;
}
b = readByte();
}
}
private static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); }
}
|
Main.java:8: error: class A42 is public, should be declared in a file named A42.java
public class A42 {
^
1 error
|
s406303409
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> X(3);
int count5 = 0;
int count7 = 0;
for (int i = 0; i < 3; i++) {
cin >> X.at(i);
}
for (int i = 0; i < 3; i++) {
if (X(i) == 5) {
count5++;
}
if (X(i) == 7) {
count7++;
}
}
if (count5 == 2 && count7 == 1) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:12:10: error: no match for call to '(std::vector<int>) (int&)'
12 | if (X(i) == 5) {
| ~^~~
a.cc:15:10: error: no match for call to '(std::vector<int>) (int&)'
15 | if (X(i) == 7) {
| ~^~~
|
s145050018
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> X(3);
int count5 = 0;
int count7 = 0;
for (int i = 0; i < 3; i++) {
cin >> X(i);
}
for (int i = 0; i < 3; i++) {
if (X.at(i) == 5) {
count5++;
}
if (X.at(i) == 7) {
count7++;
}
}
if (count5 == 2 && count7 == 1) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:13: error: no match for call to '(std::vector<int>) (int&)'
9 | cin >> X(i);
| ~^~~
|
s842704217
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> X(3);
int count5 = 0;
int count7 = 0;
for (int i = 0; i < 3; i++) {
cin >> X(i);
}
for (int i = 0; i < 3; i++) {
if (X(i) == 5) {
count5++;
}
if (X(i) == 7) {
count7++;
}
}
if (count5 == 2 && count7 == 1) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:9:13: error: no match for call to '(std::vector<int>) (int&)'
9 | cin >> X(i);
| ~^~~
a.cc:12:10: error: no match for call to '(std::vector<int>) (int&)'
12 | if (X(i) == 5) {
| ~^~~
a.cc:15:10: error: no match for call to '(std::vector<int>) (int&)'
15 | if (X(i) == 7) {
| ~^~~
|
s313929251
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main()
{
// 整数の入力
int a, b, c;
cin >> a >> b >>c;
string s;
if(a == 5 && b == 7 && c == 5){
s = "YES" }
else {
s = "NO" }
// 文字列の入力
cout << s << endl;
return 0;
}
#include<iostream>
using namespace std;
int main()
{
// 整数の入力
int a, b, c;
cin >> a >> b >>c;
string s;
if(a == 5 && b == 7 && c == 5){
s = "YES";
}
else {
s = "NO";
}
// 文字列の入力
cout << s << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before '}' token
10 | s = "YES" }
| ^~
| ;
a.cc:12:15: error: expected ';' before '}' token
12 | s = "NO" }
| ^~
| ;
a.cc: At global scope:
a.cc:19:5: error: redefinition of 'int main()'
19 | int main()
| ^~~~
a.cc:3:5: note: 'int main()' previously defined here
3 | int main()
| ^~~~
|
s398666220
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main()
{
// 整数の入力
int a, b, c;
cin >> a >> b >>c;
string s;
if(a == 5 && b == 7 && c == 5){
s = "YES" }
else {
s = "NO" }
// 文字列の入力
cout << s << endl;
return 0;
}
#include<iostream>
using namespace std;
int main()
{
// 整数の入力
int mojisu[3];
cin >> mojisu[0] >> mojisu[1] >>mojisu[2];
int gomoji = 0;
int nanamoji = 0;
for(int i=0;i<3;i++){
if(mojisu[i] == 5) gomoji++;
if(mojisu[i] == 7) nanamoji++;
}
string s;
if(gomoji == 2 && nanamoji == 1){
s = "YES" }
else {
s = "NO" }
// 文字列の入力
cout << s << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before '}' token
10 | s = "YES" }
| ^~
| ;
a.cc:12:15: error: expected ';' before '}' token
12 | s = "NO" }
| ^~
| ;
a.cc: At global scope:
a.cc:19:5: error: redefinition of 'int main()'
19 | int main()
| ^~~~
a.cc:3:5: note: 'int main()' previously defined here
3 | int main()
| ^~~~
a.cc: In function 'int main()':
a.cc:32:16: error: expected ';' before '}' token
32 | s = "YES" }
| ^~
| ;
a.cc:34:15: error: expected ';' before '}' token
34 | s = "NO" }
| ^~
| ;
|
s869844559
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main()
{
// 整数の入力
int a, b, c;
cin >> a >> b >>c;
string s;
if(a == 5 && b == 7 && c == 5){
s = "YES" }
else {
s = "NO" }
// 文字列の入力
cout << s << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before '}' token
10 | s = "YES" }
| ^~
| ;
a.cc:12:15: error: expected ';' before '}' token
12 | s = "NO" }
| ^~
| ;
|
s988736880
|
p04043
|
C
|
include<stdio.h>
int main(void){
int x[3];
for(int i = 0;i < 3;i++){
scanf("%d",&x[i]);
}
if(x[0]*x[1]*x[2] == 175){
printf("YES");
}else{
printf("NO");
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s398719281
|
p04043
|
C++
|
#include
|
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include
| ^
|
s530923274
|
p04043
|
C++
|
#include <bits/stdc++.h>
int main()
{
int a,b,c;
map<int,int>M;
M[5]=0;
M[7]=0;
M[a]++;
M[b]++;
M[c]++;
if(M[5]==2&&M[7]==1)
{
cout<< "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'map' was not declared in this scope
6 | map<int,int>M;
| ^~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: 'std::map'
102 | class map
| ^~~
/usr/include/c++/14/map:89:13: note: 'std::pmr::map'
89 | using map
| ^~~
a.cc:6:7: error: expected primary-expression before 'int'
6 | map<int,int>M;
| ^~~
a.cc:7:3: error: 'M' was not declared in this scope
7 | M[5]=0;
| ^
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout<< "YES" << endl;
| ^~~~
| std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:14:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
14 | cout<< "YES" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | cout << "NO" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:17:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
17 | cout << "NO" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s969970960
|
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 && c == 5 && b == 7) || (a == 7 && b == 5 && c == morning 5)) {
cout << "YES";
} else {
cout << "NO";
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:97: error: 'morning' was not declared in this scope
8 | if ((a == 5 && b == 5 && c == 7) || (a == 5 && c == 5 && b == 7) || (a == 7 && b == 5 && c == morning 5)) {
| ^~~~~~~
a.cc:8:104: error: expected ')' before numeric constant
8 | if ((a == 5 && b == 5 && c == 7) || (a == 5 && c == 5 && b == 7) || (a == 7 && b == 5 && c == morning 5)) {
| ~ ^~
| )
a.cc:10:4: error: expected ')' before 'else'
10 | } else {
| ^~~~~
| )
a.cc:8:6: note: to match this '('
8 | if ((a == 5 && b == 5 && c == 7) || (a == 5 && c == 5 && b == 7) || (a == 7 && b == 5 && c == morning 5)) {
| ^
|
s663893068
|
p04043
|
C
|
clude <stdio.h>
int main(){
int a,b,c;
int answer;
answer=0;
scanf("%d %d %d",&a,&b,&c);
if(a==7){
if(b==5&&c==5) answer =1;
}
else if(b==7){
if(a==5&&c==5) answer =1;
}
else if(c==7){
if(b==5&&a==5) answer =1;
}
if(answer==1){
printf("YES");
}
else
{
printf("No");
}
return 0;
}
|
main.c:1:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | clude <stdio.h>
| ^
|
s512019732
|
p04043
|
C++
|
#include <bits/stdc++.h>
int main(){
vector<int> vec(3);
int five_count=0;
int seven_count=0;
for(int i=0; i<3; ++i){
cin >> vec.at(i);
}
for(int i=0; i<3; ++i){
if(vec.at(i)==5){
++five_count;
}else if(vec.at(i)==7){
++seven_count;
}else continue;
}
if((five_count==2) && (seven_count==1)){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:3:5: error: 'vector' was not declared in this scope
3 | vector<int> vec(3);
| ^~~~~~
a.cc:3:5: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/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:3:12: error: expected primary-expression before 'int'
3 | vector<int> vec(3);
| ^~~
a.cc:9:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
9 | cin >> vec.at(i);
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:9:16: error: 'vec' was not declared in this scope
9 | cin >> vec.at(i);
| ^~~
a.cc:13:12: error: 'vec' was not declared in this scope
13 | if(vec.at(i)==5){
| ^~~
a.cc:21:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
21 | cout << "Yes" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:21:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
21 | cout << "Yes" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:23:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
23 | cout << "No" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:23:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
23 | cout << "No" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s769978985
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main()
{
int a[3] = {0, 0, 0};
cin >> a[0] >> b[0] >> c[0];
int fn = 0;
int sn = 0;
for(int i = 0; i < 3; i++)
{
if(a[i] == 5)
{
fn++;
if(fn > 2)
{
cout << "NO" << endl;
return 0;
}
}
else if(a[i] == 7)
{
sn++;
if(sn > 1)
{
cout << "NO" << endl;
}
}
else
{
cout << "NO" << endl;
return 0;
}
}
cout << "YES" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:20: error: 'b' was not declared in this scope
7 | cin >> a[0] >> b[0] >> c[0];
| ^
a.cc:7:28: error: 'c' was not declared in this scope
7 | cin >> a[0] >> b[0] >> c[0];
| ^
|
s608087801
|
p04043
|
C++
|
#include <iostream>
int main()
{
int a[3] = {0, 0, 0};
cin >> a[0] >> b[0] >> c[0];
int fn = 0;
int sn = 0;
for(int i = 0; i < 3; i++)
{
if(a[i] == 5)
{
fn++;
if(fn > 2)
{
cout << "NO" << endl;
return 0;
}
}
else if(a[i] == 7)
{
sn++;
if(sn > 1)
{
cout << "NO" << endl;
}
}
else
{
cout << "NO" << endl;
return 0;
}
}
cout << "YES" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> a[0] >> b[0] >> c[0];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:20: error: 'b' was not declared in this scope
7 | cin >> a[0] >> b[0] >> c[0];
| ^
a.cc:7:28: error: 'c' was not declared in this scope
7 | cin >> a[0] >> b[0] >> c[0];
| ^
a.cc:19:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
19 | cout << "NO" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:19:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
19 | cout << "NO" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:28:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
28 | cout << "NO" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:28:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
28 | cout << "NO" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:33:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
33 | cout << "NO" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:33:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
33 | cout << "NO" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:38:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
38 | cout << "YES" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:38:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
38 | cout << "YES" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s315019253
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespaces std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if((a==5)&&(b==5)&&(c==7))
cout<<"YES";
else if((a==7)&&(b==5)&&(c==5))
cout<<"YES";
else if((a==5)&&(b==7)&&(c==5))
cout<<"YES";
else
cout<<"NO";
return 0;
}
|
a.cc:2:11: error: expected nested-name-specifier before 'namespaces'
2 | using namespaces std;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b>>c;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout<<"YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | 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:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | 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:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout<<"NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s054267884
|
p04043
|
C++
|
#include<iostream>
using namespaces std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if((a==5)&&(b==5)&&(c==7))
cout<<"YES";
else if((a==7)&&(b==5)&&(c==5))
cout<<"YES";
else if((a==5)&&(b==7)&&(c==5))
cout<<"YES";
else
cout<<"NO";
return 0;
}
|
a.cc:2:11: error: expected nested-name-specifier before 'namespaces'
2 | using namespaces std;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:7: 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:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout<<"YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | 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:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | 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:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout<<"NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s916146502
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespaces std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if((a==5)&&(b==5)&&(c==7))
cout<<"YES";
else if((a==7)&&(b==5)&&(c==5))
cout<<"YES";
else if((a==5)&&(b==7)&&(c==5))
cout<<"YES";
else
cout<<"NO";
return 0;
}
|
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
2 | using namespaces std;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>a>>b>>c;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | cout<<"YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout<<"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:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | 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:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout<<"NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s337310772
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main () ;
{
int A , B , C ;
cin >> A >> B >> C ;
if (A==5 && B==5 && C==7)
{
cout << "YES \n" ;
}
else if (A==5 && B==7 && C ==5)
{
cout << "YES\n" ;
}
else if (A==7 && B==5 && C==5)
{
cout << "YES\n" ;
}
else
{
cout << "NO\n" ;
}
}
|
a.cc:6:1: error: expected unqualified-id before '{' token
6 | {
| ^
|
s480893408
|
p04043
|
C++
|
#include "bits/stdc++.h"
template<typename T>
T get_value(std::istream& is);
int getMinNum_div(int _nOriginal, const std::vector<int>& _avoid)
{
for (int i = _nOriginal; i < 100000; i++)
{
bool bFound = false;
int c, d;
c = i;
while (c > 0 && !bFound)
{
div_t dv = div(c, 10);
if (std::binary_search(_avoid.cbegin(), _avoid.cend(), dv.rem))
{
bFound = true;
break;
}
c = dv.quot;
}
if (!bFound) return i;
}
return -1;
}
int abc_042_c()
{
std::cin.sync_with_stdio(false);
std::cin.tie(nullptr);
int N, K;
std::cin >> N >> K;
std::vector<int> v(K);
for (auto& e : v) {
std::cin >> e;
}
int answer = getMinNum_div(N, v);
std::cout << answer << std::endl;
return 0;
};
template<typename T>
inline T get_value(std::istream& is)
{
T v;
is >> v;
return v;
}
|
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s014608241
|
p04043
|
C
|
#include <stdio.h>
int main(void)
{
int first,second,third;
scanf("%d,%d,%d",&first,&second,&third);
if(first==5&&second==7&&third==5)printf("YES");
if(first=!5||second=!7||third=!5)printf("NO");
return 0;
}
|
main.c: In function 'main':
main.c:8:32: error: lvalue required as left operand of assignment
8 | if(first=!5||second=!7||third=!5)printf("NO");
| ^
|
s524292918
|
p04043
|
C
|
#include <stdio.h>
int main(void)
{
int first,second,third;
scanf("%d,%d,%d",&first,&second,&third);
if(first==5&&second==7&&third==5)printf("YES");
if(first=!5||second=!7||third=!5)printf("NO");
return 0;
}
|
main.c: In function 'main':
main.c:8:32: error: lvalue required as left operand of assignment
8 | if(first=!5||second=!7||third=!5)printf("NO");
| ^
|
s395988238
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int five=0;
int seven=0;
for(int i=0;i<3;i++){
int num;
cin>>num;
if(num==5) five++;
if(num==7) seven++;
}
if(five==2&&seven==1)
cout<<"YES\n";
else cout<"NO\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:12: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
15 | else cout<"NO\n";
| ~~~~^~~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
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:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
15 | else cout<"NO\n";
| ^~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
15 | else cout<"NO\n";
| ^~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
15 | else cout<"NO\n";
| ^~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
15 | else cout<"NO\n";
| ^~~~~~
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:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
15 | else cout<"NO\n";
| ^~~~~~
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:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
15 | else cout<"NO\n";
| ^~~~~~
/usr/include/c++/14/string_view:680: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> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
15 | else cout<"NO\n";
| ^~~~~~
/usr/include/c++/14/string_view:688: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>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*'
15 | else cout<"NO\n";
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:3874: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>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | else cout<"NO\n";
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | else cout<"NO\n";
| ^~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
15 | else cout<"NO\n";
| ^~~~~~
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:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:15:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
15 | else cout<"NO\n";
| ^~~~~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s524919413
|
p04043
|
C++
|
#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
//#include <stdlib.h>
#include <queue>
#include <list>
#include <vector>
#include <array>
#include <algorithm>
bool compare(const std::string& _lhs, const std::string& _rhs)
{
for (int i = 0; i < _lhs.size(); i++)
{
if (i >= _rhs.size() ) return false;
if (_lhs[i] > _rhs[i]) return false;
else if (_lhs[i] < _rhs[i]) return true;
}
return _lhs.size() <= _rhs.size();
}
int main()
{
int N, L = -1;
std::vector<std::string> inputVector;
std::string first;
std::getline(std::cin, first);
std::istringstream ifst(first);
ifst >> N >> L;
for (int i = 0; i < N; i++)
{
std::string s;
std::getline(std::cin, s);
std::istringstream iss(s);
inputVector.push_back(iss.str());
}
std::sort(inputVector.begin(), inputVector.end(), compare);
std::ostringstream os;
std::copy(inputVector.begin(), inputVector.end(), std::ostream_iterator<std::string>(os));
std::string s = os.str();
std::cout << s << std::endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:49:64: error: 'ostream_iterator' is not a member of 'std'
49 | std::copy(inputVector.begin(), inputVector.end(), std::ostream_iterator<std::string>(os));
| ^~~~~~~~~~~~~~~~
a.cc:11:1: note: 'std::ostream_iterator' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
10 | #include <algorithm>
+++ |+#include <iterator>
11 |
a.cc:49:92: error: expected primary-expression before '>' token
49 | std::copy(inputVector.begin(), inputVector.end(), std::ostream_iterator<std::string>(os));
| ^
|
s206517463
|
p04043
|
C++
|
#include <string>
#include <sstream>
#include <iostream>
#include <queue>
#include <list>
#include <vector>
#include <array>
#include <algorithm>
bool compare(const std::string& _lhs, const std::string& _rhs)
{
for (int i = 0; i < _lhs.size(); i++)
{
if (i >= _rhs.size() ) return false;
if (_lhs[i] > _rhs[i]) return false;
else if (_lhs[i] < _rhs[i]) return true;
}
return _lhs.size() <= _rhs.size();
}
int main()
{
int N, L = -1;
std::vector<std::string> inputVector;
std::string first;
std::getline(std::cin, first);
std::istringstream ifst(first);
ifst >> N >> L;
for (int i = 0; i < N; i++)
{
std::string s;
std::getline(std::cin, s);
std::istringstream iss(s);
inputVector.push_back(iss.str());
}
std::sort(inputVector.begin(), inputVector.end(), compare);
std::ostringstream os;
std::copy(inputVector.begin(), inputVector.end(), std::ostream_iterator<std::string>(os));
std::string s = os.str();
std::cout << s << std::endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:47:64: error: 'ostream_iterator' is not a member of 'std'
47 | std::copy(inputVector.begin(), inputVector.end(), std::ostream_iterator<std::string>(os));
| ^~~~~~~~~~~~~~~~
a.cc:9:1: note: 'std::ostream_iterator' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
8 | #include <algorithm>
+++ |+#include <iterator>
9 |
a.cc:47:92: error: expected primary-expression before '>' token
47 | std::copy(inputVector.begin(), inputVector.end(), std::ostream_iterator<std::string>(os));
| ^
|
s154560887
|
p04043
|
Java
|
import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a,b,c ;
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
if(a==5 && b ==5 && c==7){
System.out.println("YES");
}else if(a==5 && b ==7 && c==5){
System.out.println("YES");
}else if(a==7 && b ==5 && c==5){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
|
Main.java:20: error: reached end of file while parsing
}
^
1 error
|
s209240588
|
p04043
|
C++
|
bla
|
a.cc:1:1: error: 'bla' does not name a type
1 | bla
| ^~~
|
s714302975
|
p04043
|
C++
|
s = input()
if s == '5 5 7' or s == '5 7 5' or s == '7 5 5':
print('YES')
else:
print('NO')
|
a.cc:2:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
2 | if s == '5 5 7' or s == '5 7 5' or s == '7 5 5':
| ^~~~~~~
a.cc:2:25: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
2 | if s == '5 5 7' or s == '5 7 5' or s == '7 5 5':
| ^~~~~~~
a.cc:2:41: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
2 | if s == '5 5 7' or s == '5 7 5' or s == '7 5 5':
| ^~~~~~~
a.cc:3:15: warning: multi-character character constant [-Wmultichar]
3 | print('YES')
| ^~~~~
a.cc:5:15: warning: multi-character character constant [-Wmultichar]
5 | print('NO')
| ^~~~
a.cc:1:1: error: 's' does not name a type
1 | s = input()
| ^
|
s659287853
|
p04043
|
C
|
#include<stdio.h>
int main(void){
int a,b,c;
int trd;
scanf_s("%d %d %d",&a,&b,&c);
if(a>b) {
trd=a;a=b;b=trd;}
if(a==5){
if((b==5 && c==7) || (b==7 && c==5)) printf("YES\n");}
else printf("NO\n");
return 0;
}
|
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d %d",&a,&b,&c);
| ^~~~~~~
| scanf
|
s379843530
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int fv = 0; svn = 0;
vector<int> a(3);
for(int i = 0; i < 3; i++)
cin >> a[i];
for(int i = 0; i < 3; i++){
if(a[i] == 5)
fv++;
else if(a[i] == 7)
svn++;
else {}
}
if(fv == 2 && svn == 1)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:4:13: error: 'svn' was not declared in this scope; did you mean 'sin'?
4 | int fv = 0; svn = 0;
| ^~~
| sin
|
s663488859
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define pb push_back
#define f(i,n) for(i=0;i<n;i++)
#define F(i,a,b) for(i=a;a<=b;i++)
#define arr(a,n) for( i=0;i<n;i++)cin>>a[i];
#define fi first
#define se second
#define mp make_pair
#define mod 1000000007
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
#define vi vector<ll>
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define s() sort(a,a+n);
#define sr() sort(a,a+n,greater<ll>());
#define v() sort(v.begin(),v.end());
#define vr() sort(v.begin(),v.end(),greater<ll>());
#define mod 1000000007
#define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
ll power(ll x,ll y,ll p){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
int main() {
/* #ifndef ONLINE_JUDGE
// for getting input from input.txt
freopen("input.txt", "r", stdin);
// for writing output to output.txt
freopen("output.txt", "w", stdout);
#endif*/
fast();
//ll t;cin>>t;while(t--)
{
ll a[3];
cin>>a[0]>>a[1]>>a[2];
sort(a,a+n);
if(a[0]==5&&a[1]==5&&a[2]==7)
YES
else
NO
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:44:12: error: 'n' was not declared in this scope
44 | sort(a,a+n);
| ^
|
s860325500
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
vector<int> v;
for(int i=0;i<3;i++)
int x=0;cin >> x; v.push_back(x);
sort(v.begin(),v.end());
if(v[0]==5 && v[1]==5 && v[2]==7){cout <<"YES"<<endl;}
else{cout << "NO";}
}
|
a.cc: In function 'int main()':
a.cc:7:20: error: 'x' was not declared in this scope
7 | int x=0;cin >> x; v.push_back(x);
| ^
|
s712721383
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main()
{
int a, b, c;
vector<int> arr(3);
cin >> arr[0] >> arr[1] >> arr[2];
sort(arr.begin(), arr.end());
if (arr[0] == 5 && arr[1] == 5 && arr[2] == 7)
{
cout << "YES" << endl;
}
else
{
cout << "NO" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:9: error: 'vector' was not declared in this scope
7 | vector<int> arr(3);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
2 | using namespace std;
a.cc:7:16: error: expected primary-expression before 'int'
7 | vector<int> arr(3);
| ^~~
a.cc:8:16: error: 'arr' was not declared in this scope
8 | cin >> arr[0] >> arr[1] >> arr[2];
| ^~~
a.cc:9:9: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(arr.begin(), arr.end());
| ^~~~
| short
|
s397212994
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main()
{
int a, b, c;
vector<int> arr(3);
cin>>arr[0]>>arr[1]>>arr[2];
sort(arr.begin(), arr.end());
if(arr[0] == 5 && arr[1] == 5 && arr[2] == 7)
{
cout<<"YES"<<endl;
}
else
{
cout<<"NO"<<endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
7 | vector<int> arr(3);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
2 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
7 | vector<int> arr(3);
| ^~~
a.cc:8:8: error: 'arr' was not declared in this scope
8 | cin>>arr[0]>>arr[1]>>arr[2];
| ^~~
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(arr.begin(), arr.end());
| ^~~~
| short
|
s642917724
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rev(a) (a).rbegin(),(a).rend()
#define pll pair<ll,ll>
#define rep(i,a,b) for(long long i = (a); i <= (b); i++)
ll modi = 1000000007;
bool cp(ll n){
if(n == 1)return false;
else if(n == 2)return true;
else if(n ==3)return true;
for(int i = 2; i*i<=n; i++){
if(n%i == 0){
return false;
}
}
return true;
}
void SforPrime(int n)
{
bool prime[n+1];
memset(prime, true, sizeof(prime));
for (int p=2; p*p<=n; p++)
{
if (prime[p] == true)
{
for (int i=p*p; i<=n; i += p)
prime[i] = false;
}
}
}
ll calPower(ll val, ll n){
ll i = 1;
ll ind = 1;
ll prev = val;
while(val<=n){
if(n%val == 0)ind = i;
val = val*prev;
i++;
}
return i-1;
}
int main(){
//130016239756757
ll arr[3];
cin>>arr[0]>>arr[1]>>arr[2];
sort(arr, arr+n);
if(arr[0] == 5 && arr[1] == 5 && arr[2] == 7){
cout<<"YES"<<endl;
}else cout<<"NO"<<endl;
}
|
a.cc: In function 'int main()':
a.cc:53:19: error: 'n' was not declared in this scope; did you mean 'yn'?
53 | sort(arr, arr+n);
| ^
| yn
|
s557615163
|
p04043
|
Java
|
import java.util.*;
import java.util.ArrayList;
public class Main {
public static void main(String[] args){
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a+b+c == 15){
if(a == 5 || b == 5|| c == 5){
if(a == 7||b==7||c==7){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
}
}
|
Main.java:5: error: cannot find symbol
int a = sc.nextInt();
^
symbol: variable sc
location: class Main
Main.java:6: error: cannot find symbol
int b = sc.nextInt();
^
symbol: variable sc
location: class Main
Main.java:7: error: cannot find symbol
int c = sc.nextInt();
^
symbol: variable sc
location: class Main
3 errors
|
s188105510
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main()
{
int A,B,C;
cin>>A>>B>>C;
if(A=7||5&&B=7||5&&C=7||5)
cout<<"YES";
else
cout<<"NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:15: error: lvalue required as left operand of assignment
7 | if(A=7||5&&B=7||5&&C=7||5)
| ~^~~~~~
|
s981797791
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a;
int b;
int 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;
}
|
a.cc: In function 'int main()':
a.cc:15:6: error: expected '}' at end of input
15 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s389596053
|
p04043
|
C++
|
nums = [int(i) for i in input().split()]
if len(nums) == 3:
if nums.count(5) == 2 and nums.count(7) == 1:
print("YES")
else:
print("NO")
|
a.cc:1:1: error: 'nums' does not name a type
1 | nums = [int(i) for i in input().split()]
| ^~~~
|
s417967795
|
p04043
|
C
|
#include <stdio.h>
int main(void){
int a1,b2,c3,five=0,seven=0;
scanf(%d%d%d,&a1,&b2,&c3);
if(a1==5){
five++;
}else if(a1==7){
seven++;
}
if(b2==5){
five++;
}else if(b2==7){
seven++;
}
if(c3==5){
five++;
}else if(c3==7){
seven++;
}
if(five==2||seven==1){
printf("YES");
}else{
printf("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:4:11: error: expected expression before '%' token
4 | scanf(%d%d%d,&a1,&b2,&c3);
| ^
|
s622993406
|
p04043
|
C++
|
#include<bits/stdc++.h>
#define ll long long
#define hell 1000000007
#define F first
#define re 15000000
#define S second
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define rep(i,a,b) for(ll int i = a;i<b;i++)
#define pi 3.1415926536
#define Mod 998244353
#define endl '\n'
//char a[2000][2000];
using namespace std;
int sum (ll a)
{
int sum =0;
while(a>0)
{
sum = sum + (a%10);
a=a/10;
}
return sum;
}
int count_digit(ll n)
{
int count =0;
while(n>0)
{
n = n/10;
count++;
//count++;
}
return count;
}
int binarySearch(int x,int y ,ll z ,ll v[])
{
int low = x;
int high = y;
int mid = x+(y-x)/2;
while(low<=high)
{
if(v[mid]==z)
return mid;
if(v[mid]<z)
return binarySearch(mid+1,high,z,v);
if(v[mid]>z)
return binarySearch(low,mid-1,z,v);
}
return -1;
}
ll modularExponentiation(ll x,ll n,ll M)
{
if(n==0)
return 1;
else if(n%2 == 0) //n is even
return modularExponentiation((x*x)%M,n/2,M);
else //n is odd
return (x*modularExponentiation((x*x)%M,(n-1)/2,M))%M;
}
ll binaryExponentiation(ll x,ll n)
{
if(n==0)
return 1;
else if(n%2 == 0) //n is even
return binaryExponentiation(x*x,n/2);
else //n is odd
return x*binaryExponentiation(x*x,(n-1)/2);
}
set<ll> s;
//vector<ll> v;
void genrate(ll n,int len,int max)
{
if(len>max)
return ;
s.insert(n);
genrate(n*10+1,len+1,max);
genrate(n*10+0,len+1,max);
}
bool visited[200005];
vector<ll> v[200005];
bool recur[200005];
int c = 0;
void dfs(int x ,int parent)
{
visited[x] = 1;
if(v[x].size() != 2)
c = -1;
for(int i = 0;i<v[x].size();i++){
if(v[x][i] == parent)
continue;
if(visited[v[x][i]] && v[x].size() == 2 && c == 0)
c = 1;
else if(!visited[v[x][i]]){
dfs(v[x][i],x);
}
//return false;
}
}
//memset(level,0,sizeof(level));
/*void topological_sort(int x)
{
visited[x] = 1;
// sort(all(v[x]));
for(int i =0;i<v[x].size();i++)
{
if(visited[v[x][i]]!=1){
//level[v[x][i]] = level[x]+1;
topological_sort(v[x][i]);
}
}
ans.pb(x);
}*/
//char a2001][2001];
///**************** Cycle using DSU *********************///
// vector<int> v[200005];
vector<int> ans(200005,-1);
vector<int> a;
int n;
void bfs(vector<int> &S, vector<int> &E){
vector<int> dis(n+1,-1);
queue<int> Q;
for(int i = 0;i<S.size();i++){
dis[S[i]] = 0;
Q.push(S[i]);
// cout<<a[S[i]]<<" ";
}
// cout<<endl;
while(!Q.empty()){
int x = Q.front();
Q.pop();
for(int j = 0;j<v[x].size();j++){
if(dis[v[x][j]] == -1){
dis[v[x][j]] = dis[x]+1;
Q.push(v[x][j]);
}
}
}
for(int i = 0;i<E.size();i++){
ans[E[i]] = dis[E[i]];
}
return ;
}
vector<int> check;
void gen(int limit,string s){
if(s.size() == limit){
check.pb(s);
return ;
}
gen(limit, s+'0');
gen(limit, s+'1');
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
//std::setprecision(20);
int tests=1;
//freopen("input.txt", "r", stdin);
// cin>>tests;
while(tests--)
{
int a[3];
for(int i = 0;i<3;i++)
cin>>a[i];
sort(a,a+3);
if(a[0] == 5 && a[1] == 5 && a[2] == 7){
cout<<"YES";
}
else
cout<<"NO";
}
}
|
a.cc: In function 'void gen(int, std::string)':
a.cc:152:15: error: no matching function for call to 'std::vector<int>::push_back(std::string&)'
152 | check.pb(s);
| ~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1283 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::vector<int>::value_type&' {aka 'const int&'}
1283 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1300 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::vector<int>::value_type&&' {aka 'int&&'}
1300 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
|
s491594915
|
p04043
|
C++
|
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a*b*c=5*5*7)cout<<"YES";
else cout<<"NO";
}
|
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)cout<<"YES";
| ~~~^~
|
s992724487
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,i;
cin >> a >> b >> c;
if(a>b){
swap = a;
a = b;
b = swap;
}
if(b>c){
swap = a;
a = b;
b = swap;
}
if(a==5 && b==5 && c==7){
cout << "YES" <<endl;
}else{
cout << "NO" <<endl;
}
}
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,i,swap;
cin >> a >> b >> c;
if(a>b){
swap = a;
a = b;
b = swap;
}
if(b>c){
swap = a;
a = b;
b = swap;
}
if(a==5 && b==5 && c==7){
cout << "YES" <<endl;
}else{
cout << "NO" <<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:8:12: error: overloaded function with no contextual type information
8 | swap = a;
| ^
a.cc:10:9: error: cannot resolve overloaded function 'swap' based on conversion to type 'int'
10 | b = swap;
| ^~~~
a.cc:13:12: error: overloaded function with no contextual type information
13 | swap = a;
| ^
a.cc:15:9: error: cannot resolve overloaded function 'swap' based on conversion to type 'int'
15 | b = swap;
| ^~~~
a.cc: At global scope:
a.cc:26:5: error: redefinition of 'int main()'
26 | int main() {
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main() {
| ^~~~
|
s471302362
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c,i;
cin >> a >> b >> c;
if(a>b){
swap = a;
a = b;
b = swap;
}
if(b>c){
swap = a;
a = b;
b = swap;
}
if(a==5 && b==5 && c==7){
cout << "YES" <<endl;
}else{
cout << "NO" <<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:8:12: error: overloaded function with no contextual type information
8 | swap = a;
| ^
a.cc:10:9: error: cannot resolve overloaded function 'swap' based on conversion to type 'int'
10 | b = swap;
| ^~~~
a.cc:13:12: error: overloaded function with no contextual type information
13 | swap = a;
| ^
a.cc:15:9: error: cannot resolve overloaded function 'swap' based on conversion to type 'int'
15 | b = swap;
| ^~~~
|
s406541542
|
p04043
|
C++
|
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> vec(3);
for (int i = 0; i < 3; i++) cin >> vec.at(i);
sort(vec.begin(), vec.end());
if (vec[0] == vec[1] && vec[0] == 5 && vec[2] == 7) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:5: error: 'sort' was not declared in this scope; did you mean 'short'?
8 | sort(vec.begin(), vec.end());
| ^~~~
| short
|
s217920835
|
p04043
|
C++
|
#include <iostream>
#include <vector>
using namespace std;
int main(){
int num;
vector<int> syllables;
for(int i=1; i<=3; i++){
cin >> num;
syllables.push_back(num);
}
sort(syllables.begin(), syllables.end());
if(syllables[0] == 5 && syllables[1] == 5 && syllables[2] == 7)
cout << "YES";
else
cout << "NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
15 | sort(syllables.begin(), syllables.end());
| ^~~~
| short
|
s060765971
|
p04043
|
C++
|
#include<bits/stdc++.h>
// Competetive Template:
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ldb;
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define ba back
#define si size()
#define be begin()
#define en end()
#define le length()
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define gcd __gcd
#define maxe *max_element
#define mine *min_element
#define forz(i,n) for(long long int i=0;i<n;i++)
#define rep(i,k,n) for (lli i = k; i <= n; i++)
#define deci(n) fixed<<setprecision(n)
#define high(n) __builtin_popcount(n)
#define parity(n) __builtin_parity(n)
#define ctz(n) __builtin_ctz(n)
#define mod 1000000007
#define mod2 998244353
#define kira ios::sync_with_stdio(0), cin.tie(0),cout.tie(0)
#define randomINIT mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
using namespace std;
typedef pair <lli,lli> pll;
// CODE BEGINS :
lli log3(lli x)
{
return (lli)((double)log((double)x)/log((double)3));
}
int main()
{
kira; randomINIT;
lli t;
forz(i,3)
{
cin>>t; v.pb(t);
}
sort(v.be, v.en);
if(v[0]==5 && v[1]==5 && v[2]==7)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:54:13: error: 'v' was not declared in this scope
54 | cin>>t; v.pb(t);
| ^
a.cc:57:8: error: 'v' was not declared in this scope
57 | sort(v.be, v.en);
| ^
|
s449010694
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> w(3);
for(int i=0;i<3;i++){
cin >> w.at(i);
}
bool answer = 0
if((w.at(1)==5 && w.at(2)==5 && w.at(3)==7)||
(w.at(1)==5 && w.at(2)==7 && w.at(3)==5)||
(w.at(1)==7 && w.at(2)==5 && w.at(3)==5)){
answer = 1 }
if(answer){
cout << "YES"<< endl;}
else{
cout << "NO" <<endl;}
}
|
a.cc: In function 'int main()':
a.cc:10:5: error: expected ',' or ';' before 'if'
10 | if((w.at(1)==5 && w.at(2)==5 && w.at(3)==7)||
| ^~
|
s085425106
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> w.at(3);
for(int i=0;i<3;i++){
cin >> w.at(i);
}
bool answer = 0
if((w.at(1)==5 && w.at(2)==5 && w.at(3)==7)||
(w.at(1)==5 && w.at(2)==7 && w.at(3)==5)||
(w.at(1)==7 && w.at(2)==5 && w.at(3)==5)){
answer = 1 }
if(answer){
cout << "YES"<< endl;}
else{
cout << "NO" <<endl;}
}
|
a.cc: In function 'int main()':
a.cc:5:16: error: expected initializer before '.' token
5 | vector<int> w.at(3);
| ^
a.cc:7:12: error: 'w' was not declared in this scope
7 | cin >> w.at(i);
| ^
a.cc:10:5: error: expected ',' or ';' before 'if'
10 | if((w.at(1)==5 && w.at(2)==5 && w.at(3)==7)||
| ^~
|
s312231956
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> w(3);
for(int i=0;i<3;i++){
cin >> w.at(i) >> endl;
}
bool answer = 0
if((w.at(1)==5 && w.at(2)==5 && w.at(3)==7)||
(w.at(1)==5 && w.at(2)==7 && w.at(3)==5)||
(w.at(1)==7 && w.at(2)==5 && w.at(3)==5)){
answer = 1 }
if(answer){
cout << "YES"<< endl;}
else{
cout << "NO" <<endl;}
}
|
a.cc: In function 'int main()':
a.cc:7:20: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>')
7 | cin >> w.at(i) >> endl;
| ~~~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '
|
s079535758
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> w.at(3);
for(int i=0;i<3;i++){
cin >> w.at(i) >> endl;
}
bool answer = 0
if((w.at(1)==5 && w.at(2)==5 && w.at(3)==7)||
(w.at(1)==5 && w.at(2)==7 && w.at(3)==5)||
(w.at(1)==7 && w.at(2)==5 && w.at(3)==5)){
answer = 1 }
if(answer){
cout << "YES"<< endl;}
else{
cout << "NO" <<endl;}
}
|
a.cc: In function 'int main()':
a.cc:5:16: error: expected initializer before '.' token
5 | vector<int> w.at(3);
| ^
a.cc:7:12: error: 'w' was not declared in this scope
7 | cin >> w.at(i) >> endl;
| ^
a.cc:10:5: error: expected ',' or ';' before 'if'
10 | if((w.at(1)==5 && w.at(2)==5 && w.at(3)==7)||
| ^~
|
s919341180
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
map<int> m;
int a;
for(int i=0;i<3;++i){
cin >> a;
++m[a];
}
if(m[5] == 2 && m[7] == 1) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:10: error: wrong number of template arguments (1, should be at least 2)
5 | map<int> m;
| ^
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
102 | class map
| ^~~
a.cc:9:8: error: invalid types 'int[int]' for array subscript
9 | ++m[a];
| ^
a.cc:11:7: error: invalid types 'int[int]' for array subscript
11 | if(m[5] == 2 && m[7] == 1) cout << "YES" << endl;
| ^
a.cc:11:20: error: invalid types 'int[int]' for array subscript
11 | if(m[5] == 2 && m[7] == 1) cout << "YES" << endl;
| ^
|
s845826106
|
p04043
|
C
|
int main(void){
char A;
char B;
char C;
scanf("%c,%c,%c",&A,&B,&C);
if ( A == array[5], B == array[7], C == array[5]){
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | scanf("%c,%c,%c",&A,&B,&C);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(void){
main.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
7 | scanf("%c,%c,%c",&A,&B,&C);
| ^~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:15: error: 'array' undeclared (first use in this function)
9 | if ( A == array[5], B == array[7], C == array[5]){
| ^~~~~
main.c:9:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
10 | printf("YES\n");
| ^~~~~~
main.c:10:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
12 | printf("NO\n");
| ^~~~~~
main.c:12:5: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s952887139
|
p04043
|
C
|
include<stdio.h>
int main(void){
char A;
char B;
char C;
scanf("%c,%c,%c",&A,&B,&C);
if ( A == array[5], B == array[7], C == array[5]){
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s462093447
|
p04043
|
C
|
include<stdio.h>
int main(void){
int A;
int B;
int C;
scanf("%d%d%d",&A,&B,&C);
if ( A == 5, B == 7, C == 5){
printf("YES\n");
} else {
printf("NO\n");
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s824732761
|
p04043
|
C++
|
#include<iostream>
#include<vector>
int five_count = 0;
int seven_count = 0;
int main() {
std::vector<std::string> lines(3);
for (int i=0; i<3; i++) {
std::cin >> lines[i];
if (lines[i].size() == 5) five_count++;
else if (lines[i]size() == 7) seven_count++;
}
if (five_count == 2 && seven_count == 1) std::cout << "YES" << std::endl;
else std::cout << "NO" << std::endl;
}
|
a.cc: In function 'int main()':
a.cc:14:26: error: expected ')' before 'size'
14 | else if (lines[i]size() == 7) seven_count++;
| ~ ^~~~
| )
a.cc:14:37: error: could not convert 'lines.std::vector<std::__cxx11::basic_string<char> >::operator[](((std::vector<std::__cxx11::basic_string<char> >::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
14 | else if (lines[i]size() == 7) seven_count++;
| ^
| |
| __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type {aka std::__cxx11::basic_string<char>}
|
s045819697
|
p04043
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int a[3] = 0;
cin >> a[0] >> a[1] >> a[2];
sort(a, a+3);
if(a[0] == 5 && a[1] == 5 && a[2] == 7)
cout << "YES";
else
cout << "NO";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:20: error: array must be initialized with a brace-enclosed initializer
8 | int a[3] = 0;
| ^
|
s711780971
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main(){
vector<int> vec(3);
for (int i=0; i<3; i++){
cin >> vec.at(i);
}
sort(vec.begin(),vec.end());
if (vec.at(0)==5 && vec.at(1)==5 && vec.at(2)==7){
return "YES";
}
else {
return "NO";
}
}
|
a.cc: In function 'int main()':
a.cc:15:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
15 | return "YES";
| ^~~~~
| |
| const char*
a.cc:18:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
18 | return "NO";
| ^~~~
| |
| const char*
|
s091225425
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c
if(a == 5 && b == 5 & c == 7)
cout<<"YES"<<endl;
else if(a == 5 && b == 7 & c == 5)
cout<<"YES"<<endl;
else if(a == 7 && b == 5 & c == 5)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
|
a.cc: In function 'int main()':
a.cc:6:15: error: expected ';' before 'if'
6 | cin>>a>>b>>c
| ^
| ;
7 | if(a == 5 && b == 5 & c == 7)
| ~~
a.cc:9:3: error: 'else' without a previous 'if'
9 | else if(a == 5 && b == 7 & c == 5)
| ^~~~
|
s041628392
|
p04043
|
C++
|
a=[int(i) for i in input().split()]
a.sort()
if a=[5, 5, 7]:
print("YES")
else print("NO"):
|
a.cc:1:1: error: 'a' does not name a type
1 | a=[int(i) for i in input().split()]
| ^
|
s569335749
|
p04043
|
C++
|
a=[int(i) for i in input().split()]
a.sort()
if a=[5, 5, 7]
print(YES);
else print(NO);
|
a.cc:1:1: error: 'a' does not name a type
1 | a=[int(i) for i in input().split()]
| ^
a.cc:5:1: error: expected unqualified-id before 'else'
5 | else print(NO);
| ^~~~
|
s702501283
|
p04043
|
C++
|
a=[int(i) for i in input().split()]
a.sort()
if a=[5, 5, 7]
print(YES)
else print(NO)
|
a.cc:1:1: error: 'a' does not name a type
1 | a=[int(i) for i in input().split()]
| ^
|
s213324070
|
p04043
|
C++
|
a=[int(i) for i in input().split()]
a.sort()
if a=[5, 5, 7]
|
a.cc:1:1: error: 'a' does not name a type
1 | a=[int(i) for i in input().split()]
| ^
|
s279965146
|
p04043
|
Java
|
public class Main{
public static void main(String [] args)throws Exception{
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
String [] inp = br.readLine();
int a = Integer.parseInt(inp[0]);
int b = Integer.parseInt(inp[1]);
int c = Integer.parseInt(inp[2]);
if(a<5||a>7||b<5||b>7||c<5||c>7){
System.out.println("NO");
}else if((a+b+c)=17){
if(a!=6 &&b!=6 && c!=6){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
else{
System.out.println("NO");
}
}
}
|
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
Main.java:11: error: unexpected type
}else if((a+b+c)=17){
^
required: variable
found: value
4 errors
|
s652454757
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C ;
if(A=5,B=5,C=7){
cout << "OK" << endl;
}
if(A=5,B=7,C=5){
cout << "OK" << endl;
}
if(A=7,B=5,C=5){
cout << "OK" << endl;
}
else if{
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:22:10: error: expected '(' before '{' token
22 | else if{
| ^
| (
|
s861230189
|
p04043
|
Java
|
package app;
import java.util.*;
public class App {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int[] a = new int[3];
int five = 0;
int seven = 0;
for(int i = 0; i < a.length; i++){
// System.out.println(i + "文字目を入力してください");
a[i] = sc.nextInt();
}
for(int i = 0; i < a.length; i++){
if(a[i] == 5){
five++;
} else if(a[i] == 7){
seven++;
}
}
if(five == 2 && seven == 1){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
|
Main.java:3: error: class App is public, should be declared in a file named App.java
public class App {
^
1 error
|
s561770853
|
p04043
|
Java
|
package app;
import java.util.*;
public class App {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int[] a = new int[3];
for(int i = 0; i < a.length; i++){
System.out.println(i + "文字目を入力してください");
a[i] = sc.nextInt();
}
int five = 0;
int seven = 0;
for(int i = 0; i<a.length; i++){
if(a[i] == 5){
five++;
} else if(a[i] == 7){
seven++;
}
}
if(five == 2 && seven == 1){
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:5: error: class App is public, should be declared in a file named App.java
public class App {
^
1 error
|
s101329274
|
p04043
|
Java
|
package app;
import java.util.*;
public class App {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int[] a = new int[3];
for(int i = 0; i < a.length; i++){
System.out.println(i + "文字目を入力してください");
a[i] = sc.nextInt();
}
int five = 0;
int seven = 0;
for(int i = 0; i<a.length; i++){
if(a[i] == 5){
five++;
} else if(a[i] == 7){
seven++;
}
}
if(five == 2 && seven == 1){
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:5: error: class App is public, should be declared in a file named App.java
public class App {
^
1 error
|
s614302188
|
p04043
|
C++
|
#include <iostream>
#include <conio.h>
using namespace std;
int main(void)
{
int sevencnt = 0, fivecnt = 0;
int num[3];
for (int i = 0; i < 3; i++)
{
cin >> num[i];
}
for (int i = 0; i < 3; i++)
{
if (num[i] == 7)
{
sevencnt++;
}
else if (num [i] == 5)
{
fivecnt++;
}
}
if (fivecnt == 2 && sevencnt == 1)
{
cout << "YES" << endl;
}
else
{
cout << "NO" << endl;
}
_getch();
}
|
a.cc:2:10: fatal error: conio.h: No such file or directory
2 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s391274498
|
p04043
|
C++
|
#incloud <iostream>
void input();
using namespace std;
int main(void)
{
int sevencnt =0,fivecnt =0;
int num[3]
for(int i; i < 3; i++)
{
cin << num[i];
}
for(int i; i < 3; i++)
{
if(num[i] == 7)
{
sevencnt++;
}
else if(num i == 5)
{
fivecnt++;
}
}
if(fivecnt == 2 && sevencnt ==1)
{
Cout >> "YES" >> endl;
}
else
{
Cout >> "NO" >> endl;
}
}
|
a.cc:1:2: error: invalid preprocessing directive #incloud; did you mean #include?
1 | #incloud <iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'for'
10 | for(int i; i < 3; i++)
| ^~~
a.cc:10:16: error: 'i' was not declared in this scope
10 | for(int i; i < 3; i++)
| ^
a.cc:17:20: error: 'num' was not declared in this scope; did you mean 'enum'?
17 | if(num[i] == 7)
| ^~~
| enum
a.cc:21:19: error: expected ')' before 'i'
21 | else if(num i == 5)
| ~ ^~
| )
a.cc:29:6: error: 'Cout' was not declared in this scope
29 | Cout >> "YES" >> endl;
| ^~~~
a.cc:29:23: error: 'endl' was not declared in this scope
29 | 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 | #incloud <iostream>
a.cc:33:5: error: 'Cout' was not declared in this scope
33 | Cout >> "NO" >> endl;
| ^~~~
a.cc:33:21: error: 'endl' was not declared in this scope
33 | Cout >> "NO" >> endl;
| ^~~~
a.cc:33:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s537917657
|
p04043
|
C
|
<stdio.h>
int main(int A,B,C){
int i=0;
if(A==5){
if(B==5){
if(C==7){
printf("YES");
i++;
}
}else if(B==7){
if(C==5){
printf("YES");
i++;
}
}
}else if(A==7){
if(B==5){
if(C==5){
printf("YES");
i++;
}
}
}else if(i==0){
printf("NO");
}
}
|
main.c:1:1: error: expected identifier or '(' before '<' token
1 | <stdio.h>
| ^
|
s194859998
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a+b+c == 17){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl
}
}
|
a.cc: In function 'int main()':
a.cc:12:25: error: expected ';' before '}' token
12 | cout<<"NO"<<endl
| ^
| ;
13 | }
| ~
|
s120081333
|
p04043
|
C++
|
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
using namespace std;
//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}
//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))
//debug
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
int main(){
int A,B,C;
cin >> A >> B >> C:
bool act=false;
if(A==5 && B==5 && C==7){
act=true;
}
if(A==5 && B==7 && C==5){
act=true;
}
if(A==7 && B==5 && C==5){
act=true;
}
if(act){
cout << "YES";
}
else{
cout << "NO";
}
}
|
a.cc: In function 'int main()':
a.cc:76:23: error: expected ';' before ':' token
76 | cin >> A >> B >> C:
| ^
| ;
a.cc:79:9: error: 'act' was not declared in this scope
79 | act=true;
| ^~~
a.cc:82:9: error: 'act' was not declared in this scope
82 | act=true;
| ^~~
a.cc:85:9: error: 'act' was not declared in this scope
85 | act=true;
| ^~~
a.cc:87:8: error: 'act' was not declared in this scope
87 | if(act){
| ^~~
|
s133669810
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
// types
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
typedef vector<ll> vll;
// macros
#define ALL(a) a.begin(),a.end()
#define SZ(a) ((int)a.size())
#define FI first
#define SE second
#define REP(i,n) for(int i=0;i<((int)n);i++)
#define REP1(i,n) for(int i=1;i<((int)n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define PB push_back
#define EB emplace_back
#define MP(a,b) make_pair(a,b)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double eps = 1e-10;
const int MOD = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll a,b,c;
cin >> a >> b >> c;
mat<ll, ll> s;
s[a] += 1;
s[b] += 1;
s[c] += 1;
if(s[5]==2 && s[7] == 1)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:44:3: error: 'mat' was not declared in this scope
44 | mat<ll, ll> s;
| ^~~
a.cc:44:9: error: expected primary-expression before ',' token
44 | mat<ll, ll> s;
| ^
a.cc:44:13: error: expected primary-expression before '>' token
44 | mat<ll, ll> s;
| ^
a.cc:44:15: error: 's' was not declared in this scope
44 | mat<ll, ll> s;
| ^
|
s559899252
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
// types
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
typedef vector<ll> vll;
// macros
#define ALL(a) a.begin(),a.end()
#define SZ(a) ((int)a.size())
#define FI first
#define SE second
#define REP(i,n) for(int i=0;i<((int)n);i++)
#define REP1(i,n) for(int i=1;i<((int)n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define PB push_back
#define EB emplace_back
#define MP(a,b) make_pair(a,b)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double eps = 1e-10;
const int MOD = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll a,b,c;
cin >> a >> b >> c;
mat<ll, ll> s;
s[a] += 1;
s[b] += 1;
s[c] += 1;
if(mat[5]==2 && mat[7] == 1)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
|
a.cc: In function 'int main()':
a.cc:44:3: error: 'mat' was not declared in this scope
44 | mat<ll, ll> s;
| ^~~
a.cc:44:9: error: expected primary-expression before ',' token
44 | mat<ll, ll> s;
| ^
a.cc:44:13: error: expected primary-expression before '>' token
44 | mat<ll, ll> s;
| ^
a.cc:44:15: error: 's' was not declared in this scope
44 | mat<ll, ll> s;
| ^
|
s194201063
|
p04043
|
C++
|
#include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int> haiku(3);
sort(haiku.begin(),haiku.end());
if(haiku[0] == 7 && haiku[1] == 5 ){
if(haiku[2] == 5)cout << "YES" <<endl;
else cout << "NO" <<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:7:5: error: 'sort' was not declared in this scope; did you mean 'short'?
7 | sort(haiku.begin(),haiku.end());
| ^~~~
| short
|
s874482030
|
p04043
|
C
|
#include<stdio.h>
int main() {
int A, B, C = 0;
scanf_s("%d %d %d", &A, &B, &C);
if (A==B==5,C==7 || B==C==5,A==7 || A==C==5,B==7 ) {
printf("YES");
}
else {
printf("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d %d", &A, &B, &C);
| ^~~~~~~
| scanf
|
s567962152
|
p04043
|
C
|
#include<stdio.h>
int main() {
int A, B, C = 0;
scanf_s("%d %d %d", &A, &B, &C);
if (A==B==5,C==7 ||B==C==5,A==7 || A==C==5,B==7 ) {
printf("YES");
}
else {
printf("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d %d", &A, &B, &C);
| ^~~~~~~
| scanf
|
s766454454
|
p04043
|
C
|
#include<stdio.h>
int main() {
int A, B, C = 0;
scanf_s("%d %d %d", &A, &B, &C);
if (A==B==5,C==7 ||B==C==5,A==7 || A==C==5,B==7 ) {
printf("YES");
}
else {
printf("NO");
}
return 0;
}
|
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d %d", &A, &B, &C);
| ^~~~~~~
| scanf
|
s857236232
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b=0,c=0;
for(int i=0;i<3;i++){
cin>>a;
if(a==5){
b++;
}
else if(a==7){
c++;
}
cout<<a;
}
if(b==2&&c==1){
cout << "YES";
}
else{
cout << "NO";
}
|
a.cc: In function 'int main()':
a.cc:20:4: error: expected '}' at end of input
20 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s380257024
|
p04043
|
C++
|
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main{
vector <int> a(3);
for(int i=0;i<3;i++){
cin >> a[i];
}
sort(a.begin(),a.end());
if(a[0]==5&&a[1]==a[2]&&a[1]==7){
cout << "YES";
}
else{
cout << "NO";
}
return 0;
}
|
a.cc:5:5: error: cannot declare '::main' to be a global variable
5 | int main{
| ^~~~
a.cc:6:16: error: expected primary-expression before 'a'
6 | vector <int> a(3);
| ^
a.cc:6:16: error: expected '}' before 'a'
a.cc:5:9: note: to match this '{'
5 | int main{
| ^
a.cc:7:3: error: expected unqualified-id before 'for'
7 | for(int i=0;i<3;i++){
| ^~~
a.cc:7:15: error: 'i' does not name a type
7 | for(int i=0;i<3;i++){
| ^
a.cc:7:19: error: 'i' does not name a type
7 | for(int i=0;i<3;i++){
| ^
a.cc:10:7: error: expected constructor, destructor, or type conversion before '(' token
10 | sort(a.begin(),a.end());
| ^
a.cc:11:3: error: expected unqualified-id before 'if'
11 | if(a[0]==5&&a[1]==a[2]&&a[1]==7){
| ^~
a.cc:14:3: error: expected unqualified-id before 'else'
14 | else{
| ^~~~
a.cc:17:3: error: expected unqualified-id before 'return'
17 | return 0;
| ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s993846241
|
p04043
|
C++
|
// /^>》, -―‐‐<^}
// ./:::::/,≠´:::::;:::ヽ
// /::::::〃:::::::::/:丿ハ
// ./:::::::i{l|:::::/ }::::}
// /:::::::::瓜イ-‐ ´‐ ,'::ノ
// ./:::::::::|ノヘ{、 (フ _ノノ:::イ
// |:::::::::::|/}` ス/ ̄ ̄ ̄ ̄ ̄/
//. |:::::::::|(_::::つ/ FMV / カタカタ
//. ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄\/_____/ ̄ ̄
|
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s531530710
|
p04043
|
C++
|
// /^>》, -―‐‐<^}
// ./:::::/,≠´:::::;:::ヽ
// /::::::〃:::::::::/:丿ハ
// ./:::::::i{l|:::::/ }::::}
// /:::::::::瓜イ-‐ ´‐ ,'::ノ
// ./:::::::::|ノヘ{、 (フ _ノノ:::イ
// |:::::::::::|/}`ス/ ̄ ̄ ̄ ̄ ̄/
//. |:::::::::|(_::::つ/ FMV / カタカタ
//. ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄\/_____/ ̄ ̄ ̄ ̄ ̄
|
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s353242460
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++) //repマクロ
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) //多倍長
#define all(x) (x).begin(), (x).end() //先頭と最後を渡す
#define SZ(x) ((int)(x).size()) //sizeの返り値をunsigned int型からint型にする
//短くするだけ
#define pb push_back
#define mp make_pair
// 名前の変更
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define cauto const auto & //これいる?
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()); //なにこれ
#define itn int //これいる?
// longlong型を省略して
typedef long long lint;
/* 最大値を更新するテンプレート */
template <class T>
bool umax(T &a, const T &b)
{
if (a < b)
{
a = b;
return 1;
}
return 0;
}
/* 最小値を更新するテンプレ */
template <class T>
bool umin(T &a, const T &b)
{
if (b < a)
{
a = b;
return 1;
}
return 0;
}
int main()
{
int a[3];
scanf("%d %d %d" a[0], a[1], a[2]);
if (a[0] > a[1])
{
int temp = a[0];
a[0] = a[1];
a[1] = temp;
}
if (a[0] > a[2])
{
int temp = a[0];
a[0] = a[2];
a[2] = temp;
}
if (a[0] == 5 && a[1] == 7 && a[2] == 7)
{
printf("YES\n");
}
else
{
printf("NO\n");
}
}
|
a.cc: In function 'int main()':
a.cc:51:19: error: expected ')' before 'a'
51 | scanf("%d %d %d" a[0], a[1], a[2]);
| ~ ^~
| )
|
s111561738
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++) //repマクロ
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) //多倍長
#define all(x) (x).begin(), (x).end() //先頭と最後を渡す
#define SZ(x) ((int)(x).size()) //sizeの返り値をunsigned int型からint型にする
//短くするだけ
#define pb push_back
#define mp make_pair
// 名前の変更
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define cauto const auto & //これいる?
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()); //なにこれ
#define itn int //これいる?
// longlong型を省略して
typedef long long lint;
/* 最大値を更新するテンプレート */
template <class T>
bool umax(T &a, const T &b)
{
if (a < b)
{
a = b;
return 1;
}
return 0;
}
/* 最小値を更新するテンプレ */
template <class T>
bool umin(T &a, const T &b)
{
if (b < a)
{
a = b;
return 1;
}
return 0;
}
int main()
{
int a[3]
scanf("%d %d %d" a[0], a[1], a[2]);
if(a[0] > a[1]){
int temp = a[0];
a[0] = a[1];
a[1] = temp;
}
if (a[0] > a[2])
{
int temp = a[0];
a[0] = a[2];
a[2] = temp;
}
if(a[0] == 5 && a[1] == 7 && a[2] == 7){
printf("YES\n");
}
else {
printf("NO\n");
}
}
|
a.cc: In function 'int main()':
a.cc:51:3: error: expected initializer before 'scanf'
51 | scanf("%d %d %d" a[0], a[1], a[2]);
| ^~~~~
a.cc:52:6: error: 'a' was not declared in this scope
52 | if(a[0] > a[1]){
| ^
a.cc:57:7: error: 'a' was not declared in this scope
57 | if (a[0] > a[2])
| ^
a.cc:63:6: error: 'a' was not declared in this scope
63 | if(a[0] == 5 && a[1] == 7 && a[2] == 7){
| ^
|
s422695948
|
p04043
|
C++
|
#include <iosteam>
int main() {
int a, b, c; cin >> a >> b >> c;
if ((a == 7 && b == 5 && c == 5)
|| (a == 5 && b == 7 && c == 5)
|| (a == 5 && b == 5 && c == 7)) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
|
a.cc:1:10: fatal error: iosteam: No such file or directory
1 | #include <iosteam>
| ^~~~~~~~~
compilation terminated.
|
s398346055
|
p04043
|
C
|
#include<stdio.h>
int main() {
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if (((A == B) && (A != C)) || ((A == C) && (A != B)) || ((B == C) && (B != A)) {
printf("yes")
}
else {
printf("no")
}
|
main.c: In function 'main':
main.c:5:95: error: expected ')' before '{' token
5 | if (((A == B) && (A != C)) || ((A == C) && (A != B)) || ((B == C) && (B != A)) {
| ~ ^~
| )
main.c:10:1: error: expected declaration or statement at end of input
10 | }
| ^
|
s128575715
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
int A, B, C;
cin >> A >> B >> C;
if (A + B + C == 17 && (max({ A, B, C }) == 7) && (min({ A, B, C }) == 5)
){cout << "YES" << endl;
}
else cout << "NO" << endl;
|
a.cc: In function 'int main()':
a.cc:14:35: error: expected '}' at end of input
14 | else cout << "NO" << endl;
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s574539432
|
p04043
|
Java
|
import java.io.*;
class Main {
public static void main() {
String a,b,c;
try{
BufferedReader br
= new BufferedReader(new InputStreamReader(System.in));
a = br.readLine();
b = br.readLine();
c = br.readLine();
String s = a+b+c;
} catch(Exception e) {
}
if(s == "557" || s == "575" || s == "755") {
System.out.print("YES");
} else {
System.out.print("NO");
}
}
}
|
Main.java:17: error: cannot find symbol
if(s == "557" || s == "575" || s == "755") {
^
symbol: variable s
location: class Main
Main.java:17: error: cannot find symbol
if(s == "557" || s == "575" || s == "755") {
^
symbol: variable s
location: class Main
Main.java:17: error: cannot find symbol
if(s == "557" || s == "575" || s == "755") {
^
symbol: variable s
location: class Main
3 errors
|
s581244226
|
p04043
|
Java
|
import java.io.*;
class Main {
public static void main() {
String a,b,c;
BufferedReader br
= new BufferedReader(new InputStreamReader(System.in));
a = br.readLine();
b = br.readLine();
c = br.readLine();
String s = a+b+c;
if(s == "557" || s == "575" || s == "755") {
System.out.print("YES");
} else {
System.out.print("NO");
}
}
}
|
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
a = br.readLine();
^
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown
b = br.readLine();
^
Main.java:10: error: unreported exception IOException; must be caught or declared to be thrown
c = br.readLine();
^
3 errors
|
s108817640
|
p04043
|
Java
|
import java.io.*;
class Main {
public static void main() {
int a,b,c;
String buf;
BufferedReader br
= new BufferedReader(new InputStreamReader(System.in));
buf = br.readLine();
a = Integer.parseInt(buf);
buf = br.readLine();
b = Integer.parseInt(buf);
buf = br.readLine();
c = Integer.parseInt(buf);
String s1 = a+b+c;
if(s == 557 || s == 575 || s == 755) {
System.out.print("YES");
} else {
System.out.print("NO");
}
}
}
|
Main.java:15: error: incompatible types: int cannot be converted to String
String s1 = a+b+c;
^
Main.java:16: error: cannot find symbol
if(s == 557 || s == 575 || s == 755) {
^
symbol: variable s
location: class Main
Main.java:16: error: cannot find symbol
if(s == 557 || s == 575 || s == 755) {
^
symbol: variable s
location: class Main
Main.java:16: error: cannot find symbol
if(s == 557 || s == 575 || s == 755) {
^
symbol: variable s
location: class Main
4 errors
|
s213331680
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
int A, B, C;
cin >> A, B, C;
if (A + B + C == 17 && max(A, B, C) == 7 && min(A, B, C) == 5)cout << 'YES' << endl;
else cout << 'NO' << ;
return 0;
}
|
a.cc:9:79: warning: multi-character character constant [-Wmultichar]
9 | if (A + B + C == 17 && max(A, B, C) == 7 && min(A, B, C) == 5)cout << 'YES' << endl;
| ^~~~~
a.cc:10:22: warning: multi-character character constant [-Wmultichar]
10 | else cout << 'NO' << ;
| ^~~~
a.cc: In function 'int main()':
a.cc:10:30: error: expected primary-expression before ';' token
10 | else cout << 'NO' << ;
| ^
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:28: required from here
9 | if (A + B + C == 17 && max(A, B, C) == 7 && min(A, B, C) == 5)cout << 'YES' << endl;
| ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
306 | if (__comp(__a, __b))
| ~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:49: required from here
9 | if (A + B + C == 17 && max(A, B, C) == 7 && min(A, B, C) == 5)cout << 'YES' << endl;
| ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
284 | if (__comp(__b, __a))
| ~~~~~~^~~~~~~~~~
|
s208720806
|
p04043
|
C++
|
#include <iostream>
int main()
{
int arr[3];
for (int i = 0 ; i < 3 ; ++i)std::cin >> arr[3];
int 5c = 0 , 7c = 0;
bool d = false;
for (int i :arr)
{
if (i!= 7 && i != 5)
{
std::cout << "NO";
d = true;
break;
}
else
{
if (i == 5)
{
if (5c > 2)
{
std::cout << "NO";
d = true;
break;
}
++5c;
}
if (i == 7)
{
if (7c >1)
{
std::cout << "NO";
d = true;
break;
}
++7c;
}
}
}
if (!d)std::cout << "YES";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:7: error: expected unqualified-id before numeric constant
7 | int 5c = 0 , 7c = 0;
| ^~
a.cc:21:13: error: unable to find numeric literal operator 'operator""c'
21 | if (5c > 2)
| ^~
a.cc:27:11: error: unable to find numeric literal operator 'operator""c'
27 | ++5c;
| ^~
a.cc:31:13: error: unable to find numeric literal operator 'operator""c'
31 | if (7c >1)
| ^~
a.cc:37:11: error: unable to find numeric literal operator 'operator""c'
37 | ++7c;
| ^~
|
s846627083
|
p04043
|
Java
|
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
sc.close();
if(A + B + C == 19 && (( A == 7 || A == 5 ) && ( B == 7 || B == 5 ) && ( C == 7 || C == 5 ))){
System.out.println("YES");
}else {
System.out.println("NO");
}
}
|
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String args[]){
^
(use --enable-preview to enable unnamed classes)
1 error
|
s846221144
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
string ans = "NO";
if (a == 5 && b == 7 && c == 7) ans = "YES";
if (a == 7 && b == 5 && c == 7) ans = "YES";
if (a == 7 && b == 7 && c == 5) ans = "YES";
}
cout << ans << endl;
}
|
a.cc:12:3: error: 'cout' does not name a type
12 | cout << ans << endl;
| ^~~~
a.cc:13:1: error: expected declaration before '}' token
13 | }
| ^
|
s470358191
|
p04043
|
C
|
#include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a+b+c=17&&a*b*c=395){
printf("YES\n");
}else{
printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:5:21: error: lvalue required as left operand of assignment
5 | if(a+b+c=17&&a*b*c=395){
| ^
|
s592916117
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b,c;
cin>>a>>b>>c;
if (a==7&&b==5&&c==5||a==&&b==7&&c==5||a==5&&b==5&&c==7){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:7:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | if (a==7&&b==5&&c==5||a==&&b==7&&c==5||a==5&&b==5&&c==7){
| ~^~~~~
a.cc:7:32: error: label 'b' used but not defined
7 | if (a==7&&b==5&&c==5||a==&&b==7&&c==5||a==5&&b==5&&c==7){
| ^
|
s050334890
|
p04043
|
C++
|
int main() {
int five(0), seven(0), temp, t(3);
while (t--) {
scanf("%d", &temp);
if (temp != 5 && temp != 7) {
std::cout << "NO\n";
break;
} else {
temp == 5 ? five ^= 5 : seven ^= 7;
}
}
std::cout << (!five && seven ? "YES\n" : "NO\n");
return 0;
}
|
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
5 | scanf("%d", &temp);
| ^~~~~
a.cc:7:12: error: 'cout' is not a member of 'std'
7 | std::cout << "NO\n";
| ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int main() {
a.cc:13:8: error: 'cout' is not a member of 'std'
13 | std::cout << (!five && seven ? "YES\n" : "NO\n");
| ^~~~
a.cc:13:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.