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 declared in this scope
11 | printf ("YES\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | #incude <stdio.h>
a.cc:15:9: error: 'printf' was not declared in this scope
15 | printf ("NO\n");
| ^~~~~~
a.cc:15:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
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 self
def __or__(self, other):
return self.function(self.left, other)
def __call__(self, value1, value2):
return self.function(value1, value2)
@infix
def c(f_t_u, f_u_r): return lambda t: f_u_r(f_t_u(t))
class _Ap(object):
def __rlshift__(self, other):
self.value = other
return self
def __rshift__(self, other):
return other(self.value)
Ap = _Ap()
ap = Ap
#d = {1:2, 3:5, 6:10, 1000043:3814}
#zip(d.keys(), d.values())<<ap>>(list |c| sorted |c| reversed |c| list |c| print)
x = [0]*3
x[0], x[1], x[2] = map(int,input().split())
x.sort()
if x[0]==5 and x[1] == 5 and x[2] == 7:
print("YES");
else:
print("NO");
|
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 #zip
40 | #zip(d.keys(), d.values())<<ap>>(list |c| sorted |c| reversed |c| list |c| print)
| ^~~
a.cc:2:1: error: 'import' does not name a type
2 | import math
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:48:1: error: expected unqualified-id before 'else'
48 | else:
| ^~~~
|
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 static void main(String []args){
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
Task solver=new Task();
solver.solve(1,in,out);
out.close();
}
static class Task{
public void solve(int testnumber,InputReader in,PrintWriter out){
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
int Max = Math.max(a,Math.max(b,c));
int Min = Math.min(a,Math.min(b,c));
int Mid = a+b+c-Max-Min;
if(Min == 5 && Mid == 5 && Max == 7){
out.println("YES");
} else {
out.println("NO");
}
}
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
}
}
|
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 '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.InputStream;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.io.PrintWriter;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
5 | import java.util.StringTokenizer;
| ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
6 | import java.io.IOException;
| ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
7 | import java.io.BufferedReader;
| ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
8 | import java.io.InputStreamReader;
| ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: 'import' does not name a type
9 | import java.io.InputStream;
| ^~~~~~
a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'import' does not name a type
10 | import java.util.*;
| ^~~~~~
a.cc:10:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:11:1: error: expected unqualified-id before 'public'
11 | public class Main {
| ^~~~~~
|
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" << endl;
}else{
cout << "No" << endl;
|
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;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
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" << endl;
}else{
cout << "No" << endl;
|
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;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
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>=(int)(n); i--)
#define vsort(v) sort(v.begin(), v.end());
#define rvsort(v) sort(v.begin(), v.end(),greater<int>());
#define YES cout<<"YES"<< endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define ret return
#define C(i) cin>>i
#define C2(i,j) cin>>i>>j
#define C3(i,j,k) cin>>i>>j>>k
#define C4(i,j,k,m) cin>>i>>j>>k>>m
////////////////////////////////////////////////////////////
int main(){
int a[3];
C3(a[0],a[1],a[2]);
int s5=0;
bool s7 = false;
rep(i,0,3){
if(a[i] == 5 )
s5++;
else if(a[i] == 7)
s7 = true;
else{
NO;
ret 0;
}#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>=(int)(n); i--)
#define vsort(v) sort(v.begin(), v.end());
#define rvsort(v) sort(v.begin(), v.end(),greater<int>());
#define YES cout<<"YES"<< endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define ret return
#define C(i) cin>>i
#define C2(i,j) cin>>i>>j
#define C3(i,j,k) cin>>i>>j>>k
#define C4(i,j,k,m) cin>>i>>j>>k>>m
////////////////////////////////////////////////////////////
int main(){
int a[3];
C3(a[0],a[1],a[2]);
int s5=0;
bool s7 = false;
rep(i,0,3){
if(a[i] == 5 )
s5++;
else if(a[i] == 7)
s7 = true;
else{
NO;
ret 0;
}
}
if(s7&&s5==2)
YES;
else
NO;
ret 0;
}
}
if(s7&&s5==2)
YES;
else
NO;
ret 0;
}
|
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<iostream>
| ^
a.cc:56:1: error: expected primary-expression before 'using'
56 | using namespace std;
| ^~~~~
a.cc:76:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
76 | int main(){
| ^~
a.cc:76:9: note: remove parentheses to default-initialize a variable
76 | int main(){
| ^~
| --
a.cc:76:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:76:11: error: a function-definition is not allowed here before '{' token
76 | int main(){
| ^
|
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 declaration of 'scanf'
+++ |+#include <stdio.h>
1 | main()
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | scanf("%d %d %d",a,b,c);
| ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:20: error: 'a' undeclared (first use in this function)
3 | scanf("%d %d %d",a,b,c);
| ^
main.c:3:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:22: error: 'b' undeclared (first use in this function)
3 | scanf("%d %d %d",a,b,c);
| ^
main.c:3:24: error: 'c' undeclared (first use in this function)
3 | scanf("%d %d %d",a,b,c);
| ^
main.c:5:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
5 | printf("%d %d %d",a,b,c);
| ^~~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
|
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];
SORT(a);
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: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: request for member 'end' 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);
| ^~~~
|
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.nextInt() };
^
Main.java:6: error: non-static variable sc cannot be referenced from a static context
int array [] = {sc.nextInt(),sc.nextInt(),sc.nextInt() };
^
3 errors
|
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 = F; I < (int)(N); I++)
#define rep(i, n) FOR(i, 0, n)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 28)
template<typename T>
void remove(vector<T>& vector, unsigned int index){
vector.erase(vector.begin() + index);
}
vector<string> split(const string &s, char c);
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;
int StrToInt(string);
string IntToStr(int);
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int go = 0;
int siti = 0;
void func(int a){
if(a==5)go++;
if(a == 7)siti++;
}
int main(void){
int a,b,c;
cin >> a >> b >> c;
cout << (go == 2 && siti == 1)?"YES":"NO" << endl;
return 0;
}
int StrToInt(string s){
stringstream ss;
ss << s;
int val;
ss >> val;
return val;
}
string IntToStr(int i){
stringstream ss;
ss << i;
return ss.str();
}
vector<string> split(const string &s, char delim) {
vector<string> elems;
string item;
for (int i = 0; i < s.size(); i++) {
char ch = s[i];
if (ch == delim) {
if (!item.empty())
elems.push_back(item);
item.clear();
}
else {
item += ch;
}
}
if (!item.empty())
elems.push_back(item);
return elems;
}
|
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)
#define MAX 100000000000000000
#define MOD 1000000007
#define pi acos(-1.0)
#define ei exp(1)
#define PI 3.141592653589793238462
#define INF 0x3f3f3f3f3f
#define mem(a) (memset(a,0,sizeof(a)))
typedef long long ll;
ll gcd(ll a,ll b){
return b?gcd(b,a%b):a;
}
bool cmp(int x,int y)
{
return x>y;
}
const int N=10005;
const int mod=1e9+7;
int main()
{
std::ios::sync_with_stdio(false);
int a,b,c;
cin>>a>>b>>c;
if((a+b+c)%17==0) cout<<"YES">>endl;
else cout<<"NO"<<endl;
return 0;
}
|
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,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: couldn't deduce template parameter '_IntegerType'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: couldn't deduce template parameter '_Tp'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
In file included from a.cc:7:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/iomanip:237:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setw)'
237 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:237:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/iomanip:271:5: note: candidate: 'template<class _CharT, class _Traits, class _MoneyT> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Get_money<_MoneyT>)'
271 | operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:271:5: note: template argument deduction/substitution failed:
a.cc:40:36: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
40 | if((a+b+c)%17==0) cout<<"YES">>endl;
| ^~~~
/usr/include/c++/14/iomanip:425:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits
|
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'?
8 | cin >> a;
| ^~~
| 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:11:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | if(N[4]==2&&N[6]==1)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:11:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
11 | if(N[4]==2&&N[6]==1)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:12:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | else 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:12:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
12 | else cout << "NO" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
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++; break;
case 7:seven++; break;
default : break;
}
if(five == 2 && seven = 1){
printf("YES");
}
else{
printf("NO");
}
return 0;
}
|
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'
6 | if(b == 5) f++;
| ^~
a.cc:7:1: error: expected unqualified-id before 'else'
7 | else if(b == 7) s++;
| ^~~~
a.cc:8:1: error: expected unqualified-id before 'if'
8 | if(c == 5) f++;
| ^~
a.cc:9:1: error: expected unqualified-id before 'else'
9 | else if(c == 7) s++;
| ^~~~
a.cc:10:1: error: expected unqualified-id before 'if'
10 | if(f == 2 && s == 1) cout << "YES" << endl;
| ^~
a.cc:11:1: error: expected unqualified-id before 'else'
11 | else cout << "NO" << endl;
| ^~~~
|
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{
cout << "NO";
}
return 0;
}
|
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) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
Task solver = new Task();
solver.solve(1, in, out);
out.close();
}
static class Task {
public void solve(int testNumber, Scanner in, PrintWriter out) {
int[] array = {in.nextInt(), in.nextInt(), in.nextInt()};
Arrays.sort(array);
if (array[0] == 5 && array[1] == 5 && array[2] == 7) {
out.append("YES");
} else {
out.append("NO");
}
}
}
}
|
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 '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.InputStream;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.io.PrintWriter;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
5 | import java.util.Arrays;
| ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
6 | import java.util.Scanner;
| ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:12:1: error: expected unqualified-id before 'public'
12 | public class Main {
| ^~~~~~
|
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) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
|
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";
}
return 0;
}
void check(int input) {
if (input == 5) {
5_count -= 1;
}else if (input == 7) {
7_count -= 1;
}
}
|
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: error: 'A' was not declared in this scope
13 | cin >> A >> B >> C;
| ^
a.cc:13:21: error: 'B' was not declared in this scope
13 | cin >> A >> B >> C;
| ^
a.cc:13:26: error: 'C' was not declared in this scope
13 | cin >> A >> B >> C;
| ^
a.cc:18:12: error: unable to find numeric literal operator 'operator""_count'
18 | if(5_count == 0 && 7_count == 0) {
| ^~~~~~~
a.cc:18:28: error: unable to find numeric literal operator 'operator""_count'
18 | if(5_count == 0 && 7_count == 0) {
| ^~~~~~~
a.cc: In function 'void check(int)':
a.cc:30:17: error: unable to find numeric literal operator 'operator""_count'
30 | 5_count -= 1;
| ^~~~~~~
a.cc:32:17: error: unable to find numeric literal operator 'operator""_count'
32 | 7_count -= 1;
| ^~~~~~~
|
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; i++)
cin >> a[i];
int f = 0, s = 0;
for (int i = 0; i < 3; i++) {
if (a[i].size() == 5)
f++;
else if(a[i].size()==7)
s++
}
if (f == 2 && s == 1)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
|
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("YES");
}
else if((B==5&&C==5) && (A==7)){
System.out.println("YES");
}
else {
System.out.println("NO");
}
}
|
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 if((B==5&&C==5) && (A==7)){
System.out.println("YES");
}
else {
System.out.println("NO");
}
|
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) && (A==7)){
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
|
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");
else printf ("NO\n");
return 0;
}7
|
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 '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #incldue <bits/stdc++.h>
a.cc:16:3: error: 'cout' was not declared in this scope
16 | cout<<(x[0]==2 && x[1]==1)?"YES":"NO"<<endl;
| ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:42: error: 'endl' was not declared in this scope
16 | cout<<(x[0]==2 && x[1]==1)?"YES":"NO"<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #incldue <bits/stdc++.h>
|
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 '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #incldue <bits/stdc++.h>
a.cc:16:3: error: 'cout' was not declared in this scope
16 | cout<<((x[0]==2 && x[1]==1)?"YES":"NO")<<endl;
| ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:44: error: 'endl' was not declared in this scope
16 | cout<<((x[0]==2 && x[1]==1)?"YES":"NO")<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #incldue <bits/stdc++.h>
|
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
2 |
| ^
|
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
2 |
| ^
|
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: '\U000000a0' was not declared in this scope
7 |
| ^
a.cc:11:15: error: lvalue required as left operand of assignment
11 | if(a+b+c=12) {
| ~~~^~
a.cc:17:2: error: expected ';' before 'return'
17 |
| ^
| ;
18 | return 0;
| ~~~~~~
|
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 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:9: error: expected unqualified-id before 'if'
10 | if (a + b + c = 12) {
| ^~
a.cc:13:9: error: expected unqualified-id before 'else'
13 | else {
| ^~~~
a.cc:17:9: error: expected unqualified-id before 'return'
17 | return 0;
| ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
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 namespace 'std' does not name a type
5 | std::cin >> num1 >> num2 >>num3
| ^~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:1: error: expected unqualified-id before 'else'
10 | else
| ^~~~
a.cc:15:1: error: expected unqualified-id before 'return'
15 | return 0;
| ^~~~~~
a.cc:16:1: error: expected declaration before '}' token
16 | }
| ^
|
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
| ^~~~
a.cc:4:28: error: 'num3' was not declared in this scope
4 | std::cin >> num1 >> num2 >>num3
| ^~~~
a.cc:5:1: error: expected '}' before 'if'
5 | if(num1+num2+num3=12)
| ^~
a.cc:3:1: note: to match this '{'
3 | {
| ^
a.cc:9:1: error: expected unqualified-id before 'else'
9 | else
| ^~~~
a.cc:14:1: error: expected unqualified-id before 'return'
14 | return 0;
| ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
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:4:6: error: 'cin' does not name a type
4 | std:;cin >> num1 >> num2 >>num3
| ^~~
a.cc:9:1: error: expected unqualified-id before 'else'
9 | else
| ^~~~
a.cc:14:1: error: expected unqualified-id before 'return'
14 | return 0;
| ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
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;
}
}
else if (b == 5) {
if (abs(a - c) == 2)
{
cout << "YES" << endl;
}
}
else if (c == 5) {
if (abs(a - b) == 2)
{
cout << "YES" << endl;
}
}
else {
cout << "NO" << endl;
}
}
int ss;
cin >> ss;
return 0;
}
|
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;
}
}
else if (b == 5) {
if (abs(a - c) == 2)
{
cout << "YES" << endl;
}
}
else if (c == 5) {
if (abs(a - b) == 2)
{
cout << "YES" << endl;
}
}
else {
cout << "NO" << endl;
}
}
return 0;
}
|
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;
}
else if (a == 5 && b == 5 && c == 7) {
cout << "yes" << endl;
}
else {
cout << "no" << endl;
}
|
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;
}
else if (a == 5 && b == 5 && c == 7) {
cout << "yes" << endl;
}
else {
cout << "no" << endl;
}
|
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' was not declared in this scope
10 | cout<<"YES"<<endl;
| ^~~~
a.cc:10:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:30: error: 'endl' was not declared in this scope
10 | 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 |
a.cc:12:17: error: 'cout' was not declared in this scope
12 | cout<<"YES"<<endl;
| ^~~~
a.cc:12:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:30: error: 'endl' was not declared in this scope
12 | cout<<"YES"<<endl;
| ^~~~
a.cc:12:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:14:17: error: 'cout' was not declared in this scope
14 | cout<<"YES"<<endl;
| ^~~~
a.cc:14:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:30: error: 'endl' was not declared in this scope
14 | cout<<"YES"<<endl;
| ^~~~
a.cc:14:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:16:17: error: 'cout' was not declared in this scope
16 | cout<<"NO"<<endl;
| ^~~~
a.cc:16:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:29: error: 'endl' was not declared in this scope
16 | cout<<"NO"<<endl;
| ^~~~
a.cc:16:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
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"
| ^
| ;
12 | }
| ~
a.cc:14:22: error: expected ';' before '}' token
14 | cout<<"YES"<<"\n"
| ^
| ;
15 | }
| ~
a.cc:17:21: error: expected ';' before '}' token
17 | cout<<"NO"<<"\n"
| ^
| ;
18 | }
| ~
|
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;i++)
using namespace std;
int main(void){
int a,b,c;
cin >> a >> b >> c;
sort(a,b,c);
if(a==5 && b== 5 && c== 7){
cout << "YES" << endl;
}else{
cout <<"NO" << endl;
}
return 0;
}
|
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/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1908 | std::__final_insertion_sort(__first, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4805:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = int]'
4805 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:21:7: required from here
21 | sort(a,b,c);
| ~~~~^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>'
1780 | __val = _GLIBCXX_MOVE(*__i);
| ^~~~~
In file included from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int')
1780 | __val = _GLIBCXX_MOVE(*__i);
| ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int')
1782 | *__first = _GLIBCXX_MOVE(__val);
| ^~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = int; _Iterator2 = int; _Compare = int]':
/usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1777 | if (__comp(__i, __first))
| ~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1908 | std::__final_insertion_sort(__first, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4805:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = int]'
4805 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:21:7: required from here
21 | sort(a,b,c);
| ~~~~^~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:158:31: error: invalid type argument of unary '*' (have 'int')
158 | { return bool(_M_comp(*__it1, *__it2)); }
| ^~~~~~
/usr/include/c++/14/bits/predefined_ops.h:158:39: error: invalid type argument of unary '*' (have 'int')
158 | { return bool(_M_comp(*__it1, *__it2)); }
| ^~~~~~
/usr/include/c++/14/bits/predefined_ops.h:158:30: error: expression cannot be used as a function
158 | { return bool(_M_comp(*__it1, *__it2)); }
| ~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algo.h:61:
/usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]':
/usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1593 | std::__make_heap(__first, __middle, __comp);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1868 | std::__heap_select(__first, __middle, __last, __comp);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1884 | std::__partial_sort(__first, __last, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1905 | std::__introsort_loop(__first, __last,
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
1906 | std::__lg(__last - __first) * 2,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1907 | __comp);
| ~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4805:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = int]'
4805 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:21:7: required from here
21 | sort(a,b,c);
| ~~~~^~~~~~~
/usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>'
344 | _ValueType;
| ^~~~~~~~~~
/usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>'
346 | _DistanceType;
| ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]':
/usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1596 | std::__pop_heap(__first, __middle, __i, __comp);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1868 | std::__heap_select(__first, __middle, __last, __comp);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1884 | std::__partial_sort(__first, __last, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<int>]'
1905 | std::__introsort_loop(__first, __last,
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
1906 | std::__lg(__last - __first) * 2,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1907 | __comp);
| ~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4805:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = int]'
4805 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:21:7: required from here
21 | sort(a,b,c);
| ~~~~^~~~~~~
/usr/include/c++/14/bits/stl_heap
|
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 '}' token
16 | printf("YES\n")
| ^
| ;
17 | }else{
| ~
main.c:18:15: error: expected ';' before '}' token
18 | printf("NO\n")
| ^
| ;
19 | }
| ~
|
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();
String result = "NO";
if(A==5&&B==5&&C==7){
result = "YES";
}else if(A==5&&B==7&&C==5){
result = "YES";
}else if(A==7&&B==5&&C==5){
result = "YES";
}
System.out.println(result);
}
}
|
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'
a.cc:3:1: error: 'import' does not name a type
3 | import java.util.HashMap;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
5 | public class Main {
| ^~~~~~
|
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.begin(),mozi.end()); //文字列の最初から最後までをクイックソート
for(int i=0;i < N;i++){ //文字を合体させる処理
sum[0] += mozi[i];
}
cout << sum[0] << endl; //出力
return 0;
}
|
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]++
| ^
| ;
12 | if(a[i] == 7)b[1]++
| ~~
|
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 = instance.new Scanner();
instance.solve();
}
private void solve() {
try {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
String answer = "NO";
if (a + b + c == 17) {
if (a == 5) {
if (b == 7 || c == 7) {
answer = "YES";
}
} else if (a == 7) {
if (b == 5 || c == 5) {
answer = "YES";
}
}
}
System.out.println(answer);
}
System.out.println(winner);
} catch (Exception e) {
e.printStackTrace();
}
}
private class Scanner {
String[] s;
int i;
BufferedReader br;
String regex = " ";
public Scanner() {
s = new String[0];
i = 0;
br = new BufferedReader(new InputStreamReader(System.in));
}
@Override
protected void finalize() throws Throwable {
try {
super.finalize();
} finally {
destruction();
}
}
private void destruction() throws IOException {
if (br != null) br.close();
}
public String next() throws IOException {
if (i < s.length) return s[i++];
String st = br.readLine();
while (st == "") st = br.readLine();
s = st.split(regex, 0);
i = 0;
return s[i++];
}
public int nextInt() throws NumberFormatException, IOException {
return Integer.parseInt(next());
}
public Long nextLong() throws NumberFormatException, IOException {
return Long.parseLong(next());
}
public Double nextDouble() throws NumberFormatException, IOException {
return Double.parseDouble(next());
}
}
}
|
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, interface, enum, or record expected
}
^
4 errors
|
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 = instance.new Scanner();
instance.solve();
}
private void solve() {
try {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
String answer = "NO";
if (a + b + c == 17) {
if (a == 5) {
if (b == 7 || c == 7) {
answer == "YES";
}
} else if (a == 7) {
if (b == 5 || c == 5) {
answer == "YES";
}
}
}
System.out.println(answer);
}
System.out.println(winner);
} catch (Exception e) {
e.printStackTrace();
}
}
private class Scanner {
String[] s;
int i;
BufferedReader br;
String regex = " ";
public Scanner() {
s = new String[0];
i = 0;
br = new BufferedReader(new InputStreamReader(System.in));
}
@Override
protected void finalize() throws Throwable {
try {
super.finalize();
} finally {
destruction();
}
}
private void destruction() throws IOException {
if (br != null) br.close();
}
public String next() throws IOException {
if (i < s.length) return s[i++];
String st = br.readLine();
while (st == "") st = br.readLine();
s = st.split(regex, 0);
i = 0;
return s[i++];
}
public int nextInt() throws NumberFormatException, IOException {
return Integer.parseInt(next());
}
public Long nextLong() throws NumberFormatException, IOException {
return Long.parseLong(next());
}
public Double nextDouble() throws NumberFormatException, IOException {
return Double.parseDouble(next());
}
}
}
|
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: illegal start of type
} catch (Exception e) {
^
Main.java:45: error: ';' expected
} catch (Exception e) {
^
Main.java:96: error: class, interface, enum, or record expected
}
^
6 errors
|
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 = instance.new Scanner();
instance.solve();
}
private void solve() {
try {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
String answer = 'NO';
if (a + b + c == 17) {
if (a == 5) {
if (b == 7 || c == 7) {
answer == 'YES';
}
} else if (a == 7) {
if (b == 5 || c == 5) {
answer == 'YES';
}
}
}
System.out.println(answer);
}
System.out.println(winner);
} catch (Exception e) {
e.printStackTrace();
}
}
private class Scanner {
String[] s;
int i;
BufferedReader br;
String regex = " ";
public Scanner() {
s = new String[0];
i = 0;
br = new BufferedReader(new InputStreamReader(System.in));
}
@Override
protected void finalize() throws Throwable {
try {
super.finalize();
} finally {
destruction();
}
}
private void destruction() throws IOException {
if (br != null) br.close();
}
public String next() throws IOException {
if (i < s.length) return s[i++];
String st = br.readLine();
while (st == "") st = br.readLine();
s = st.split(regex, 0);
i = 0;
return s[i++];
}
public int nextInt() throws NumberFormatException, IOException {
return Integer.parseInt(next());
}
public Long nextLong() throws NumberFormatException, IOException {
return Long.parseLong(next());
}
public Double nextDouble() throws NumberFormatException, IOException {
return Double.parseDouble(next());
}
}
}
|
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';
^
Main.java:29: error: unclosed character literal
answer == 'YES';
^
Main.java:29: error: not a statement
answer == 'YES';
^
Main.java:29: error: unclosed character literal
answer == 'YES';
^
Main.java:29: error: not a statement
answer == 'YES';
^
Main.java:33: error: unclosed character literal
answer == 'YES';
^
Main.java:33: error: not a statement
answer == 'YES';
^
Main.java:33: error: unclosed character literal
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: illegal start of type
} catch (Exception e) {
^
Main.java:45: error: ';' expected
} catch (Exception e) {
^
Main.java:96: error: class, interface, enum, or record expected
}
^
15 errors
|
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 < number; i++) {
list.set(i,scan.nextLine());
}
Collections.sort(list);
for (int i = 0; i < number; i++) {
System.out.print(list.get(i));
}
}
}
|
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 | second == 7) & (therd == 5 | therd == 7) & (first + second + therd == 17)) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
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_back
#define ALL(a) (a).begin(),(a).end()
#define FST first
#define SEC second
const int INF = (INT_MAX/2);
const double eps = 1e-14;
const double PI = M_PI;
#define DEB cout<<"!"<<endl
#define SHOW(a,b) cout<<(a)<<" "<<(b)<<endl
#define DIV 1000000009
int main(){
int number[10];
fill_n(number[0],10,1);
int target,K;cin >> target >> K;
REP(i,K){
int a; cin >>a;
number[a] = 0;
}
for(int ans = target; ans < 10000; ans++){
string str = to_string(ans);
REP(j,str.size()){
if(number[str[j] = '0'] == 0)
continue;
}
cout << ans << endl;
break;
}
return 0;
}
|
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: required from here
24 | fill_n(number[0],10,1);
| ~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1184:56: error: no matching function for call to '__iterator_category(int&)'
1184 | std::__iterator_category(__first));
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:65:
/usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: note: candidate: 'template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&)'
239 | __iterator_category(const _Iter&)
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_iterator_base_types.h: In substitution of 'template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&) [with _Iter = int]':
/usr/include/c++/14/bits/stl_algobase.h:1184:35: required from '_OI std::fill_n(_OI, _Size, const _Tp&) [with _OI = int; _Size = int; _Tp = int]'
1184 | std::__iterator_category(__first));
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
a.cc:24:8: required from here
24 | fill_n(number[0],10,1);
| ~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: error: no type named 'iterator_category' in 'struct std::iterator_traits<int>'
239 | __iterator_category(const _Iter&)
| ^~~~~~~~~~~~~~~~~~~
|
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("-------ok--------");
#define all(in) in.begin(), in.end
using namespace std;
typedef pair<int, int> P;
int main(){
int n,n1,n2;
cin >> n >> n1 >> n2;
int array[100] = {0};
array[n]++;
array[n2]++;
array[n2]++;
if(array[7] == 1 || array[5] == 1)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
}
|
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 | else
| ^~~~
|
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_with_stdio(false);
using namespace std;
int h,w,a,b;
int dp[1000002][1000002];
ll solve(int i,int j)
{
if(i <= 0 || i > h || j <= 0 || j > w || (i == a&&b == j))return 0;
if(i == h && j == w) return 1;
if(dp[i][j] != -1) return dp[i][j];
return dp[i][j] = (solve(i+1,j) + solve(i,j+1))%mod;
}
int main()
{
memset(dp,-1,sizeof(dp));
cin >> h >> w >> a >> b
cout << solve(1,1) << endl;
return 0;
}
|
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_with_stdio(false);
using namespace std;
int h,w,a,b;
int dp[1000002][1000002];
ll solve(int i,int j)
{
if(i <= 0 || i > h || j <= 0 || j > w || (i == a&&b == j))return 0;
if(i == h && j == w) return 1;
if(dp[i][j] != -1) return dp[i][j];
return dp[i][j] = (solve(i+1,j) + solve(i,j+1))%mod;
}
int main()
{
memset(dp,-1,sizeof(dp));
cin >> h >> w >> a >> b
cout << solve(1,1) << endl;
return 0;
}
|
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){
| ~~^~~~
a.cc:7:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
7 | answer="YES";
| ^~~~~
| |
| const char*
a.cc:10:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
10 | answer="NO";
| ^~~~
| |
| const char*
|
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.valueOf(N).length();
for(int i=maxD-1;i>=0;i--)
{
int x = N/(int)(Math.pow(10,i));
N = N%(int)Math.pow(10, i);
if(d[x]==1)
{
{
for(int j=x;j<10;j++)
{ if(d[j]!=1)
{
x=j;
break;
}
else
if(j==9)
{ j=-1;
start9=1;
}
}
}
}
if(i==(maxD-1) && start9==1)
sum = sum+10*(int)Math.pow(10,i);
else
sum = sum+x*(int)Math.pow(10,i);
if(N==0)
break;
}
System.out.print(sum);
}
}
|
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){
printf("NO\n");
return 0;
}
printf("YES\n");
return 0;
}
|
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 += arr[i];
}
return 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>,Comparator<? super T#2>) is not applicable
(cannot infer type-variable(s) T#2
(actual and formal argument lists differ in length))
where T#1,T#2 are type-variables:
T#1 extends Comparable<? super T#1> declared in method <T#1>sort(List<T#1>)
T#2 extends Object declared in method <T#2>sort(List<T#2>,Comparator<? super T#2>)
Main.java:23: error: incompatible types: unexpected return value
return result;
^
2 errors
|
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) {
int intW = Integer.parseInt(w.trim());
if (intW != 5 && intW != 7) {
System.out.println("NO");
return;
} else if (intW == 7 && w7) {
System.out.println("NO");
return;
} else if (intW == 5 && w5[0] && w5[1]) {
System.out.println("NO");
return;
} else if (intW == 7 && w7 == false) {
w7 = true;
} else if (intW == 5) {
if (w5[0] == false) {
w5[0] = true;
} else if (w5[1] == false) {
w5[1] = true;
}
}
}
if (w7 && w5[0] && w5[1]) {
System.out.println("YES");
}
}
}
|
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 << "NO" << endl;
return 0;
}
|
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?
| ^~~~~
| cout
|
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" << endl;
return 0;
}
|
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 | std::count(v.begin(),v.end(),7)==1 && std::count(v.begin(), v.end(), 5)==2?
| ^~~~~
| cout
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.