submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s626618766
p04043
C++
dg
a.cc:1:1: error: 'dg' does not name a type 1 | dg | ^~
s919175464
p04043
C++
#incude <stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if( (a==5&&b==5&&c==7)||(a==5 && b==7&& c==5)||(a==7&&b==5&&c==5) ) { printf ("YES\n"); } else { printf ("NO\n"); } return 0; }
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include? 1 | #incude <stdio.h> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:7:5: error: 'scanf' was not declared in this scope 7 | scanf("%d %d %d",&a,&b,&c); | ^~~~~ a.cc:11:9: error: 'printf' was not...
s109748263
p04043
C++
# -*- coding: utf-8 -*- import math import sys import itertools import numpy as np import functools import collections mo = 1000000007 INF = 10**100 r = range class infix(object): def __init__(self, function): self.function = function def __ror__(self, other): self.left = other return ...
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:26:1: error: stray '@' in program 26 | @infix | ^ a.cc:39:2: error: invalid preprocessing directive #d 39 | #d = {1:2, 3:5, 6:10, 1000043:3814} | ^ a.cc:40:2: error: invalid preprocessing directive #z...
s711424961
p04043
C++
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; import java.util.*; public class Main { public s...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.OutputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmod...
s434806747
p04043
C++
#include<iostream> using namespace std; int main(){ int stdin; int ans[2] = {0, 0}; for(int i = 0; i < 3; i++){ cin >> stdin; if(stdin == 5){ ans[0]++; }else if(stdin == 7){ ans[1]++; } } if(ans[0] == 2 && ans[1] == 1){ cout << "Yes" <...
a.cc: In function 'int main()': a.cc:18:30: error: expected '}' at end of input 18 | cout << "No" << endl; | ^ a.cc:17:10: note: to match this '{' 17 | }else{ | ^ a.cc:18:30: error: expected '}' at end of input 18 | cout << "No" << endl; ...
s832994635
p04043
C++
#include<iostream> using namespace std; int main(){ int stdin; int ans[2] = {0, 0}; for(int i = 0; i < 3; i++){ cin >> stdin; if(stdin == 5){ ans[0]++; }else if(stdin == 7){ ans[1]++; } } if(ans[0] == 2 && ans[1] == 1){ cout << "Yes" <...
a.cc: In function 'int main()': a.cc:18:30: error: expected '}' at end of input 18 | cout << "No" << endl; | ^ a.cc:17:10: note: to match this '{' 17 | }else{ | ^ a.cc:18:30: error: expected '}' at end of input 18 | cout << "No" << endl; ...
s049655812
p04043
C++
#include<iostream> #include<iomanip> #include<map> #include<set> #include<string> #include<algorithm> #include<cmath> #include<vector> #include<queue> #include<stack> using namespace std; #define P(p) cout<<(p)<<endl #define rep(i,m,n) for(int i = (m); i < (int)(n); i++) #define rrep(i,m,n) for(int i=(int)(m); i>=(...
a.cc:45:6: error: stray '#' in program 45 | }#include<iostream> | ^ a.cc: In function 'int main()': a.cc:45:7: error: 'include' was not declared in this scope 45 | }#include<iostream> | ^~~~~~~ a.cc:45:23: error: expected primary-expression before '>' token 45 | }#include<ios...
s447143258
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a+b+c=12) cout<<"YES": else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:7:7: error: lvalue required as left operand of assignment 7 | if(a+b+c=12) | ~~~^~ a.cc:8:12: error: expected ';' before ':' token 8 | cout<<"YES": | ^ | ;
s668578178
p04043
C++
#include <iostream> #include <string> using namespace std; int main() { int A; int B; int C; cin >> A; cin >> B; cin >> C; if (A == 5 && B == 5 && C 7, A== 5 && B== 7 && C == 5, A == 7 && B== 5 && C== 5) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:14:34: error: expected ')' before numeric constant 14 | if (A == 5 && B == 5 && C 7, A== 5 && B== 7 && C == 5, A == 7 && B== 5 && C== 5) | ~ ^~ | )
s879785729
p04043
C++
#include <iostream> using namespace std; int main(){ int num[3],c5=0,c7=0; cin >> num[0] >> num[1] >> num[2]; for(int i =0;i<3;i++){ if(num[i]==5){ c5++; } if(num[i]==7){ c7++; } if(c5==2 && c7==1){ cout << "Yes" <<endl; }else{ cout << "No" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s780704356
p04043
C
main() { scanf("%d %d %d",a,b,c); printf("%d %d %d",a,b,c); }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main() | ^~~~ main.c: In function 'main': main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 3 | scanf("%d %d %d",a,b,c); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a de...
s021494339
p04043
C++
#include <bits/stdc++.h> using namespace std; int main () { long long a; for(int i=1;i<=3;i++) { cin >> a; if(a==5) int dem++; } if(dem==2) cout << "YES"; else cout << "NO"; }
a.cc: In function 'int main()': a.cc:11:20: error: expected initializer before '++' token 11 | int dem++; | ^~ a.cc:13:8: error: 'dem' was not declared in this scope; did you mean 'drem'? 13 | if(dem==2) | ^~~ | drem
s263838872
p04043
C++
import strutils, sequtils, algorithm let a = readline(stdin).split.map(parseInt).sorted(system.cmp[int]) if @[5, 5, 7] == a: echo "YES" else: echo "NO"
a.cc:3:4: error: stray '@' in program 3 | if @[5, 5, 7] == a: | ^ a.cc:1:1: error: 'import' does not name a type 1 | import strutils, sequtils, algorithm | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s414325578
p04043
C++
a = map(int, raw_input().strip().split()) sort(a) if a[0] == 5 and a[1] == 5 and a[2] == 7: print('YES') else: print("NO")
a.cc:4:15: warning: multi-character character constant [-Wmultichar] 4 | print('YES') | ^~~~~ a.cc:1:1: error: 'a' does not name a type 1 | a = map(int, raw_input().strip().split()) | ^
s566434426
p04043
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, s, n) for (int i = s; i < n; ++i) #define rep(i, n) REP(i, 0, n) #define SORT(c) sort((c).begin(), (c).end()) #define IINF INT_MAX #define LLINF LLONG_MAX #define DEBUG false vector<int> law; int main() { int a[3]; cin >> a[0] >> a[1] >> a[2]; ...
a.cc: In function 'int main()': a.cc:6:26: error: request for member 'begin' in 'a', which is of non-class type 'int [3]' 6 | #define SORT(c) sort((c).begin(), (c).end()) | ^~~~~ a.cc:17:5: note: in expansion of macro 'SORT' 17 | SORT(a); | ^~~~ a.cc:6:39: error: requ...
s238203357
p04043
Java
import java.util.*; public class Main { Scanner sc = new Scanner(System.in); public static void main(String[] args) { int array [] = {sc.nextInt(),sc.nextInt(),sc.nextInt() }; Arrays.sort(array); System.out.print(array[0] == 5 && array[1] == 5 && array[2] == 7 ? "Yes" : "No"); } }
Main.java:6: error: non-static variable sc cannot be referenced from a static context int array [] = {sc.nextInt(),sc.nextInt(),sc.nextInt() }; ^ Main.java:6: error: non-static variable sc cannot be referenced from a static context int array [] = {sc.nextInt(),sc.nextInt(),sc.nex...
s256572036
p04043
C++
#include <iostream> #include<string> #include<algorithm> #include<stdio.h> using namespace std; int main(){ int a][3]; cin>>a[0]>>a[2]>>a[2]; sort(a, a+3); if(a[0]==5 && a[1]==5 && a[2]==7)cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: expected initializer before ']' token 9 | int a][3]; | ^ a.cc:10:10: error: 'a' was not declared in this scope 10 | cin>>a[0]>>a[2]>>a[2]; | ^
s006665785
p04043
C++
#include<bits/stdc++.h> using namespace std; int a,b,c; int cnt[15];   int main(){ cin>>a>>b>>c; cnt[a]++; cnt[b]++; cnt[c]++; if(cnt[5]==2&&cnt[7]==1)cout<<"YES"; else cout<<"NO"; return 0; }
a.cc:5:1: error: extended character   is not valid in an identifier 5 |   | ^ a.cc:5:1: error: '\U000000a0' does not name a type 5 |   | ^
s290461827
p04043
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <time.h> #include <math.h> #include <vector> #include <queue> #include <map> #include <set> #include <algorithm> #include <iterator> #include <sstream> #include <stack> #include <string> #include <bitset> using namespace std; #define FOR(I,F,N) for(int I...
a.cc: In function 'int main()': a.cc:45:47: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 45 | cout << (go == 2 && siti == 1)?"YES":"NO" << endl; | ~~~~~^~~~~~~
s301799996
p04043
C++
#include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <vector> #include <cstdlib> #include <iomanip> #include <cmath> #include <ctime> #include <map> #include <set> #include <queue> using namespace std; #define lowbit(x) (x&(-x)) #define max(x,y) (x>y?x:y) #define min(x,y) (x<y?x:y) #de...
a.cc: In function 'int main()': a.cc:40:34: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 40 | if((a+b+c)%17==0) cout<<"YES">>endl; | ~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:55, ...
s554994615
p04043
C++
#include<bits/stdc++.h> typedef long long ll using namespace std; int N[10]; main(){ int a; for(int i = 0;i < 3;i++){ cin >> a; N[a-1]++; } if(N[4]==2&&N[6]==1)cout << "YES" << endl; else cout << "NO" << endl; }
a.cc:3:1: error: expected initializer before 'using' 3 | using namespace std; | ^~~~~ a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin...
s916312647
p04043
C
#include <stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); int five = 0,seven = 0; switch (a) { case 5:five++; break; case 7:seven++; break; default : break; } switch (b) { case 5:five++; break; case 7:seven++; break; default : break; } switch (c) { case 5:five++; br...
main.c: In function 'main': main.c:21:25: error: lvalue required as left operand of assignment 21 | if(five == 2 && seven = 1){ | ^
s331113761
p04043
C++
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if ( (a == b == 5) && c == 7) || (b == c == 5) && a == 7) || (c == a == 5) && b == 7) ) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:35: error: expected primary-expression before '||' token 8 | if ( (a == b == 5) && c == 7) || | ^~
s794296543
p04043
C++
#include <iostream> using namespace std; int main() { int a,b,c,cek[10]; for (a=1;a<=3;a++) { cin>>b; tab[b]++; } if (tab[5]==2 && tab[7]==1) cout<<"YES\n"; else cout<<"NO\n"; }
a.cc: In function 'int main()': a.cc:10:17: error: 'tab' was not declared in this scope 10 | tab[b]++; | ^~~ a.cc:12:13: error: 'tab' was not declared in this scope 12 | if (tab[5]==2 && tab[7]==1) | ^~~
s369288274
p04043
C++
int a,b,c; cin >> a >> b >> c; int f = 0,s = 0; if(a == 5) f++; else if(a == 7) s++; if(b == 5) f++; else if(b == 7) s++; if(c == 5) f++; else if(c == 7) s++; if(f == 2 && s == 1) cout << "YES" << endl; else cout << "NO" << endl;
a.cc:2:1: error: 'cin' does not name a type 2 | cin >> a >> b >> c; | ^~~ a.cc:4:1: error: expected unqualified-id before 'if' 4 | if(a == 5) f++; | ^~ a.cc:5:1: error: expected unqualified-id before 'else' 5 | else if(a == 7) s++; | ^~~~ a.cc:6:1: error: expected unqualified-id before 'if...
s277297307
p04043
C++
#include <bits/sdc++.h> using namespace std; int main(){ int a, b, c, c5, c7; cin >> a >> b >> c; if(a == 5){ c5++ } else if(a == 7){ c7++; } if(b == 5){ c5++ } else if(b == 7){ c7++; } if(c == 5){ c5++ } else if(c == 7){ c7++; } if(c7 == 1 and c5 == 2){ cout << "YES"; } else{ cou...
a.cc:1:10: fatal error: bits/sdc++.h: No such file or directory 1 | #include <bits/sdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s028727835
p04043
C++
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStrea...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.OutputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmod...
s354972873
p04043
C++
#include <iostream> #include <array> using std::cin; using std::cout; using std::endl; using std::array; using std::sort; using std::begin; using std::end; int main() { int nums[3]; cin >> nums[0] >> nums[1] >> nums[2]; sort(begin(nums), end(nums)); if(nums[0] == 5 && nums[1] == 5 && nums[2] == 7) { co...
a.cc:8:12: error: 'sort' has not been declared in 'std' 8 | using std::sort; | ^~~~ a.cc: In function 'int main()': a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(begin(nums), end(nums)); | ^~~~ | short
s493078252
p04043
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; void check(int); int 5_count = 0, 7_count = 0; int main() { int 5_count = 0, 7_count = 0, A, B, C; cin >> A >> B >> C; check(A); check(B); check(C); if(5_count == 0 && 7_count == 0) { cout << "YES"; }else { cout << "NO"; } ...
a.cc:8:5: error: expected unqualified-id before numeric constant 8 | int 5_count = 0, 7_count = 0; | ^~~~~~~ a.cc: In function 'int main()': a.cc:12:13: error: expected unqualified-id before numeric constant 12 | int 5_count = 0, 7_count = 0, A, B, C; | ^~~~~~~ a.cc:13:16: err...
s016111945
p04043
C++
#include<iostream> #include<string> #include<cmath> #include<queue> #include<map> #include<set> #include<list> #include<iomanip> #include<vector> #include<functional> #include<algorithm> #include<cstdio> #include<unordered_map> using namespace std; typedef long long ll; int main() { string a[3]; for (int i = 0;i < 3;...
a.cc: In function 'int main()': a.cc:25:28: error: expected ';' before '}' token 25 | s++ | ^ | ; 26 | } | ~
s855623510
p04043
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); if((A==5&&B==5) && (C==7)){ System.out.println("YES"); } else if((A==5&&C==5) &&(B==7)){ System.out.println("...
Main.java:26: error: reached end of file while parsing } ^ 1 error
s171837295
p04043
Java
import java.util.*; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); if((A==5&&B==5) && (C==7)){ System.out.println("YES"); } else if((A==5&&C==5) &&(B==7)){ System.out.println("YES"); } else ...
Main.java:2: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) Main.java:22: error: reached end of file while parsing } ^ 2 errors
s371270359
p04043
Java
public static void main(String[] args) { int A = Integer.parseInt(args[0]); int B = Integer.parseInt(args[1]); int C = Integer.parseInt(args[2]); if((A==5&&B==5) && (C==7)){ System.out.println("YES"); } else if((A==5&&C==5) &&(B==7)){ System.out.println("YES"); } else if((B==5&&C==5) && ...
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
s587878833
p04043
C++
#include <iostream> #include <cstring> #include <cstdio> #include <string> #include <algorithm> #include <vector> #include <bits/stdc++.h> using namespace std; typedef long long ll; int a[5]; int main() { scanf ("%d%d%d",&a[0],&a[1],&a[2]); sort(a,a+3); if (a[0]==a[1]&&a[1]==5&&a[2]==7) printf ("YES\n"); ...
a.cc:18:2: error: expected unqualified-id before numeric constant 18 | }7 | ^
s619794343
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a; int x[2] = {0}; //input for(int i=0;i<3;i++){ cin>>a; if(a==5) x[0]+=1; if(a==7) x[1]+=1; } cout<<(x[0]==2 && x[1]==1)?"YES":"NO"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:16:40: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 16 | cout<<(x[0]==2 && x[1]==1)?"YES":"NO"<<endl; | ~~~~^~~~~~
s759071360
p04043
C++
#incldue <bits/stdc++.h> using namespace std; int main() { int a; int x[2] = {0}; //input for(int i=0;i<3;i++){ cin>>a; if(a==5) x[0]+=1; if(a==7) x[1]+=1; } cout<<(x[0]==2 && x[1]==1)?"YES":"NO"<<endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include? 1 | #incldue <bits/stdc++.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:10:5: error: 'cin' was not declared in this scope 10 | cin>>a; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header ...
s143218222
p04043
C++
#incldue <bits/stdc++.h> using namespace std; int main() { int a; int x[2] = {0}; //input for(int i=0;i<3;i++){ cin>>a; if(a==5) x[0]+=1; if(a==7) x[1]+=1; } cout<<((x[0]==2 && x[1]==1)?"YES":"NO")<<endl; return 0; }
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include? 1 | #incldue <bits/stdc++.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:10:5: error: 'cin' was not declared in this scope 10 | cin>>a; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header ...
s699392302
p04043
C++
#include<iostream> using namespace std; int main() { int a; int b; int c; int s; int z; s = a+b+c; z = a*b*c; std::cin>>a>>b>>c; if (s==17){ if (z==175) { std::cout << "YES" << std::endl; }else{ std::cout<<"NO"<<std::endl; }; return 0; }
a.cc: In function 'int main()': a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s571529281
p04043
C++
#include<iostream> using namespace std; int main() { int a; int b; int c; int s; s=a+b+c; std::cin>>a>>b>>c; if (s=<12){ std::cout<<"Yes"<<std::endl; }else{ std::cout<<"No"<<std::endl; }; return 0; }
a.cc: In function 'int main()': a.cc:12:15: error: expected primary-expression before '<' token 12 | if (s=<12){ | ^
s759765434
p04043
C++
#include<iostream>   int main() { int a; int b; int c;   int s; s=a+b+c; std::cin>>a>>b>>c; if (s=<12){ std::cout<<"Yes"<<std::endl; } else { std::cout<<"No"<<std::endl; }   return 0; }
a.cc:2:1: error: extended character   is not valid in an identifier 2 |   | ^ a.cc:8:1: error: extended character   is not valid in an identifier 8 |   | ^ a.cc:18:1: error: extended character   is not valid in an identifier 18 |   | ^ a.cc:2:1: error: '\U000000a0' does not name a type ...
s411883824
p04043
C++
#include<iostream>   int main() { int a; int b; int c;   int s; s = a + b + c; std::cin>>a>>b>>c; if (s=<12){ std::cout<<"Yes"<<std::endl; } else { std::cout<<"No"<<std::endl; };   return 0; }
a.cc:2:1: error: extended character   is not valid in an identifier 2 |   | ^ a.cc:8:1: error: extended character   is not valid in an identifier 8 |   | ^ a.cc:18:1: error: extended character   is not valid in an identifier 18 |   | ^ a.cc:2:1: error: '\U000000a0' does not name a type ...
s702096552
p04043
C++
#include<iostream> int main() { int a; int b; int c; int s; s = a + b + c; std::cin>>a>>b>>c; if (s=<12){ std::cout<<"Yes"<<std::endl; } else { std::cout<<"No"<<std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:15: error: expected primary-expression before '<' token 12 | if (s=<12){ | ^
s136274215
p04043
C++
#include<iostream> int main() { int a; int b; int c; std::cin>>a>>b>>c; if (a+b+c=<12){ std::cout<<"Yes"<<std::endl; } else { std::cout<<"No"<<std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:19: error: expected primary-expression before '<' token 12 | if (a+b+c=<12){ | ^
s112966710
p04043
C++
#include<iostream> int main() { int a; int b; int c;     std::cin >> a >> b >> c; if(a+b+c=12) { std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; }   return 0; }
a.cc:7:1: error: extended character   is not valid in an identifier 7 |   | ^ a.cc:9:1: error: extended character   is not valid in an identifier 9 |   | ^ a.cc:17:1: error: extended character   is not valid in an identifier 17 |   | ^ a.cc: In function 'int main()': a.cc:7:1: error: '\U000...
s840953698
p04043
C++
#include<iostream> int main() { int a; int b; int c; std::cin >> a >> b >> c; if(a+b+c=12) { std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:15: error: lvalue required as left operand of assignment 11 | if(a+b+c=12) { | ~~~^~
s581493734
p04043
C++
#include<iostream> using namespace std; int main() { int a; int b; int c; std::cin >> a >> b >> c; if(a+b+c=12) { std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:15: error: lvalue required as left operand of assignment 11 | if(a+b+c=12) { | ~~~^~
s331672049
p04043
C++
#include<iostream> using namespase std; int main() { int a; int b; int c; std::cin >> a >> b >> c; if(a+b+c=12) { std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; } return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namespase' 2 | using namespase std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:10:15: error: lvalue required as left operand of assignment 10 | if(a+b+c=12) { | ~~~^~
s190500290
p04043
C++
#include<iostream> int main() { int a; int b; int c; std::cin >> a >> b >> c; if(a+b+c=12) { std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: lvalue required as left operand of assignment 10 | if(a+b+c=12) { | ~~~^~
s861111607
p04043
C++
#include<iostream> int main() { int a; int b; int c; std::cin >> a >> b >> c; if (a + b + c = 12) { std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: lvalue required as left operand of assignment 10 | if (a + b + c = 12) { | ~~~~~~^~~
s324069506
p04043
C++
#include<iostream> int main() int a; int b; int c; std::cin >> a >> b >> c; if (a + b + c = 12) { std::cout << "Yes" << endl; } else { std::cout << "No" << endl; } return 0; }
a.cc:5:1: error: expected initializer before 'int' 5 | int a; | ^~~ a.cc:9:14: error: 'cin' in namespace 'std' does not name a type 9 | std::cin >> a >> b >> c; | ^~~ In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | exter...
s784098251
p04043
C++
#include<iostream> int main { int num1,num2,num3; std::cin >> num1 >> num2 >>num3 if(num1+num2+num3=12) { std::cout << "YES" << endl; } else { std::cout << "No" << endl; } return 0; }
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main | ^~~~ a.cc:4:1: error: expected primary-expression before 'int' 4 | int num1,num2,num3; | ^~~ a.cc:4:1: error: expected '}' before 'int' a.cc:3:1: note: to match this '{' 3 | { | ^ a.cc:5:6: error: 'cin' in ...
s669738996
p04043
C++
#include<iostream> int main { std::cin >> num1 >> num2 >>num3 if(num1+num2+num3=12) { std::cout << "YES" << endl; } else { std::cout << "No" << endl; } return 0; }
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main | ^~~~ a.cc:4:13: error: 'num1' was not declared in this scope 4 | std::cin >> num1 >> num2 >>num3 | ^~~~ a.cc:4:21: error: 'num2' was not declared in this scope 4 | std::cin >> num1 >> num2 >>num3 ...
s153735477
p04043
C++
#include<iostream> int main { std:;cin >> num1 >> num2 >>num3 if(num1+num2+num3=12) { std::cout << "YES" << endl } else { std::cout << "No" << endl } return 0; }
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main | ^~~~ a.cc:4:5: error: expected primary-expression before ';' token 4 | std:;cin >> num1 >> num2 >>num3 | ^ a.cc:4:5: error: expected '}' before ';' token a.cc:3:1: note: to match this '{' 3 | { | ^ a.cc...
s539202183
p04043
C++
include<iostream> int main { std:;cin >> num1 >> num2 >>num3 if(num1+num2+num3=12) { std::cout << "YES" << endl } else { std::cout << "No" << endl } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~
s615583342
p04043
C++
#include "stdafx.h" #include <iostream> #include <cstdlib> using namespace std; int main() { int a, b, c; cin >> a; cin >> b; cin >> c; if ((a+b+c) == 17) { if (a == 5) { if (abs(b - c) == 2) { cout << "YES" << endl; } } ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s623409663
p04043
C++
#include "stdafx.h" #include <iostream> #include <cstdlib> using namespace std; int main() { int a, b, c; cin >> a; cin >> b; cin >> c; if ((a+b+c) == 17) { if (a == 5) { if (abs(b - c) == 2) { cout << "YES" << endl; } } ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s568878149
p04043
C++
#include<iostream> using namespace std; int main() { int a=0, b=0, c=0; while (a<1 || a>10) { cin >> a; } while (b<1 || b>10) { cin >> b; } while (c<1 || c>10) { cin >> c; } if (a==7 && b==5 && c==5) { cout << "yes" << endl; } else if (a == 5 && b == 7 && c == 5) { cout << "yes" << endl; } el...
a.cc: In function 'int main()': a.cc:30:10: error: expected '}' at end of input 30 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s418516908
p04043
C++
#include<iostream> using namespace std; int main() { int a=0, b=0, c=0; while (a<1 || a>10) { cin >> a; } while (b<1 || b>10) { cin >> b; } while (c<1 || c>10) { cin >> c; } if (a==7 && b==5 && c==5) { cout << "yes" << endl; } else if (a == 5 && b == 7 && c == 5) { cout << "yes" << endl; } el...
a.cc: In function 'int main()': a.cc:30:10: error: expected '}' at end of input 30 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s278639207
p04043
C++
s = gets().split().map(&:to_i) five, seven = 0, 0 3.times do |i| if s[i] == 5 five += 1 elsif s[i] == 7 seven += 1 end end if five == 2 && seven == 1 puts "YES" else puts "NO" end
a.cc:1:1: error: 's' does not name a type 1 | s = gets().split().map(&:to_i) | ^
s819916747
p04043
C++
using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==7&&b==5&&c==5){ cout<<"YES"<<endl; }else if(a==5&&b==7&&c==5){ cout<<"YES"<<endl; }else if(a==5&&b==5&&c==7){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | cin>>a>>b>>c; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:10:17: error: 'cout' wa...
s961770255
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" } if(B==5&&C==5&&A==7){ cout<<"YES"<<"\n" } if(C==5&&A==5&&B==7){ cout<<"YES"<<"\n" } else{ cout<<"NO"<<"\n" } }
a.cc: In function 'int main()': a.cc:8:22: error: expected ';' before '}' token 8 | cout<<"YES"<<"\n" | ^ | ; 9 | } | ~ a.cc:11:22: error: expected ';' before '}' token 11 | cout<<"YES"<<"\n" | ...
s804610000
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if((a==5&&b==5&&c=7)||(a==5&&c==5&&b==7)||(b==5&&c==5&&a==7)){ cout<<"Yes"; } else{ cout<<"No"; } }
a.cc: In function 'int main()': a.cc:7:17: error: lvalue required as left operand of assignment 7 | if((a==5&&b==5&&c=7)||(a==5&&c==5&&b==7)||(b==5&&c==5&&a==7)){ | ~~~~~~~~~~^~~
s636770946
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if((a==b==5&&c=7)||(a==5&&c==5&&b==7)||(b==5&&c==5&&a==7)){ cout<<"Yes"; } else{ cout<<"No"; } }
a.cc: In function 'int main()': a.cc:7:14: error: lvalue required as left operand of assignment 7 | if((a==b==5&&c=7)||(a==5&&c==5&&b==7)||(b==5&&c==5&&a==7)){ | ~~~~~~~^~~
s618111718
p04043
C++
#include <iostream> #include <cmath> #include <string> #include <cstdlib> #include <iomanip> #include <sstream> #include <cstdio> #include <vector> #include <algorithm> #include <cctype> #include <map> #include <cstring> #include <typeinfo> #define REP(i,n) for(int i = 0;i < n ;i++) #define FOR(i,m,n) for(int i= m ;i<n...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:9: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]': /usr/...
s845061551
p04043
C
#include<stdio.h> int main(void) { int A,B,C; A>=1; B>=1; C>=1; A<=10; B<=10; C<=10 if(A=5,B=7,C=5){ printf("YES\n"); }else if(A=5,B=5,C=7){ printf("YES\n"); }else if(A=7,B=5,C=5){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
main.c: In function 'main': main.c:10:6: error: expected ';' before 'if' 10 | C<=10 | ^ | ; 11 | if(A=5,B=7,C=5){ | ~~
s056348333
p04043
C
#include<stdio.h> int main(void) { int A,B,C; A>=1; B>=1; C>=1; A<=10; B<=10; C<=10 if(A=5,B=7,C=5){ printf("YES\n"); }else if(A=5,B=5,C=7){ printf("YES\n"); }else if(A=7,B=5,C=5){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
main.c: In function 'main': main.c:10:6: error: expected ';' before 'if' 10 | C<=10 | ^ | ; 11 | if(A=5,B=7,C=5){ | ~~
s838967236
p04043
C
#include<stdio.h> int main(void) { int A,B,C; A>=1; B>=1; C>=1; A<=10; B<=10; C<=10 if(A=5,B=7,C=5){ printf("YES\n") }else if(A=5,B=5,C=7){ printf("YES\n"); }else if(A=7,B=5,C=5){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }
main.c: In function 'main': main.c:10:6: error: expected ';' before 'if' 10 | C<=10 | ^ | ; 11 | if(A=5,B=7,C=5){ | ~~
s835350106
p04043
C
#include<stdio.h> int main(void) { int A,B,C; A>=1; B>=1; C>=1; A<=10; B<=10; C<=10; if(A=5,B=7,C=5){ printf("YES\n")} if(A=5,B=5,C=7){ printf("YES\n")} if(A=7,B=5,C=5){ printf("YES\n") }else{ printf("NO\n") } return 0; }
main.c: In function 'main': main.c:12:16: error: expected ';' before '}' token 12 | printf("YES\n")} | ^ | ; main.c:14:16: error: expected ';' before '}' token 14 | printf("YES\n")} | ^ | ; main.c:16:16: error: expected ';' before...
s072613529
p04043
C
#include<stdio.h> int main(void) { int A,B,C; A>=1; B>=1; C>=1; A<=10; B<=10; C<=10 if(A=5,B=7,C=5){ printf("YES\n")} if(A=5,B=5,C=7){ printf("YES\n")} if(A=7,B=5,C=5){ printf("YES\n") }else{ printf("NO\n") } return 0; }
main.c: In function 'main': main.c:10:6: error: expected ';' before 'if' 10 | C<=10 | ^ | ; 11 | if(A=5,B=7,C=5){ | ~~
s128275797
p04043
C++
import java.util.Scanner; import java.util.Map; import java.util.HashMap; public class Main { public static void main(String[] args) throws Exception { // Here your code ! Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Map; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' ...
s343647355
p04043
C++
#include <iostream> #include <math> #include <string> #include <vector> //#define loop(K) for(int i=0;i < K;i++) using namespace std; int main(){ int N,L; cin >> N >> L; //入力 vector<string> mozi(N); //比較する文字の数 vector<string> sum(1); //文字を足したやつ for(int i=0;i < N;i++){ //文字入力 cin >> mozi[i]; } qsort(mozi.be...
a.cc:2:10: fatal error: math: No such file or directory 2 | #include <math> | ^~~~~~ compilation terminated.
s226120577
p04043
C++
#include<iostream> using namespace std; int main(){ int a[3], b[2]; for(int i=0;i<3;i++){ cin>>a[i] } for(int i=0;i<3;i++){ if(a[i] == 5)b[0]++ if(a[i] == 7)b[1]++ } if(b[0] == 2 && b[1] == 1){ cout << "YES" << endl; } else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: expected ';' before '}' token 7 | cin>>a[i] | ^ | ; 8 | } | ~ a.cc:11:24: error: expected ';' before 'if' 11 | if(a[i] == 5)b[0]++ | ^ | ...
s275546277
p04043
C++
l = list(map(int, input().split())) if l.count(5) == 2 and l.count(7) == 1: print("YES") else: print("NO")
a.cc:1:1: error: 'l' does not name a type 1 | l = list(map(int, input().split())) | ^
s245070233
p04043
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { private static Scanner sc; public static void main(String[] args) { Main instance = new Main(); sc ...
Main.java:19: error: 'try' without 'catch', 'finally' or resource declarations try { ^ Main.java:45: error: illegal start of type } catch (Exception e) { ^ Main.java:45: error: ';' expected } catch (Exception e) { ^ Main.java:96: error: class, interf...
s476402761
p04043
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { private static Scanner sc; public static void main(String[] args) { Main instance = new Main(); sc ...
Main.java:29: error: not a statement answer == "YES"; ^ Main.java:33: error: not a statement answer == "YES"; ^ Main.java:19: error: 'try' without 'catch', 'finally' or resource declarations try { ^ Main.java:45: error...
s763648738
p04043
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { private static Scanner sc; public static void main(String[] args) { Main instance = new Main(); sc ...
Main.java:24: error: unclosed character literal String answer = 'NO'; ^ Main.java:24: error: unclosed character literal String answer = 'NO'; ^ Main.java:24: error: not a statement String answer = 'NO'; ...
s015255121
p04043
Java
mport java.util.ArrayList; import java.util.Scanner; import java.util.Collections; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int number = scan.nextInt(); int length = scan.nextInt(); ArrayList list = new ArrayList(number); for (int i = 0; i < nu...
Main.java:1: error: class, interface, enum, or record expected mport java.util.ArrayList; ^ Main.java:2: error: class, interface, enum, or record expected import java.util.Scanner; ^ Main.java:3: error: class, interface, enum, or record expected import java.util.Collections; ^ 3 errors
s854667255
p04043
Java
package practice; import java.util.*; public class ABC042A { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int first = scan.nextInt(); int second = scan.nextInt(); int therd = scan.nextInt(); int FIVE = 0; int SEVEN = 0; if ((first == 5 | first == 7) & (second == 5 ...
Main.java:4: error: class ABC042A is public, should be declared in a file named ABC042A.java public class ABC042A { ^ 1 error
s407267728
p04043
C++
#define _USE_MATH_DEFIN #include<bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) for(int i=0;i<(n);i++) typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; #define pii pair<int,int> #define piii pair<int,pii> #define mp make_pair #define pb push_bac...
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:2: /usr/include/c++/14/bits/stl_algobase.h: In instantiation of '_OI std::fill_n(_OI, _Size, const _Tp&) [with _OI = int; _Size = int; _Tp = int]': a.cc:24:8: ...
s390542173
p04043
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #define ll long long int #define ld long double #define INF 10000 #define EPS 0.0000000001 #define rep(i,n) for(int i=0;i<n;i++) #define CC puts("----...
a.cc:35:1: error: expected declaration before '}' token 35 | } | ^
s246852035
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A[3]; cin >> A[0] >> A[1] >> A[2]; sort(A, A + 3) if (A[0] == 5 && A[1] == 5 && A[2] == 7) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:23: error: expected ';' before 'if' 8 | sort(A, A + 3) | ^ | ; 9 | if (A[0] == 5 && A[1] == 5 && A[2] == 7) | ~~ a.cc:11:9: error: 'else' without a previous 'if' 11 | ...
s644268873
p04043
C++
N = gets.split.map(&:to_i) five, seven = [0,0] N.each do |n| five += 1 if n == 5 seven += 1 if n == 7 end if five == 2 && seven == 1 then puts "YES" else puts "NO" end
a.cc:1:1: error: 'N' does not name a type 1 | N = gets.split.map(&:to_i) | ^
s270835082
p04043
C++
NUM = gets.split.map(&:to_i) five, seven = [0,0] NUM.each do |n| five += 1 if n == 5 seven += 1 if n == 7 end if five == 2 && seven == 1 then puts "YES" else puts "NO" end
a.cc:1:1: error: 'NUM' does not name a type 1 | NUM = gets.split.map(&:to_i) | ^~~
s710890944
p04043
C++
/** coder Mohammad Al-Hussein *_^ */ #include <bits/stdc++.h> #define ll long long #define F first #define S second #define mp make_pair #define All(v) v.begin(),v.end() #define mod 1000000007 #define write freopen("output.txt","w",stdout) #define read freopen("test (1).txt","r",stdin) #define FIO std::ios_base::sync_...
a.cc: In function 'int main()': a.cc:31:28: error: expected ';' before 'cout' 31 | cin >> h >> w >> a >> b | ^ | ; 32 | cout << solve(1,1) << endl; | ~~~~
s122200588
p04043
C++
/** coder Mohammad Al-Hussein *_^ */ #include <bits/stdc++.h> #define ll long long #define F first #define S second #define mp make_pair #define All(v) v.begin(),v.end() #define mod 1000000007 #define write freopen("output.txt","w",stdout) #define read freopen("test (1).txt","r",stdin) #define FIO std::ios_base::sync_...
a.cc: In function 'int main()': a.cc:31:28: error: expected ';' before 'cout' 31 | cin >> h >> w >> a >> b | ^ | ; 32 | cout << solve(1,1) << endl; | ~~~~
s592463986
p04043
C++
a = input() print("YES" if a.count("5") == 2 and a.count("7") == 1 else "NO")
a.cc:1:1: error: 'a' does not name a type 1 | a = input() | ^
s763096512
p04043
C++
#include <iostream> #include <vector> using namespace std; int main(){ vector<int> a(3); cin >> a[0] >> a[1] >> a[2]; sort(a.begin(),a.end()); if(a[0] == 5 && a[1] == 5 && a[2] == 7){ cout << "YES\n"; }else{ cout << "NO\n"; } return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'? 8 | sort(a.begin(),a.end()); | ^~~~ | short
s280150934
p04043
C++
#include <iostream> using namespace std; int X[3]; int main() { cin >> X[0] >> X[1] >> X[2]; sort(X, X+3); if (X[0] == 5 && X[1] == 5 && X[2] == 7) cout << "YES\n"; else cout << "NO\n"; return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'short'? 7 | sort(X, X+3); | ^~~~ | short
s070165833
p04043
C++
#include <iostream> int main(void) { int A, B, C; std::cin >> A >> B >> C; if(A=5,B=7,C=5 || A=7,B=5,C=5 || A=5,B=5,C=7){ std::cout << "YES" << std::endl; } else{ std::cout << "NO" << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:16: error: lvalue required as left operand of assignment 6 | if(A=5,B=7,C=5 || A=7,B=5,C=5 || A=5,B=5,C=7){ | ~~^~~~ a.cc:6:31: error: lvalue required as left operand of assignment 6 | if(A=5,B=7,C=5 || A=7,B=5,C=5 || A=5,B=5,C=7){ | ...
s561775001
p04043
C++
#include <iostream> int main(void) { int A, B, C, answer; std::cin >> A >> B >> C; if(A=5,B=7,C=5 || A=7,B=5,C=5 || A=5,B=5,C=7){ answer="YES"; } else{ answer="NO"; } std::cout << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:6:16: error: lvalue required as left operand of assignment 6 | if(A=5,B=7,C=5 || A=7,B=5,C=5 || A=5,B=5,C=7){ | ~~^~~~ a.cc:6:31: error: lvalue required as left operand of assignment 6 | if(A=5,B=7,C=5 || A=7,B=5,C=5 || A=5,B=5,C=7){ | ...
s144570438
p04043
C++
#include<iostream> #include<array> #include<string> int main(void){ int a,b,c;/*xは個数nは順番*/ std::cin >> a >> b >> c; if (a==5&&b==7&&c==5||a==7&&b==5&&c==5||a==5&&b==5&&c==7) { std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; } return 0;
a.cc: In function 'int main()': a.cc:18:18: error: expected '}' at end of input 18 | return 0; | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){ | ^
s251708452
p04043
Java
import java.util.Scanner; public class irohaDigit { public static void main(String[] args) { int N; int D; Scanner sc = new Scanner(System.in); N = sc.nextInt(); D = sc.nextInt(); int d[] = new int[10]; for(int i=0;i<D;i++) { d[sc.nextInt()]=1; } int sum=0; int start9= 0; int maxD = String....
Main.java:2: error: class irohaDigit is public, should be declared in a file named irohaDigit.java public class irohaDigit { ^ 1 error
s351291549
p04043
C++
#include <stdio.h> int main(void) { int a[3], i, count = 0; scanf("%d%d%d", a[0], b[1], c[2]); for(i = 0; i < 3; i++) { switch(a[i]) { case 5:count++; case 7:break; default:printf("NO\n"); return 0; } } if(count != 2){ ...
a.cc: In function 'int main()': a.cc:6:27: error: 'b' was not declared in this scope 6 | scanf("%d%d%d", a[0], b[1], c[2]); | ^ a.cc:6:33: error: 'c' was not declared in this scope 6 | scanf("%d%d%d", a[0], b[1], c[2]); | ^
s737741098
p04043
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner x = new Scanner(System.in); int num=x.nextInt(); int length=x.nextInt(); String[] arr = new String[num]; for(int i = 0;i<num;i++){ arr[i]=x.next(); } Collections.sort(arr); String result=""; for(int i = 0;i<num;i++){ result += ...
Main.java:17: error: no suitable method found for sort(String[]) Collections.sort(arr); ^ method Collections.<T#1>sort(List<T#1>) is not applicable (cannot infer type-variable(s) T#1 (argument mismatch; String[] cannot be converted to List<T#1>)) method Collections.<T#2>sort(List<T#2>,C...
s290971238
p04043
C++
#include <iostream> using namespace std; int main(){ char haiku[4] = ""; int temp = 0; for(int i = 0; i < 3; i++) { cin >> temp; haiku[i] = haiku[i] + ('0' + temp); haiku[4] = "\0"; } if(haiku == "557" || haiku == "575" || haiku == "755") cout << "YES" << endl; else cout << "NO" << endl; return 0; ...
a.cc: In function 'int main()': a.cc:10:28: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 10 | haiku[4] = "\0"; | ^~~~ | | | const char*
s225578670
p04043
C++
#include <iostream> using namespace std; int main(){ int haiku[3]; for(int i = 0; i < 3; i++) cin >> haiku[i]; char s[4]; s = "" + haiku[0] + haiku[1] + haiku[2]; if(s == "557" || s == "575" || s == "755") cout << "YES" << endl; else cout << "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: incompatible types in assignment of 'const char*' to 'char [4]' 9 | s = "" + haiku[0] + haiku[1] + haiku[2]; | ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s678086232
p04043
C++
import java.util.*; public class Main{ public static void main(String[] args){ int f=0; int s=0; Scanner x= new Scanner(System.in); for(int i=0;i<3;i++){ if(x.nextInt() == 5) f++; if(x.nextInt()==7) s++; } if(s==1 &&f==2) System.out.print("TRUE"); System.out.print("FALSE"); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main{ | ^~~~~~
s630388751
p04043
Java
import java.util.Scanner; public class IrohaAndHaiku { public static void main(String[] args) { Scanner in = new Scanner(System.in); String line = in.nextLine(); in.close(); String[] ary = line.split(" "); boolean w7 = false; boolean[] w5 = {false, false}; for (String w : ary) { in...
Main.java:3: error: class IrohaAndHaiku is public, should be declared in a file named IrohaAndHaiku.java public class IrohaAndHaiku { ^ 1 error
s215893775
p04043
C++
#include <iostream> #include <vector> using std::cout; using std::endl; using std::cin; using std::vector; using std::count; int main(){ vector<int> v; v.resize(3); cin >> v[0] >> v[1] >> v[2]; count(v.begin(),v.end(),7)==1 && count(v.begin(), v.end(), 5)==2? cout << "YES" << endl : cout << "...
a.cc:8:12: error: 'count' has not been declared in 'std' 8 | using std::count; | ^~~~~ a.cc: In function 'int main()': a.cc:15:5: error: 'count' was not declared in this scope; did you mean 'cout'? 15 | count(v.begin(),v.end(),7)==1 && count(v.begin(), v.end(), 5)==2? | ^~~~~ ...
s468568466
p04043
C++
#include <iostream> #include <vector> using std::cout; using std::endl; using std::cin; using std::vector; int main(){ vector<int> v; v.resize(3); cin >> v[0] >> v[1] >> v[2]; std::count(v.begin(),v.end(),7)==1 && std::count(v.begin(), v.end(), 5)==2? cout << "YES" << endl : cout << "NO" << e...
a.cc: In function 'int main()': a.cc:14:10: error: 'count' is not a member of 'std'; did you mean 'cout'? 14 | std::count(v.begin(),v.end(),7)==1 && std::count(v.begin(), v.end(), 5)==2? | ^~~~~ | cout a.cc:14:48: error: 'count' is not a member of 'std'; did you mean 'cout'? 14 |...