submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s003644652
|
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
|
s053891686
|
p04043
|
C
|
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
int int_sort( const void * a , const void * b ) {
/* 引数はvoid*型と規定されているのでint型にcastする */
if( *( int * )a < *( int * )b ) {
return -1;
}
else
if( *( int * )a == *( int * )b ) {
return 0;
}
return 1;
}
void delnumber(int K[], const int D_k[], int k){
int K_size = 10; //sizeof(k) / sizeof(k[0]);
int D_size = k; //sizeof(D_k) / sizeof(D_k[0]);
//printf("%d, %d", K_size, D_size);
for(int i = 0; i < K_size; i++){
for(int j = 0; j< D_size; j++){
//printf("i = %d, j = %d\n", i, j);
if(K[i] == D_k[j]){
K[i] = INT_MAX;
}
}
}
}
int makenumber(int K[], int N){
while()
return 0;
}
int main(){
int K[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
int N, k;
scanf("%d %d", &N , &k);
int D_k[k];
int D_kCounter = 1;
for(int i = 0; i<k; i++){
scanf("%d", &D_k[i]);
D_kCounter = D_kCounter * D_k[i];
}
if(D_kCounter == 362880){
printf("failed");
return -1;
}
delnumber(K, D_k, k);
qsort(K, 10, sizeof(int), int_sort);;
return 0;
}
|
main.c: In function 'makenumber':
main.c:33:9: error: expected expression before ')' token
33 | while()
| ^
|
s223048175
|
p04043
|
C++
|
#include<iostream>
#include<stdio.h>
#include<cstdio>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A*B == 35 && C==5 ){
cout << "YES"<< endl;
}else if(A*C == 35 && B=5){
cout << "YES" << endl;
}else{
cout << "NO" <<endl;
}
}
|
a.cc: In function 'int main()':
a.cc:10:24: error: lvalue required as left operand of assignment
10 | }else if(A*C == 35 && B=5){
| ~~~~~~~~~~^~~~
|
s241994399
|
p04043
|
C++
|
#include<iostream>
#include<stdio.h>
#include<cstdio>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if(A*B == 35 && C==5 ){
cout << 'YES'<< endl;
}else if(A*C == 35 && B=5){
cout << 'YES' << endl;
}else{
cout << 'NO';
}
}
|
a.cc:9:13: warning: multi-character character constant [-Wmultichar]
9 | cout << 'YES'<< endl;
| ^~~~~
a.cc:11:13: warning: multi-character character constant [-Wmultichar]
11 | cout << 'YES' << endl;
| ^~~~~
a.cc:13:13: warning: multi-character character constant [-Wmultichar]
13 | cout << 'NO';
| ^~~~
a.cc: In function 'int main()':
a.cc:10:24: error: lvalue required as left operand of assignment
10 | }else if(A*C == 35 && B=5){
| ~~~~~~~~~~^~~~
|
s046645031
|
p04043
|
C++
|
#include<stdio.h>
#include<string.h>
int main(void) {
char str[102][102], temp[102];
int N, L, i;
scanf("%d %d", &N, &L);
gets(temp);
for (L = 0;L < N;L++)
gets(str[L]);
for (L = 0;L < N-1;L++) {
for (i = 0;i < N - 1;i++) {
if (strcmp(str[i], str[i + 1]) > 0) {
strcpy(temp, str[i]);
strcpy(str[i], str[i + 1]);
strcpy(str[i + 1], temp);
}
}
}
for (i = 0;i < N;i++)
printf("%s", str[i]);
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(temp);
| ^~~~
| getw
|
s494118252
|
p04043
|
Java
|
package abc042;
import java.util.Scanner;
public class Iroha_and_Haiku {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
int A = stdIn.nextInt();
int B = stdIn.nextInt();
int C = stdIn.nextInt();
if(A == 5 && B == 5 && C == 7)
System.out.println("Yes");
else if(A == 5 && B == 7 && C == 5)
System.out.println("Yes");
else if(A == 7 && B == 5 && C == 5)
System.out.println("Yes");
else
System.out.println("No");
}
}
|
Main.java:5: error: class Iroha_and_Haiku is public, should be declared in a file named Iroha_and_Haiku.java
public class Iroha_and_Haiku {
^
1 error
|
s112551377
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
if((a == 5 || a == 7) && (b == 5 || b == 7) && (c == 5 || c == 7) ){
cout >> "YES" >> endl;
}
else{
cout >> "NO" >> endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:9:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
9 | cout >> "YES" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/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:9:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
In file included from /usr/include/c++/14/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:9:17: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> "YES" >> endl;
| ^~~~
In file included from /usr/include/c++/14/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:9:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]':
a.cc:9:11: required from here
9 | cout >> "YES" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:12:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]')
12 | cout >> "NO" >> endl;
| ~~~~ ^~ ~~~~
| | |
| | const char [3]
| std::ostream {aka std::basic_ostream<char>}
/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:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> "NO" >> endl;
| ^~~~
/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:12:17: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
12 | cout >> "NO" >> endl;
| ^~~~
/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:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
12 | cout >> "NO" >> 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:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "NO" >> 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:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
12 | cout >> "NO" >> 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:12:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 's
|
s723569868
|
p04043
|
Java
|
import java.util.Arrays;
import java.util.Scanner;
public class Test {
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int ab[] = new int[3];
ab[0] = scan.nextInt();
ab[1] = scan.nextInt();
ab[2] = scan.nextInt();
Arrays.sort(ab);
if(ab[0] == 5 && ab[1] == 5 && ab[2] == 7) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:3: error: class Test is public, should be declared in a file named Test.java
public class Test {
^
1 error
|
s514722465
|
p04043
|
Java
|
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b = scan.next();
String c = scan.next();
int ab[] = new int[3];
ab[0] = Integer.valueOf(a).intValue();
ab[1] = Integer.valueOf(b).intValue();
ab[2] = Integer.valueOf(c).intValue();
Arrays.sort(ab);
if(ab[0] == 5 && ab[1] == 5 && ab[2] == 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
|
s904354176
|
p04043
|
Java
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
public class Test {
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b = scan.next();
String c = scan.next();
int ab[] = new int[3];
ab[0] = Integer.valueOf(a).intValue();
ab[1] = Integer.valueOf(b).intValue();
ab[2] = Integer.valueOf(c).intValue();
Arrays.sort(ab);
if(ab[0] == 5 && ab[1] == 5 && ab[2] == 7) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:5: error: class Test is public, should be declared in a file named Test.java
public class Test {
^
1 error
|
s349623181
|
p04043
|
Java
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
public class Test {
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b = scan.next();
String c = scan.next();
int ab[] = new int[3];
ab[0] = Integer.valueOf(a).intValue();
ab[1] = Integer.valueOf(b).intValue();
ab[2] = Integer.valueOf(c).intValue();
Arrays.sort(ab);
if(ab[0] == 5 && ab[1] == 5 && ab[2] == 7) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:7: error: class Test is public, should be declared in a file named Test.java
public class Test {
^
1 error
|
s136715032
|
p04043
|
C++
|
#!/usr/bin/env python
line = raw_input()
if line.count('5') == 2 and line.count('7') == 1:
print "YES"
else:
print "NO"
|
a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python
| ^
a.cc:3:1: error: 'line' does not name a type
3 | line = raw_input()
| ^~~~
|
s267707293
|
p04043
|
C++
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int five = 0;
int seven = 0;
for(int i = 0; i < 3; i++) {
int n = sc.nextInt();
if(n == 5) five++;
if(n == 7) seven++;
}
if(five == 2 && seven == 1) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s714456249
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
//define
#define ALL(a) a.begin(),a.end()
#define REP(i,n) for(int i=0;i<n;i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define debug(x) if(1) cout<<#x<<":"<<x<<endl;
#define DEBUG(x) if(1) cout<<#x<<":"<<x<<endl;
#define ll long long
//constant
const int MOD=1000000007;
const int INF=INT_MAX/3-1;
const double EPS=1e-9;
const int dx4[]={1,0,-1,0};
const int dy4[]={0,1,0,-1};
//typedef
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
int main(){
int a[3];
cin>>a>>b>>c;
int cf=0,cs=0;
REP(i,3){
if(a[i]==5)
cf++;
if(a[i]==7)
cs++;
}
if(cs==1&&cf==5)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:25:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [3]')
25 | cin>>a>>b>>c;
| ~~~^~~
| | |
| | int [3]
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*'
25 | cin>>a>>b>>c;
| ^
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: invalid conversion from 'int*' to 'short int' [-fpermissive]
25 | cin>>a>>b>>c;
| ^
| |
| int*
a.cc:25:10: error: cannot bind rvalue '(short int)((int*)(& a))' to 'short int&'
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive]
25 | cin>>a>>b>>c;
| ^
| |
| int*
a.cc:25:10: error: cannot bind rvalue '(short unsigned int)((int*)(& a))' to 'short unsigned int&'
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: invalid conversion from 'int*' to 'int' [-fpermissive]
25 | cin>>a>>b>>c;
| ^
| |
| int*
a.cc:25:10: error: cannot bind rvalue '(int)((int*)(& a))' to 'int&'
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive]
25 | cin>>a>>b>>c;
| ^
| |
| int*
a.cc:25:10: error: cannot bind rvalue '(unsigned int)((int*)(& a))' to 'unsigned int&'
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: invalid conversion from 'int*' to 'long int' [-fpermissive]
25 | cin>>a>>b>>c;
| ^
| |
| int*
a.cc:25:10: error: cannot bind rvalue '(long int)((int*)(& a))' to 'long int&'
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive]
25 | cin>>a>>b>>c;
| ^
| |
| int*
a.cc:25:10: error: cannot bind rvalue '(long unsigned int)((int*)(& a))' to 'long unsigned int&'
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: invalid conversion from 'int*' to 'long long int' [-fpermissive]
25 | cin>>a>>b>>c;
| ^
| |
| int*
a.cc:25:10: error: cannot bind rvalue '(long long int)((int*)(& a))' to 'long long int&'
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive]
25 | cin>>a>>b>>c;
| ^
| |
| int*
a.cc:25:10: error: cannot bind rvalue '(long long unsigned int)((int*)(& a))' to 'long long unsigned int&'
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:25:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
25 | cin>>a>>b>>c;
| ^
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int [3]' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int [3]' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int [3]' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int [3]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'int [3]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note
|
s427352685
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main() {
// your code goes here
int a,b,c;cin >> a >> b>> c;
if(a+b+c==17&&a*b*c==175){
cout << "YES" << endl;
}else{
cout <<"NO"<<endl;
}
return 0;
}
return 0;
}
|
a.cc:21:9: error: expected unqualified-id before 'return'
21 | return 0;
| ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
22 | }
| ^
|
s789733877
|
p04043
|
C++
|
#inlcude <iostream>
using namespace std;
int main(){
int a,b,c;cin >> a >> b>> c;
if(a+b+c==17&&a*b*c==175){
cout << "YES" << endl;
}else{
cout <<"NO"<<endl;
}
return 0;
}
|
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude <iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:4:11: error: 'cin' was not declared in this scope
4 | int a,b,c;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 | #inlcude <iostream>
a.cc:6:1: error: 'cout' was not declared in this scope
6 | cout << "YES" << endl;
| ^~~~
a.cc:6:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:18: error: 'endl' was not declared in this scope
6 | 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 | #inlcude <iostream>
a.cc:8:1: error: 'cout' was not declared in this scope
8 | cout <<"NO"<<endl;
| ^~~~
a.cc:8:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:14: error: 'endl' was not declared in this scope
8 | cout <<"NO"<<endl;
| ^~~~
a.cc:8:14: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s943827808
|
p04043
|
C++
|
#include<stdio.h>
#include<iostream>
#include<fstream>
#include<string.h>
#include<algorithm>
#include<functional>
using namespace std;
int main(void){
int A, B, C;
ifs >> A >> B >> C;
int go=0, nana=0;
if (A == 5)go++;
else if (A == 7)nana++;
if (B == 5)go++;
else if (B == 7)nana++;
if (C == 5)go++;
else if (C == 7)nana++;
if (go == 2 && nana == 1)cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:9: error: 'ifs' was not declared in this scope; did you mean 'ffs'?
12 | ifs >> A >> B >> C;
| ^~~
| ffs
|
s154087698
|
p04043
|
C++
|
#include <iostream>
#include <string>
using namespace std;
int n,l;
string tab[101];
int main() {
cin >> n >> l;
for (int i = 0; i < n; i++) cin >> tab[i];
sort(tab, tab+n);
for (int i = 0; i < n; i++) cout <<tab[i];
cout <<"\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:1: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(tab, tab+n);
| ^~~~
| short
|
s978523512
|
p04043
|
C++
|
#include <iostream>
#include <string>
using namespace std;
string tab[101];
int main() {
cin >> n >> l;
for (int i = 0; i < n; i++) cin >> tab[i];
sort(tab, tab+n);
for (int i = 0; i < n; i++) cout <<tab[i];
cout <<"\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:7:8: error: 'n' was not declared in this scope
7 | cin >> n >> l;
| ^
a.cc:7:13: error: 'l' was not declared in this scope
7 | cin >> n >> l;
| ^
a.cc:9:1: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(tab, tab+n);
| ^~~~
| short
|
s917497922
|
p04043
|
C++
|
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector<int> v;
int a,b,c;
cin >> a >> b >> c;
v.push_back(a);
v.push_back(b);
v.push_back(c);
sort(v.begin(), v.end();
if(v[0] == 5 && v[1] == 5 && v[2] == 7){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:13:24: error: expected ')' before ';' token
13 | sort(v.begin(), v.end();
| ~ ^
| )
|
s327028555
|
p04043
|
C++
|
#include <iostream>
#include <vector>
#include <alogrithm>
using namespace std;
int main(){
vector<int> v;
int a,b,c;
cin >> a >> b >> c;
v.push_back(a);
v.push_back(b);
v.push_back(c);
sort(v.begin(), v.end();
if(v[0] == 5 && v[1] == 5 && v[2] == 7){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
}
|
a.cc:3:10: fatal error: alogrithm: No such file or directory
3 | #include <alogrithm>
| ^~~~~~~~~~~
compilation terminated.
|
s331481615
|
p04043
|
C
|
#include<stdio.h>
int main() {
int a, b, c;
int check=false;
scanf("%d %d %d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7)
check = true;
else if (a == 5 && b == 7 && c == 5)
check = true;
else if (a == 7 && b == 5 && c == 5)
check = true;
if (check == true)
puts("YES");
else
puts("NO");
return 0;
}
|
main.c: In function 'main':
main.c:6:19: error: 'false' undeclared (first use in this function)
6 | int check=false;
| ^~~~~
main.c:2:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:6:19: note: each undeclared identifier is reported only once for each function it appears in
6 | int check=false;
| ^~~~~
main.c:9:25: error: 'true' undeclared (first use in this function)
9 | check = true;
| ^~~~
main.c:9:25: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
|
s687865559
|
p04043
|
C
|
#include<stdio.h>
int main() {
int a, b, c;
bool check=false;
scanf("%d %d %d", &a, &b, &c);
if (a == 5 && b == 5 && c == 7)
check = true;
else if (a == 5 && b == 7 && c == 5)
check = true;
else if (a == 7 && b == 5 && c == 5)
check = true;
if (check == true)
puts("YES");
else
puts("NO");
return 0;
}
|
main.c: In function 'main':
main.c:6:9: error: unknown type name 'bool'
6 | bool check=false;
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:6:20: error: 'false' undeclared (first use in this function)
6 | bool check=false;
| ^~~~~
main.c:6:20: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:25: error: 'true' undeclared (first use in this function)
9 | check = true;
| ^~~~
main.c:9:25: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
|
s521362472
|
p04043
|
C++
|
#include <iostream>
#include <vector>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
vector<int> v{a, b, c};
sort(v.begin(), v.end());
if (v[0] == 5 && v[1] == 5 && v[2] == 7) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(v.begin(), v.end());
| ^~~~
| short
|
s775273993
|
p04043
|
Java
|
mport java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int judgement5 = 0;
int judgement7 = 0;
int[] number = new int[3];
for (int i = 0; i < number.length; i++) {
number[i] = sc.nextInt();
}
for (int i : number) {
if (i == 5) {
judgement5++;
} else if (i == 7) {
judgement7++;
}
}
if (judgement5 == 2 && judgement7 == 1) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
|
s795801914
|
p04043
|
C++
|
#include<iostream>
#include<string>
using namespace std;
const int MAX=100;
int main()
{
int N,L;
string S[MAX];
cin >> N >> L ;
for(int i=0; i<N ; i++)
{
cin >> S[i];
}
sort(S,S+N);
string res="";
for(int i=0; i<N ; i++)
{
res+=S[i];
}
cout << res << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(S,S+N);
| ^~~~
| short
|
s072727726
|
p04043
|
C
|
#include <stdio.h>
int main(){
int a,b,c;
scanf("%d ",&a);
scanf("%d ",&b);
scanf("%d ",&c);
if(a==5&&b==5){
if(c==7){
printf("YES");
}else {
printf("NO");
}
}else if((a==5&&b==7)||(b==5&&a==7){
if(c==5){
printf("YES");
}else{
printf("NO");
}
}
}
|
main.c: In function 'main':
main.c:13:44: error: expected ')' before '{' token
13 | }else if((a==5&&b==7)||(b==5&&a==7){
| ~ ^
| )
main.c:20:1: error: expected expression before '}' token
20 | }
| ^
|
s303878377
|
p04043
|
C
|
#include <stdio.h>
int main(){
int a,b,c;
scanf("%d ",&a);
scanf("%d ",&b);
scanf("%d ",&c);
if((a==5)&&(b==5){
if(c==7){
printf("YES");
}else {
printf("NO");
}
}else if((a==5&&b==7)||(b==5&&a==7){
if(c==5){
printf("YES");
}else{
printf("NO");
}
}
}
|
main.c: In function 'main':
main.c:7:26: error: expected ')' before '{' token
7 | if((a==5)&&(b==5){
| ~ ^
| )
main.c:20:1: error: expected declaration or statement at end of input
20 | }
| ^
|
s317202792
|
p04043
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int N[2];
int count5,count7;
count5=0;
count7=0;
for(int i=0 ; i<3 ; i++ ){
cin >> N[i];
if(N[i]=5){
count5++;
}else if(N[i]=7){
count7++;
}
}
if(count5=2 && count7=1){
cout << "YES";
}else{
cout << "NO";
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:28:21: error: lvalue required as left operand of assignment
28 | if(count5=2 && count7=1){
| ~~^~~~~~~~~
|
s147728672
|
p04043
|
C++
|
#include<bits/stdc++.h>
use namespace std;
int main()
{
int N[2];
int count5,count7;
count5=0;
count7=0;
for(int i=0 ; i<3 ; i++ ){
cin >> N[i];
if(N[i]=5){
count5++;
}else if(N[i]=7){
count7++;
}
}
if(count5=2 && count7=1){
cout << "YES";
}else{
cout << "NO";
}
return 0;
}
|
a.cc:2:1: error: 'use' does not name a type
2 | use namespace std;
| ^~~
a.cc: In function 'int main()':
a.cc:14:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
14 | cin >> N[i];
| ^~~
| 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:28:21: error: lvalue required as left operand of assignment
28 | if(count5=2 && count7=1){
| ~~^~~~~~~~~
a.cc:29:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
29 | cout << "YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:31:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
31 | cout << "NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s772691362
|
p04043
|
C++
|
#include<iostream>
use namespace std;
int main()
{
int N[2];
int count5,count7;
count5=0;
count7=0;
for(int i=0 ; i<3 ; i++ ){
cin >> N[i];
if(N[i]=5){
count5++;
}else if(N[i]=7){
count7++;
}
}
if(count5=2 && count7=1){
cout << "YES";
}else{
cout << "NO";
}
return 0;
}
|
a.cc:2:1: error: 'use' does not name a type
2 | use namespace std;
| ^~~
a.cc: In function 'int main()':
a.cc:14:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
14 | cin >> N[i];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:28:21: error: lvalue required as left operand of assignment
28 | if(count5=2 && count7=1){
| ~~^~~~~~~~~
a.cc:29:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
29 | cout << "YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:31:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
31 | cout << "NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s355331696
|
p04043
|
C++
|
#include<iostream>
use namespace std;
int main()
{
int num[2];
int count5,count7;
count5=0;
count7=0;
for(int i=0 ; i<3 ; i++ ){
cin >> num[i];
if(num(i)=5){
count5++;
}else if(num(i)=7){
count7++;
}
}
if(count5=2 && count7=1){
cout << "YES";
}else{
cout << "NO";
}
return 0;
}
|
a.cc:2:1: error: 'use' does not name a type
2 | use namespace std;
| ^~~
a.cc: In function 'int main()':
a.cc:14:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
14 | cin >> num[i];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:16:23: error: 'num' cannot be used as a function
16 | if(num(i)=5){
| ~~~^~~
a.cc:20:29: error: 'num' cannot be used as a function
20 | }else if(num(i)=7){
| ~~~^~~
a.cc:28:21: error: lvalue required as left operand of assignment
28 | if(count5=2 && count7=1){
| ~~^~~~~~~~~
a.cc:29:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
29 | cout << "YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:31:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
31 | cout << "NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s635998218
|
p04043
|
C++
|
#include<iostream>
use namespace std;
int main()
{
int num[2];
int count5,count7;
count5=0;
count7=0;
for(i=0 ; i<3 ; i++ ){
cin >> num[i];
if(num(i)=5){
count5++;
}else if(num(i)=7){
count7++;
}
}
if(count5=2 && count7=1){
cout << "YES";
}else{
cout << "NO";
}
return 0;
}
|
a.cc:2:1: error: 'use' does not name a type
2 | use namespace std;
| ^~~
a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
12 | for(i=0 ; i<3 ; i++ ){
| ^
a.cc:14:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
14 | cin >> num[i];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:16:23: error: 'num' cannot be used as a function
16 | if(num(i)=5){
| ~~~^~~
a.cc:20:29: error: 'num' cannot be used as a function
20 | }else if(num(i)=7){
| ~~~^~~
a.cc:28:21: error: lvalue required as left operand of assignment
28 | if(count5=2 && count7=1){
| ~~^~~~~~~~~
a.cc:29:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
29 | cout << "YES";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:31:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
31 | cout << "NO";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s670637164
|
p04043
|
C++
|
#include<iostream>
use namespace std;
int main()
{
int num[2];
int count5,count7;
count5=0;
count7=0;
for(i=0 ; i<3 ; i++ ){
cin >> num[i];
if(num(i)=5){
count5++;
}else if(num(i)=7){
count7++;
}
}
if(count5=2 && count7=1){
cout << "YES"
}else{
cout << "NO"
}
return 0;
}
|
a.cc:2:1: error: 'use' does not name a type
2 | use namespace std;
| ^~~
a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
12 | for(i=0 ; i<3 ; i++ ){
| ^
a.cc:14:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
14 | cin >> num[i];
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:16:23: error: 'num' cannot be used as a function
16 | if(num(i)=5){
| ~~~^~~
a.cc:18:29: error: 'num' cannot be used as a function
18 | }else if(num(i)=7){
| ~~~^~~
a.cc:24:21: error: lvalue required as left operand of assignment
24 | if(count5=2 && count7=1){
| ~~^~~~~~~~~
a.cc:25:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
25 | cout << "YES"
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:27:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
27 | cout << "NO"
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s062606992
|
p04043
|
C++
|
#include <iostream>
#include <string>
int main(void)
{
string A, B, C;
std::cin >> A >> B >> C;
std::cout << A << "," << B << "," << C << endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
6 | string A, B, C;
| ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:7:15: error: 'A' was not declared in this scope
7 | std::cin >> A >> B >> C;
| ^
a.cc:7:20: error: 'B' was not declared in this scope
7 | std::cin >> A >> B >> C;
| ^
a.cc:7:25: error: 'C' was not declared in this scope
7 | std::cin >> A >> B >> C;
| ^
a.cc:9:45: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | std::cout << A << "," << B << "," << C << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s612980353
|
p04043
|
C++
|
#include <stdio.h>
#include<argorithm>
int a,b,c;
int main(){
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
int f[3] = {a,b,c};
sort(f);
if(f == {5,5,7}){
printf("YES/n");
return 0
}
else{printf("NO/n");
return 0;
}
}
|
a.cc:2:9: fatal error: argorithm: No such file or directory
2 | #include<argorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s142387602
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int d[10];
d[a]++;
d[b]++;
d[c]++;
if(d[5]==2&&d[7]==1)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
}
|
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
1 | #include <iostream>
| ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin\U0000ff1e\U0000ff1ea\U0000ff1e\U0000ff1eb\U0000ff1e\U0000ff1ec' was not declared in this scope
6 | cin>>a>>b>>c;
| ^~~~~~~~~~~~~~~~~~
a.cc:13:1: error: 'cout\U0000ff1c\U0000ff1c' was not declared in this scope
13 | cout<<"YES"<<endl;
| ^~~~~~~~
a.cc:15:1: error: 'cout\U0000ff1c\U0000ff1c' was not declared in this scope
15 | cout<<"NO"<<endl;
| ^~~~~~~~
|
s249179131
|
p04043
|
Java
|
import java.util.*;
public class ren{
public static void main (String[ ]args){
Scanner scan=new Scanner(System.in) ;
int a=scan.nextInt();
int b=scan.nextInt();
int c=scan.nextInt();
if(a==7&&b==5&&c==5){System.out.println("YES");}
else if(a==5&&b==7&&c==5){System.out.println("YES");}
else if(a==5&&b==5&&c==7){System.out.println("YES");}
else{System.out.println("NO");}
}
}
|
Main.java:2: error: class ren is public, should be declared in a file named ren.java
public class ren{
^
1 error
|
s959594279
|
p04043
|
C
|
#include <stdio.h>
int main (void)
{
int v[2], i ;
printf("整数を入力してください");
for(i=0; i<2 ; i++)
printf("%dつ目",i+1);
do{
scanf("%d",&v[i]);
if(v[i]<1||v[i]>10)
printf("1~10で入力してください:");
}while(v[i]<1||v[i]>10);
if (v[0]==7 && v[1]==5 && v[2]==5 )
printf("Yes");
else if (v[1]==7&&v[0]==5&&v[2] ==5)
printf("Yes");
else if (v[2]==7&&v[0]==5&&v[1]==5 )
printf("Yes");
else
prinyf("No");
return 0;
}
|
main.c: In function 'main':
main.c:21:1: error: implicit declaration of function 'prinyf'; did you mean 'printf'? [-Wimplicit-function-declaration]
21 | prinyf("No");
| ^~~~~~
| printf
|
s786273043
|
p04043
|
C
|
#include <stdio.h>
int main (void)
{
int v[2], i ;
printf("整数を入力してください");
for(i=0; i<2 ; i++)
printf("%dつ目",i+1);
do{
scanf("%d",&v[i]);
if(v[i]<1||v[i]>10)
printf("1~10で入力してください:");
}while(v[i]<1||v[i]>10);
if (v[0]==7 && v[1]==5 && v[2]==5 || v[1]==7 && v[0] ==5 && v[2] ==5 || v[2] ==7 && v[1]==5 && v[0]==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c: In function 'main':
main.c:18:8: error: 'o' undeclared (first use in this function)
18 | return o;
| ^
main.c:18:8: note: each undeclared identifier is reported only once for each function it appears in
|
s815540129
|
p04043
|
C
|
#include <stdio.h>
int main (void)
{
int v[2], i ;
printf("整数を入力してください");
for(i=0; i<2 ; i++)
printf("%dつ目",i+1);
do{
scanf("%d",&v[i]);
if(v[i]<1||v[i]>10)
printf("1~10で入力してください:");
}while(v[i]<1||v[i]>10);
if (v[0]==7&&v[1]==5&&v[2]==5||v[1]==7&&v[0]==5&&v[2]==5||v[2]==7&&v[1]==5&&v[0]==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c: In function 'main':
main.c:18:8: error: 'o' undeclared (first use in this function)
18 | return o;
| ^
main.c:18:8: note: each undeclared identifier is reported only once for each function it appears in
|
s335062525
|
p04043
|
C
|
#include <stdio.h>
int main (void)
{
int v[2], i ;
printf("整数を入力してください")
for(i=0; i<2 ; i++)
printf("%dつ目",i+1);
do{
scanf("%d",&v[i]);
if(v[i]<1||v[i]>10)
printf("1~10で入力してください:");
}while(v[i]<1||v[i]>10)
if (v[0]==7&&v[1]==5&&v[2]==5||v[1]==7&&v[0]==5&&v[2]==5||v[2]==7&&v[1]==5&&v[0]==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c: In function 'main':
main.c:5:33: error: expected ';' before 'for'
5 | printf("整数を入力してください")
| ^
| ;
6 | for(i=0; i<2 ; i++)
| ~~~
main.c:12:24: error: expected ';' before 'if'
12 | }while(v[i]<1||v[i]>10)
| ^
| ;
13 |
14 | if (v[0]==7&&v[1]==5&&v[2]==5||v[1]==7&&v[0]==5&&v[2]==5||v[2]==7&&v[1]==5&&v[0]==5)
| ~~
main.c:16:1: error: 'else' without a previous 'if'
16 | else
| ^~~~
main.c:18:8: error: 'o' undeclared (first use in this function)
18 | return o;
| ^
main.c:18:8: note: each undeclared identifier is reported only once for each function it appears in
|
s704650783
|
p04043
|
C
|
#include <stdio.h>
#difine
int main (void)
{
int v[2], i ;
printf("整数を入力してください")
for(i=0; i<2 ; i++)
printf("%dつ目",i+1);
do{
scanf("%d",&v[i]);
if(v[i]<1||v[i]>10)
printf("1~10で入力してください:");
}while(v[i]<1||v[i]>10)
if (v[0]==7&&v[1]==5&&v[2]==5||v[1]==7&&v[0]==5&&v[2]==5||v[2]==7&&v[1]==5&&v[0]==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c:2:2: error: invalid preprocessing directive #difine; did you mean #define?
2 | #difine
| ^~~~~~
| define
main.c: In function 'main':
main.c:6:33: error: expected ';' before 'for'
6 | printf("整数を入力してください")
| ^
| ;
7 | for(i=0; i<2 ; i++)
| ~~~
main.c:13:24: error: expected ';' before 'if'
13 | }while(v[i]<1||v[i]>10)
| ^
| ;
14 |
15 | if (v[0]==7&&v[1]==5&&v[2]==5||v[1]==7&&v[0]==5&&v[2]==5||v[2]==7&&v[1]==5&&v[0]==5)
| ~~
main.c:17:1: error: 'else' without a previous 'if'
17 | else
| ^~~~
main.c:19:8: error: 'o' undeclared (first use in this function)
19 | return o;
| ^
main.c:19:8: note: each undeclared identifier is reported only once for each function it appears in
|
s260616666
|
p04043
|
Java
|
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] strs = br.readLine().split(" ");
int count_five = 0;
int count_seven =0;
for(String s : strs){
if(s.equals("5")){
count_five++;
}else if (s.equals("7")){
count_seven++;
}
}
if (count_five == 2 && count_seven == 1){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
|
Main.java:3: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:3: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:3: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
3 errors
|
s436596198
|
p04043
|
Java
|
public class Main{
public static void main (String[]args){
int a=new java.util.Scanner(System.in).nextLine();
int b=new java.util.Scanner(System.in).nextLine();
int c=new java.util.Scanner(System.in).nextLine();
if(a==7&&b==5&&c==5){System.out.println("YES");}
else if(a==5&&b==7&&c==5){System.out.println("YES");}
else if(a==5&&b==5&&c==7){System.out.println("YES");}
else{System.out.println("NO");}
}
}
|
Main.java:3: error: incompatible types: String cannot be converted to int
int a=new java.util.Scanner(System.in).nextLine();
^
Main.java:4: error: incompatible types: String cannot be converted to int
int b=new java.util.Scanner(System.in).nextLine();
^
Main.java:5: error: incompatible types: String cannot be converted to int
int c=new java.util.Scanner(System.in).nextLine();
^
3 errors
|
s002912343
|
p04043
|
Java
|
public class Main{
public static void main (String[]args){
int a=new java.util.Scanner(System.in).nextInt();
int b=new java.util.Scanner(System.in).nextInt();
int c=new java.util.Scanner(System.in).nextInt();
if(a==7&&b==5&&c==5){Sytem.out.println("YES");}
else if(a==5&&b==7&&c==5){Sytem.out.println("YES");}
else if(a==5&&b==5&&c==7){Sytem.out.println("YES");}
else{System.out.println("NO");}
}
}
|
Main.java:6: error: package Sytem does not exist
if(a==7&&b==5&&c==5){Sytem.out.println("YES");}
^
Main.java:7: error: package Sytem does not exist
else if(a==5&&b==7&&c==5){Sytem.out.println("YES");}
^
Main.java:8: error: package Sytem does not exist
else if(a==5&&b==5&&c==7){Sytem.out.println("YES");}
^
3 errors
|
s393223842
|
p04043
|
Java
|
public class Main{
public static void main (String[]args){
int a=new java.util.Scanner(System.in).nextLine();
int b=new java.util.Scanner(System.in).nextLine();
int c=new java.util.Scanner(System.in).nextLine();
if(a==7&&b==5&&c==5){Sytem.out.println("YES");}
else if(a==5&&b==7&&c==5){Sytem.out.println("YES");}
else if(a==5&&b==5&&c==7){Sytem.out.println("YES");}
else{System.out.println("NO");}
}
}
|
Main.java:3: error: incompatible types: String cannot be converted to int
int a=new java.util.Scanner(System.in).nextLine();
^
Main.java:4: error: incompatible types: String cannot be converted to int
int b=new java.util.Scanner(System.in).nextLine();
^
Main.java:5: error: incompatible types: String cannot be converted to int
int c=new java.util.Scanner(System.in).nextLine();
^
Main.java:6: error: package Sytem does not exist
if(a==7&&b==5&&c==5){Sytem.out.println("YES");}
^
Main.java:7: error: package Sytem does not exist
else if(a==5&&b==7&&c==5){Sytem.out.println("YES");}
^
Main.java:8: error: package Sytem does not exist
else if(a==5&&b==5&&c==7){Sytem.out.println("YES");}
^
6 errors
|
s370199832
|
p04043
|
Java
|
public class Main{
public static void main (String[]args){
String a=new java.util.Scanner(System.in).nextLine();
String b=new java.util.Scanner(System.in).nextLine();
String c=new java.util.Scanner(System.in).nextLine();
if(a==7&&b==5&&c==5){Sytem.out.println("YES");}
else if(a==5&&b==7&&c==5){Sytem.out.println("YES");}
else if(a==5&&b==5&&c==7){Sytem.out.println("YES");}
else{System.out.println("NO");}
}
}
|
Main.java:6: error: bad operand types for binary operator '=='
if(a==7&&b==5&&c==5){Sytem.out.println("YES");}
^
first type: String
second type: int
Main.java:6: error: bad operand types for binary operator '=='
if(a==7&&b==5&&c==5){Sytem.out.println("YES");}
^
first type: String
second type: int
Main.java:6: error: bad operand types for binary operator '=='
if(a==7&&b==5&&c==5){Sytem.out.println("YES");}
^
first type: String
second type: int
Main.java:6: error: package Sytem does not exist
if(a==7&&b==5&&c==5){Sytem.out.println("YES");}
^
Main.java:7: error: bad operand types for binary operator '=='
else if(a==5&&b==7&&c==5){Sytem.out.println("YES");}
^
first type: String
second type: int
Main.java:7: error: bad operand types for binary operator '=='
else if(a==5&&b==7&&c==5){Sytem.out.println("YES");}
^
first type: String
second type: int
Main.java:7: error: bad operand types for binary operator '=='
else if(a==5&&b==7&&c==5){Sytem.out.println("YES");}
^
first type: String
second type: int
Main.java:7: error: package Sytem does not exist
else if(a==5&&b==7&&c==5){Sytem.out.println("YES");}
^
Main.java:8: error: bad operand types for binary operator '=='
else if(a==5&&b==5&&c==7){Sytem.out.println("YES");}
^
first type: String
second type: int
Main.java:8: error: bad operand types for binary operator '=='
else if(a==5&&b==5&&c==7){Sytem.out.println("YES");}
^
first type: String
second type: int
Main.java:8: error: bad operand types for binary operator '=='
else if(a==5&&b==5&&c==7){Sytem.out.println("YES");}
^
first type: String
second type: int
Main.java:8: error: package Sytem does not exist
else if(a==5&&b==5&&c==7){Sytem.out.println("YES");}
^
12 errors
|
s319433068
|
p04043
|
C
|
#include <stdio.h>
int main(void) {
int a, b, c, d=0;
scanf("%d %d %d", &a, &b, &c);
if(a==5 && b==5 && c==7){
printf("YES\n");
d++;}
if(a==5 && b==7 && c==5){
printf("YES\n");
d++;}
if(a==7 && b==5 && c==5){
printf("YES\n");
d++}
if(d==1)
printf("NO\n");
return 0;
}
|
main.c: In function 'main':
main.c:16:12: error: expected ';' before '}' token
16 | d++}
| ^
| ;
|
s235873581
|
p04043
|
Java
|
public class Main{
public static void main (String[]args){
String a=new java.util.Scanner(System.in).nextLine();
String b=new java.util.Scanner(System.in).nextLine();
String c=new java.util.Scanner(System.in).nextLine();
switch(a b c){
case 7 5 5:
System.out.println("YES");
break;
case 5 7 5:
Ssytem.out.println("YES")
break;
case 5 5 7:
Ssytem.out.println("YES")
break;
default:
Ssytem.out.print("NO");
}
}
}
|
Main.java:6: error: ')' expected
switch(a b c){
^
Main.java:6: error: case, default, or '}' expected
switch(a b c){
^
Main.java:6: error: case, default, or '}' expected
switch(a b c){
^
Main.java:6: error: case, default, or '}' expected
switch(a b c){
^
Main.java:6: error: case, default, or '}' expected
switch(a b c){
^
Main.java:7: error: : or -> expected
case 7 5 5:
^
Main.java:7: error: not a statement
case 7 5 5:
^
Main.java:7: error: ';' expected
case 7 5 5:
^
Main.java:10: error: : or -> expected
case 5 7 5:
^
Main.java:10: error: not a statement
case 5 7 5:
^
Main.java:10: error: ';' expected
case 5 7 5:
^
Main.java:11: error: ';' expected
Ssytem.out.println("YES")
^
Main.java:13: error: : or -> expected
case 5 5 7:
^
Main.java:13: error: not a statement
case 5 5 7:
^
Main.java:13: error: ';' expected
case 5 5 7:
^
Main.java:14: error: ';' expected
Ssytem.out.println("YES")
^
16 errors
|
s599029341
|
p04043
|
Java
|
public class Main{
public static void main (String[]args){
int a=new java.util.Scanner(System.in).nextLine();
int b=new java.util.Scanner(System.in).nextLine();
int c=new java.util.Scanner(System.in).nextLine();
switch(a b c){
case 7 5 5:
System.out.println("YES");
break;
case 5 7 5:
Ssytem.out.println("YES")
break;
case 5 5 7:
Ssytem.out.println("YES")
break;
default:
Ssytem.out.print("NO");
}
}
}
|
Main.java:6: error: ')' expected
switch(a b c){
^
Main.java:6: error: case, default, or '}' expected
switch(a b c){
^
Main.java:6: error: case, default, or '}' expected
switch(a b c){
^
Main.java:6: error: case, default, or '}' expected
switch(a b c){
^
Main.java:6: error: case, default, or '}' expected
switch(a b c){
^
Main.java:7: error: : or -> expected
case 7 5 5:
^
Main.java:7: error: not a statement
case 7 5 5:
^
Main.java:7: error: ';' expected
case 7 5 5:
^
Main.java:10: error: : or -> expected
case 5 7 5:
^
Main.java:10: error: not a statement
case 5 7 5:
^
Main.java:10: error: ';' expected
case 5 7 5:
^
Main.java:11: error: ';' expected
Ssytem.out.println("YES")
^
Main.java:13: error: : or -> expected
case 5 5 7:
^
Main.java:13: error: not a statement
case 5 5 7:
^
Main.java:13: error: ';' expected
case 5 5 7:
^
Main.java:14: error: ';' expected
Ssytem.out.println("YES")
^
16 errors
|
s510211125
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c,d,e,f,g;
cin>>a>>b>>c;
d=a*b*c;
e=a+b+c;
f=5*5*7;
g=5+5+7;
if (d==f && e==g &&((a==b && a==c+2)||(a==c && a==b+2)) cout<<"YES";
else cout<<"No";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:10:58: error: expected ';' before 'cout'
10 | if (d==f && e==g &&((a==b && a==c+2)||(a==c && a==b+2)) cout<<"YES";
| ^~~~~
| ;
a.cc:11:3: error: expected primary-expression before 'else'
11 | else cout<<"No";
| ^~~~
a.cc:10:71: error: expected ')' before 'else'
10 | if (d==f && e==g &&((a==b && a==c+2)||(a==c && a==b+2)) cout<<"YES";
| ~ ^
| )
11 | else cout<<"No";
| ~~~~
|
s550226359
|
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) ||
a==5 && b==7 && c==5 || a==7 && b==5 && c==5){
System.out.println("YES")
}else{
System.out.println("NO");
}
}
}
|
Main.java:11: error: ';' expected
System.out.println("YES")
^
1 error
|
s391252269
|
p04043
|
Java
|
public class Main{
public static void main (String[]args){
int a=new java.util.Scanner(System.in).nextLine();
int b=new java.util.Scanner(System.in).nextLine();
int c=new java.util.Scanner(System.in).nextLine();
switch(a,b,c){
case a=7&&b==5&&c==5:
System.out.println("YES");
break;
case a==5&&b==7&&c==5:
Ssytem.out.println("YES")
break;
case a==5&&b==5&&c==7:
Ssytem.out.println("YES")
break;
default:
Ssytem.out.print("NO");
}
}
}
|
Main.java:6: error: ')' expected
switch(a,b,c){
^
Main.java:6: error: case, default, or '}' expected
switch(a,b,c){
^
Main.java:6: error: case, default, or '}' expected
switch(a,b,c){
^
Main.java:6: error: case, default, or '}' expected
switch(a,b,c){
^
Main.java:6: error: case, default, or '}' expected
switch(a,b,c){
^
Main.java:6: error: case, default, or '}' expected
switch(a,b,c){
^
Main.java:11: error: ';' expected
Ssytem.out.println("YES")
^
Main.java:14: error: ';' expected
Ssytem.out.println("YES")
^
8 errors
|
s552096636
|
p04043
|
C
|
#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int i;
int j;
int k;
int cnt5;
int cnt7;
// 個数のの入力
cnt5 = 0;
cnt7 = 0;
scanf("%d %d %d",&i,&j,&k);
if (i = 5) {
cnt5 = cnt5 + 1;
}
if (i = 7) {
cnt7 = cnt7 + 1;
}
if (j = 5) {
cnt5 = cnt5 + 1;
}
if (j = 7) {
cnt7 = cnt7 + 1;
}
if (k = 5) {
cnt5 = cnt5 + 1;
}
if (k = 7) {
cnt7 = cnt7 + 1;
}
if (cnt5 = 2) {
if (cnt7 = 1) {
printf("YES\n");
}
else {
printf("NO\n");
}
else {
printf("NO\n");
}
}
return 0;
}
|
main.c: In function 'main':
main.c:49:10: error: expected '}' before 'else'
49 | else {
| ^~~~
main.c: At top level:
main.c:54:9: error: expected identifier or '(' before 'return'
54 | return 0;
| ^~~~~~
main.c:55:1: error: expected identifier or '(' before '}' token
55 | }
| ^
|
s509977944
|
p04043
|
C
|
#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int i;
int j;
int k;
int cnt5;
int cnt7;
// 個数のの入力
cnt5 = 0;
cnt7 = 0;
scanf("%d %d %d",&i,&j,&k);
if (i = 5) {
cnt5 = cnt5 + 1;
}
if (i = 7) {
cnt7 = cnt7 + 1;
}
if (j = 5) {
cnt5 = cnt5 + 1;
}
if (j = 7) {
cnt7 = cnt7 + 1;
}
if (k = 5) {
cnt5 = cnt5 + 1;
}
if (k = 7) {
cnt7 = cnt7 + 1;
}
if (cnt5 = 2) {
if (cnt7 = 1) {
printf("YES\n");
}
else {
printf("NO\n");
}
else {
printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:49:10: error: expected '}' before 'else'
49 | else {
| ^~~~
|
s567461285
|
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) ||
a==5 && b==7 && c==5 || a==7 && b==5 && c==5){
system.out.println("YES")
}else{
System.out.println("NO");
}
}
}
|
Main.java:11: error: ';' expected
system.out.println("YES")
^
1 error
|
s484636645
|
p04043
|
C
|
#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int i;
int j;
int k;
int cnt5;
int cnt7;
// 個数のの入力
cnt5 = 0;
cnt7 = 0;
scanf("%d %d %d",$i,&j,&k);
if (i = 5) {
cnt5 = cnt5 + 1;
}
if (i = 7) {
cnt7 = cnt7 + 1;
}
if (j = 5) {
cnt5 = cnt5 + 1;
}
if (j = 7) {
cnt7 = cnt7 + 1;
}
if (k = 5) {
cnt5 = cnt5 + 1;
}
if (k = 7) {
cnt7 = cnt7 + 1;
}
if (cnt5 = 2) {
if (cnt7 = 1) {
printf("YES\n");
}
else {
printf("NO\n");
}
else {
printf("NO\n");
}
return 0;
}
|
main.c: In function 'main':
main.c:16:26: error: '$i' undeclared (first use in this function); did you mean 'i'?
16 | scanf("%d %d %d",$i,&j,&k);
| ^~
| i
main.c:16:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:49:10: error: expected '}' before 'else'
49 | else {
| ^~~~
|
s234492102
|
p04043
|
Java
|
public class Main{
public static void main (String[]args){
int a=new java.util.Scanner(System.in).nextLine();
int b=new java.util.Scanner(System.in).nextLine();
int c=new java.util.Scanner(System.in).nextLine();
}
}
|
Main.java:3: error: incompatible types: String cannot be converted to int
int a=new java.util.Scanner(System.in).nextLine();
^
Main.java:4: error: incompatible types: String cannot be converted to int
int b=new java.util.Scanner(System.in).nextLine();
^
Main.java:5: error: incompatible types: String cannot be converted to int
int c=new java.util.Scanner(System.in).nextLine();
^
3 errors
|
s673943265
|
p04043
|
C
|
#include <stdio.h>
int main (void)
{
int A,B,C;
printf("Aの値:");
scanf ("%d",&A);
printf("Bの値:");
scanf ("%d",&B);
printf("Cの値:");
scanf ("%d",&C);
if (A==7&&B==7&&C==5||A==7&&C==7&&B==5||B==7&&C==7&&A==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c: In function 'main':
main.c:15:8: error: 'o' undeclared (first use in this function)
15 | return o;
| ^
main.c:15:8: note: each undeclared identifier is reported only once for each function it appears in
|
s047286949
|
p04043
|
C
|
#include <stdio.h>
int main (void)
{
int A,B,C;
printf("Aの値:");
scanf ("%d",&A);
printf("Bの値:");
scanf ("%d",&B);
printf("Cの値:");
scanf ("%d",&C);
if(A==7&&B==7&&C==5||A==7&&C==7&&B==5||B==7&&C==7&&A==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c: In function 'main':
main.c:15:8: error: 'o' undeclared (first use in this function)
15 | return o;
| ^
main.c:15:8: note: each undeclared identifier is reported only once for each function it appears in
|
s172264427
|
p04043
|
C
|
#include <stdio.h>
int main (void)
{
int A,B,C;
printf("Aの値:");
scanf ("%d",&A);
printf("Bの値:");
scanf ("%d",&B);
printf("Cの値:");
scanf ("%d",&C);
if(A==B==7&&C==5||A==C==7&&B==5||B==C==7&&A==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c: In function 'main':
main.c:15:8: error: 'o' undeclared (first use in this function)
15 | return o;
| ^
main.c:15:8: note: each undeclared identifier is reported only once for each function it appears in
|
s906882566
|
p04043
|
C
|
#include <stdio.h>
int main (void)
{
int A,B,C,;
printf("Aの値:");
scanf ("%d",&A);
printf("Bの値:");
scanf ("%d",&B);
printf("Cの値:");
scanf ("%d",&C);
if(A==B==7&&C==5||A==C==7&&B==5||B==C==7&&A==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c: In function 'main':
main.c:4:11: error: expected identifier or '(' before ';' token
4 | int A,B,C,;
| ^
main.c:15:8: error: 'o' undeclared (first use in this function)
15 | return o;
| ^
main.c:15:8: note: each undeclared identifier is reported only once for each function it appears in
|
s750780395
|
p04043
|
C
|
#include <studio.h>
int main (void)
{
int A,B,C,;
printf("Aの値:");
scanf ("%d",&A);
printf("Bの値:");
scanf ("%d",&B);
printf("Cの値:");
scanf ("%d",&C);
if(A==B==7&&C==5||A==C==7&&B==5||B==C==7&&A==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c:1:10: fatal error: studio.h: No such file or directory
1 | #include <studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s407888616
|
p04043
|
C
|
#include <studio.h>
int main (void)
{
int A,B,C,;
printf("Aの値:");
scanf ("%d",&A);
printf("Bの値:");
scanf ("%d",&B);
printf("Cの値:");
scanf ("%d",&C);
if(A==B==7&&C==5||A==C==7&&B==5||B==C==7&&A==5)
printf("Yes");
else
printf("No");
return o;
}
|
main.c:1:10: fatal error: studio.h: No such file or directory
1 | #include <studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s521007873
|
p04043
|
Java
|
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
if(a&&b==5){
if(c==7){
System.out.println("YES");
}else{System.out.println("NO");}
}else{System.out.println("NO");}
if(a&&c==5){
if(b==7){
System.out.println("YES");
}else{System.out.println("NO");}
}else{System.out.println("NO");}
if(b&&c==5){
if(a==7){
System.out.println("YES");
}else{System.out.println("NO");}
}else{System.out.println("NO");}
}}
|
Main.java:9: error: bad operand types for binary operator '&&'
if(a&&b==5){
^
first type: int
second type: boolean
Main.java:15: error: bad operand types for binary operator '&&'
if(a&&c==5){
^
first type: int
second type: boolean
Main.java:21: error: bad operand types for binary operator '&&'
if(b&&c==5){
^
first type: int
second type: boolean
3 errors
|
s163301504
|
p04043
|
Java
|
import java.io.*;
class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)\
);
String str = br.readLine();
int fiveCount = search(str,'5');
int sevenCount = search(str,'7');
if(fiveCount == 2 && sevenCount == 1){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
static int search(String str, char target){
int count = 0;
for(char x: str.toCharArray()){
if(x == target){
count++;
}
}
return count;
}
}
|
Main.java:5: error: illegal character: '\'
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)\
^
1 error
|
s035012068
|
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&&b==5){
if(c==7){
System.out.println("YES");
}else{System.out.println("NO");}
}else{System.out.println("NO")}
if(a&&c==5){
if(b==7){
System.out.println("YES");
}else{System.out.println("NO");}
}else{System.out.println("NO")}
if(b&&c==5){
if(a==7){
System.out.println("YES");
}else{System.out.println("NO");}
}else{System.out.println("NO")}
}}
|
Main.java:1: error: ';' expected
import java.util*.;
^
Main.java:13: error: ';' expected
}else{System.out.println("NO")}
^
Main.java:19: error: ';' expected
}else{System.out.println("NO")}
^
Main.java:25: error: ';' expected
}else{System.out.println("NO")}
^
4 errors
|
s696881487
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c,d;
cin>>a>>b>>c;
d=a*b*c
if(d==155) cout<<"Yes"<<"\n";
else cout<<"No\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before 'if'
8 | d=a*b*c
| ^
| ;
9 | if(d==155) cout<<"Yes"<<"\n";
| ~~
a.cc:10:17: error: 'else' without a previous 'if'
10 | else cout<<"No\n";
| ^~~~
|
s299181740
|
p04043
|
C++
|
#include<iostream>
using namespace std;
int main(){
int a,b,c,d;
cin>>a>>b>>c;
d=a*b*c
if(d==175) cout<<"Yes"<<"\n";
else cout<<"No\n";
return 0;
}
|
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before 'if'
8 | d=a*b*c
| ^
| ;
9 | if(d==175) cout<<"Yes"<<"\n";
| ~~
a.cc:10:17: error: 'else' without a previous 'if'
10 | else cout<<"No\n";
| ^~~~
|
s113630047
|
p04043
|
Java
|
public string Main(int a, int b, int c){
int t = 5*5*7;
int t3 = a*b*c;
if(t==t3){
return 'YES';
}
else{
return 'NO';
}
}
|
Main.java:5: error: unclosed character literal
return 'YES';
^
Main.java:5: error: unclosed character literal
return 'YES';
^
Main.java:5: error: not a statement
return 'YES';
^
Main.java:8: error: unclosed character literal
return 'NO';
^
Main.java:8: error: unclosed character literal
return 'NO';
^
Main.java:8: error: not a statement
return 'NO';
^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public string Main(int a, int b, int c){
^
(use --enable-preview to enable unnamed classes)
7 errors
|
s736033664
|
p04043
|
C++
|
#include<cstdio>
#include<iostream>
using namespace std;
int main(void){
int a[3];
for(int i = 0; i < 3; i++)
cin >> a[i];
sort(a, a + 3);
if(a[0] == 5 && a[1] == 5 && a[2] == 7){
cout << "YES" << endl;
}else{
cout << "NO" << endl;
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'?
11 | sort(a, a + 3);
| ^~~~
| short
|
s509197039
|
p04043
|
Java
|
import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num[] = new int[3];
int c = 0;
for (int i = 0; i < 3; i++) {
int n = sc.nextInt();
if(n > 5) {
num[2] = n;
} else {
num[c++] = n;
}
}
if(num[0] == 5 && num[1] == 5 && num[2] == 7) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}
}
|
Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s327127608
|
p04043
|
C++
|
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if (a * b * c == 175){
cout << "YES" << endl;
}
else{
cout MM "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:14:9: error: expected ';' before 'MM'
14 | cout MM "NO" << endl;
| ^~~
| ;
|
s373200955
|
p04043
|
C++
|
puts gets.split(" ").map(&:to_i).tap { |a| break a.count(5) == 2 && a.count(7) == 1 } ? "YES" : "NO"
|
a.cc:1:1: error: 'puts' does not name a type
1 | puts gets.split(" ").map(&:to_i).tap { |a| break a.count(5) == 2 && a.count(7) == 1 } ? "YES" : "NO"
| ^~~~
a.cc:1:87: error: expected unqualified-id before '?' token
1 | puts gets.split(" ").map(&:to_i).tap { |a| break a.count(5) == 2 && a.count(7) == 1 } ? "YES" : "NO"
| ^
|
s811876946
|
p04043
|
C++
|
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
array<int, 3> num;
cin >> num[0] >> num[1] >> num[2];
sort(num.begin(), num.end());
if(num[0] == 5 && num[1] == 5 && num[2] == 7){
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
|
a.cc: In function 'int main()':
a.cc:8:17: error: aggregate 'std::array<int, 3> num' has incomplete type and cannot be defined
8 | array<int, 3> num;
| ^~~
a.cc:3:1: note: 'std::array' is defined in header '<array>'; this is probably fixable by adding '#include <array>'
2 | #include <algorithm>
+++ |+#include <array>
3 |
|
s922177806
|
p04043
|
C++
|
#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
int main()
{
vector<int> a(3,0);
for(auto&& x : a)
cin >> x;
int five = count(a.begin(),a.end(),5);
int seven = count(a.begin(),a.end(),7);
if(five == 2 && seven == 1)
{
cout << "YES" << endl;
}
else
{
cout << "NO" << endl;5
}
}
|
a.cc: In function 'int main()':
a.cc:23:31: error: expected ';' before '}' token
23 | cout << "NO" << endl;5
| ^
| ;
24 | }
| ~
|
s571866500
|
p04043
|
C++
|
five = 0
seven = 0
gets.split(" ").map{|i|i.to_i}.each do |i|
if i == 5
five += 1
elsif
seven += 1
end
end
puts five==2&&seven==1?"YES":"NO"
|
a.cc:1:1: error: 'five' does not name a type
1 | five = 0
| ^~~~
a.cc:3:31: error: expected unqualified-id before '.' token
3 | gets.split(" ").map{|i|i.to_i}.each do |i|
| ^
|
s897925607
|
p04043
|
C++
|
five = 0
seven = 0
gets.split(" ").map{|i|i.to_i}.each do |i|
if i == 5
five += 1
elsif
seven += 1
end
end
puts five==2&&seven==1?"YES":"NO"
|
a.cc:1:1: error: 'five' does not name a type
1 | five = 0
| ^~~~
a.cc:3:31: error: expected unqualified-id before '.' token
3 | gets.split(" ").map{|i|i.to_i}.each do |i|
| ^
|
s030924547
|
p04043
|
C++
|
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main();
}
public Main() {
new A().doIt();
}
class A{
void doIt(){
int a[] = new int[3];
for(int i = 0;i < 3;i++){
a[i] = sc.nextInt();
}
Arrays.sort(a);
if(a[0] == 5 && a[1] == 5 && a[2] == 7){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
}
|
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.ArrayList;
| ^~~~~~
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.Arrays;
| ^~~~~~
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.Scanner;
| ^~~~~~
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 {
| ^~~~~~
|
s928113030
|
p04043
|
C++
|
a, b, c = sorted(map(int, input().split()))
if a, b, c = 5, 5, 7:
print("YES")
else:
print("NO")
|
a.cc:1:1: error: 'a' does not name a type
1 | a, b, c = sorted(map(int, input().split()))
| ^
|
s170777023
|
p04044
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,L;
cin >> N >> L;
vector<string> line(N);
for(int i=0; i<N; i++){
for(int j=0; j<N; j++){
cin >> line.at(i).at(j);
}
}
sort(line,line+N);
for(int i=0; i<N; i++){
cout << line.at(i);
}
}
|
a.cc: In function 'int main()':
a.cc:15:17: error: no match for 'operator+' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'int')
15 | sort(line,line+N);
| ~~~~^~
| | |
| | int
| std::vector<std::__cxx11::basic_string<char> >
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)'
627 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
1798 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
15 | sort(line,line+N);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3598 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3598:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3616 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: mismatched types 'const _CharT*' and 'std::vector<std::__cxx11::basic_string<char> >'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3635 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3652 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
3670 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3682 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3689 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3696 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3719 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: mismatched types 'const _CharT*' and 'std::vector<std::__cxx11::basic_string<char> >'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
3726 | operator+(_CharT __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'int'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3733:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)'
3733 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3733:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | sort(line,line+N);
| ^
/usr/include/c++/14/bits/basic_string.h:3740:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)'
3740 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3740:5: note: template argument deduction/substitution failed:
a.cc:15:18: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
15 | sort(line,line+N);
| ^
In file included from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/complex:340:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator+(const complex<_Tp>&, const complex<_Tp>&)'
340 | operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/14/complex:340:5: note: template argument dedu
|
s418312987
|
p04044
|
C++
|
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
ios_base :: sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n, l;
cin >> n >> l;
vector<string> v(n);
int i;
for(i=0; i<n; ;i++){
cin >> v[i];
}
sort(v.begin(), v.end());
for(auto it = v.begin(); it!=v.end(); it++){
cout << it;
}
cout << '\n';
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:17: error: expected primary-expression before ';' token
15 | for(i=0; i<n; ;i++){
| ^
a.cc:15:16: error: expected ')' before ';' token
15 | for(i=0; i<n; ;i++){
| ~ ^~
| )
a.cc:15:21: error: expected ';' before ')' token
15 | for(i=0; i<n; ;i++){
| ^
| ;
a.cc:20:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >')
20 | cout << it;
| ~~~~ ^~ ~~
| | |
| | __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'float'
|
s455471108
|
p04044
|
Java
|
import java.util.*;
// Iroha's Strings
public class B {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// String params = scanner.nextLine();
int numStrings = scanner.nextInt();
int stringLen = scanner.nextInt();
scanner.nextLine();
// scanner.next() reads up until \n it won't consume it. You need next Line to pusition the
// System.out.println(scanner.nextLine()); // handle of first line \n that is
List<String> strings = new ArrayList<>();
for (int i=0; i<numStrings; i++) {
String curr = scanner.nextLine();
// System.out.println("curr" + curr);
strings.add(curr);
}
// I have the strings now simply sort them and concatenate
Collections.sort(strings);
StringBuilder sb = new StringBuilder();
for (String s : strings) {
// System.out.printf("String:%s, numStrings:%d, stringLen:%d %n", s, numStrings, stringLen);
sb.append(s);
}
scanner.close();
// System.out.println(sb.toString());
}
}
|
Main.java:4: error: class B is public, should be declared in a file named B.java
public class B {
^
1 error
|
s647401656
|
p04044
|
Java
|
import java.util.*;
// Iroha's Strings
public class B {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// String params = scanner.nextLine();
int numStrings = scanner.nextInt();
int stringLen = scanner.nextInt();
scanner.nextLine();
// scanner.next() reads up until \n it won't consume it. You need next Line to pusition the
// System.out.println(scanner.nextLine()); // handle of first line \n that is
List<String> strings = new ArrayList<>();
for (int i=0; i<numStrings; i++) {
String curr = scanner.nextLine();
// System.out.println("curr" + curr);
strings.add(curr);
}
// I have the strings now simply sort them and concatenate
Collections.sort(strings);
StringBuilder sb = new StringBuilder();
for (String s : strings) {
// System.out.printf("String:%s, numStrings:%d, stringLen:%d %n", s, numStrings, stringLen);
sb.append(s);
}
scanner.close();
// System.out.println(sb.toString());
}
|
Main.java:30: error: reached end of file while parsing
}
^
1 error
|
s268405496
|
p04044
|
C++
|
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
int main(void){
int n, l;
std::cin >> n >> l;
std::priority_queue<std::string, std::greater<std::string>> ss;
for(int i = 0; i < n; ++i){
std::string s;
ss.push(s);
}
while(!ss.empty()){
std::cout << ss.top();
ss.pop();
}
std::cout << std::endl;
return 0;
}
|
a.cc: In function 'int main()':
a.cc:15:62: error: no type named 'value_type' in 'struct std::greater<std::__cxx11::basic_string<char> >'
15 | std::priority_queue<std::string, std::greater<std::string>> ss;
| ^~
a.cc:15:62: error: template argument 3 is invalid
a.cc:18:12: error: request for member 'push' in 'ss', which is of non-class type 'int'
18 | ss.push(s);
| ^~~~
a.cc:20:15: error: request for member 'empty' in 'ss', which is of non-class type 'int'
20 | while(!ss.empty()){
| ^~~~~
a.cc:21:25: error: request for member 'top' in 'ss', which is of non-class type 'int'
21 | std::cout << ss.top();
| ^~~
a.cc:22:12: error: request for member 'pop' in 'ss', which is of non-class type 'int'
22 | ss.pop();
| ^~~
|
s519392876
|
p04044
|
C++
|
n, l = map(int, input().split())
s = [input() for _ in range(n)]
s = sorted(s)
for i in s:
print(i,end = '')
|
a.cc:6:19: error: empty character constant
6 | print(i,end = '')
| ^~
a.cc:1:1: error: 'n' does not name a type
1 | n, l = map(int, input().split())
| ^
|
s390145841
|
p04044
|
C++
|
#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <iomanip>
#include <vector>
#include <cstring>
#include <queue>
#include <map>
#include <set>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef vector<vector<int>> Graph;
const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};
template<class T> inline bool chmax(T &a,T& b){if(a < b){a = b; return true;} else return false;}
template<class T> inline bool chmin(T &a,T& b){if(a > b){a = b; return true;} else return false;}
//struct area
//function area
//main area
int main(){
int n, l;
cin >> n >> l;
vector<string> s(n);
rep(i,n){
cin >> s[i];
}
sort(s.begin(), s.end());
rep(i,n) cout >> s[i];
cout << endl;
}
/*
*/
|
a.cc: In function 'int main()':
a.cc:35:19: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'})
35 | rep(i,n) cout >> s[i];
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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
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:35:14: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
35 | rep(i,n) cout >> s[i];
| ^~~~
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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = std::__cxx11::basic_string<char>&]':
a.cc:35:25: required from here
35 | rep(i,n) cout >> s[i];
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
In file included from a.cc:5:
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::
|
s138434105
|
p04044
|
C++
|
#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <iomanip>
#include <vector>
#include <cstring>
#include <queue>
#include <map>
#include <set>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef vector<vector<int>> Graph;
const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};
template<class T> inline bool chmax(T &a,T& b){if(a < b){a = b; return true;} else return false;}
template<class T> inline bool chmin(T &a,T& b){if(a > b){a = b; return true;} else return false;}
//struct area
//function area
//main area
int main(){
int n, l;
cin >> n >> l;
vector<string> s;
rep(i,n){
cin >> s[i];
}
sort(s.begin(), s.end());
rep(i,n) cout >> s[i];
cout << endl;
}
/*
*/
|
a.cc: In function 'int main()':
a.cc:35:19: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'})
35 | rep(i,n) cout >> s[i];
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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
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:35:14: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
35 | rep(i,n) cout >> s[i];
| ^~~~
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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = std::__cxx11::basic_string<char>&]':
a.cc:35:25: required from here
35 | rep(i,n) cout >> s[i];
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
In file included from a.cc:5:
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
35 | rep(i,n) cout >> s[i];
| ^
/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:35:25: note: 'std::
|
s014687455
|
p04044
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main() {
ll A,B;
cin>>A>>B;
vector <string>vec(A);
for(int i=0;i<A;i++){
cin>>vec.at(i);
}
sort(vec.begin(),vec.end());
for(int i=0;i<A;i++){
cout<<vec.at(i);
}
}
|
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
5 | ll A,B;
| ^~
a.cc:6:8: error: 'A' was not declared in this scope
6 | cin>>A>>B;
| ^
a.cc:6:11: error: 'B' was not declared in this scope
6 | cin>>A>>B;
| ^
|
s903112785
|
p04044
|
C
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int N,L,i;
string S[101];
cin>>N>>L;
for (i=0;i<N;i++)
cin>>S[i];
sort(S,S+N);
for (i=0;i<N;i++)
cout<<S[i];
return 0;
}
|
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s375204328
|
p04044
|
C++
|
#include<bits/stdc++.h>
using namespace std;
int main()
{ int n;
cin>>n;
string a[n];
for(int i=0;i<n;i++)
{ cin>>a[i];
}
sort(a,a+n);
for(int j=0;j<n;j++)
{ cout<<a[i];
}
return 0;
}
|
a.cc: In function 'int main()':
a.cc:12:12: error: 'i' was not declared in this scope
12 | { cout<<a[i];
| ^
|
s382099743
|
p04044
|
C++
|
#include <bits/stc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
*this << "[";
for (auto it = d.b; it != d.e; ++it)
*this << ", " + 2 * (it == d.b) << *it;
ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
void test_case() {
int n, l;
scanf("%d%d",&n, &l);
string arr[n];
for(int i = 0; i < n; i ++) {
scanf("%s", &arr[i]);
}
sort(arr, arr+n);
for(int i = 0; i < n; i ++) {
printf("%s", arr[i]);
}
printf("\n");
}
int main() {
int t = 1;
//scanf("%d", &t);
while(t --) {
test_case();
}
return 0;
}
|
a.cc:1:10: fatal error: bits/stc++.h: No such file or directory
1 | #include <bits/stc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s831054032
|
p04044
|
C++
|
#include <bits\stc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
*this << "[";
for (auto it = d.b; it != d.e; ++it)
*this << ", " + 2 * (it == d.b) << *it;
ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
void test_case() {
int n, l;
scanf("%d%d",&n, &l);
string arr[n];
for(int i = 0; i < n; i ++) {
scanf("%s", &arr[i]);
}
sort(arr, arr+n);
for(int i = 0; i < n; i ++) {
printf("%s", arr[i]);
}
printf("\n");
}
int main() {
int t = 1;
//scanf("%d", &t);
while(t --) {
test_case();
}
return 0;
}
|
a.cc:1:10: fatal error: bits\stc++.h: No such file or directory
1 | #include <bits\stc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s997203129
|
p04044
|
C++
|
#include <bits\stc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
*this << "[";
for (auto it = d.b; it != d.e; ++it)
*this << ", " + 2 * (it == d.b) << *it;
ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
void test_case() {
int n, l;
scanf("%d%d",&n, &l);
string[] arr;
for(int i = 0; i < n; i ++) {
scanf("%s", &arr[i]);
}
sort(arr, arr+n);
for(int i = 0; i < n; i ++) {
printf("%s", arr[i]);
}
printf("\n");
}
int main() {
int t = 1;
//scanf("%d", &t);
while(t --) {
test_case();
}
return 0;
}
|
a.cc:1:10: fatal error: bits\stc++.h: No such file or directory
1 | #include <bits\stc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s203155726
|
p04044
|
C
|
#include<string.h>
main()
{
int n,a,i,j,k;
scanf("%d%d",&n,&a);
k=n;
char s[k][150],d[150];
for(i=0;i<k;i++){
fflush(stdin);
scanf("%s",&s[i]);
}
for(i=0;i<k-1;i++){
for(j=i+1;j<k;j++){
if(strcmp(s[i],s[j])>0){
fflush(stdin);
strcpy(d,s[j]);
strcpy(s[j],s[i]);
strcpy(s[i],d);
}
}
}
for(i=0;i<k;i++){
printf("%s",s[i]);
}
printf("\n");
}
|
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main()
| ^~~~
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%d%d",&n,&a);
| ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
1 | #include<string.h>
+++ |+#include <stdio.h>
2 | main()
main.c:5:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
5 | scanf("%d%d",&n,&a);
| ^~~~~
main.c:5:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:9: error: implicit declaration of function 'fflush' [-Wimplicit-function-declaration]
9 | fflush(stdin);
| ^~~~~~
main.c:9:16: error: 'stdin' undeclared (first use in this function)
9 | fflush(stdin);
| ^~~~~
main.c:9:16: note: 'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:9:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
24 | printf("%s",s[i]);
| ^~~~~~
main.c:24:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:24:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
26 | printf("\n");
| ^~~~~~
main.c:26:5: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s335379842
|
p04044
|
C++
|
#include <bits/stdc++.h>
using namespaxe std;
int main(){
int n,b;
cin >> n >> b;
string a[n];
for(int i=0;i<n;i++){
cin >> a[i];
}
string f=a[0];
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if(a[j]<a[i]){
f=a[j];
a[j]=a[i];
a[i]=f;
}
}
}
for(int i=0;i<n;i++){
cout << a[i];
}
}
|
a.cc:2:7: error: expected nested-name-specifier before 'namespaxe'
2 | using namespaxe std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> n >> b;
| ^~~
| 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:7:1: error: 'string' was not declared in this scope
7 | string a[n];
| ^~~~~~
a.cc:7:1: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string'
77 | typedef basic_string<char> string;
| ^~~~~~
/usr/include/c++/14/string:76:11: note: 'std::pmr::string'
76 | using string = basic_string<char>;
| ^~~~~~
a.cc:9:8: error: 'a' was not declared in this scope
9 | cin >> a[i];
| ^
a.cc:11:10: error: expected ';' before 'f'
11 | string f=a[0];
| ^~
| ;
a.cc:14:6: error: 'a' was not declared in this scope
14 | if(a[j]<a[i]){
| ^
a.cc:15:4: error: 'f' was not declared in this scope
15 | f=a[j];
| ^
a.cc:22:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
22 | cout << a[i];
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:22:11: error: 'a' was not declared in this scope
22 | cout << a[i];
| ^
|
s675783830
|
p04044
|
C++
|
#include <bits/stdc++.h>
#define rep(i,N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int inf{int(1e9)};
int main(void){
int N, L;
cin >> N >> L;
vector <string> S(N);
rep(i,N) cin >> S[i];
sort(all(S));
rep(i,N){
cout << S[i]
}
cout << endl;
}
|
a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' before '}' token
16 | cout << S[i]
| ^
| ;
17 | }
| ~
|
s286751567
|
p04044
|
C++
|
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n,i,l;
cinn>>n>>l;
vector<string>m(n);
for(i=0;i<n;i++){
cin>>m[i];
}
sort(m.begin(),m.end());
for(i=0;i<n;i++){
cout<<m[i];}
cout<<endl;
}
|
a.cc: In function 'int main()':
a.cc:5:1: error: 'cinn' was not declared in this scope
5 | cinn>>n>>l;
| ^~~~
|
s861387307
|
p04044
|
C++
|
#include <bits/stdc++.h>
using namespace std.
int main(){
long long n,i,l;
cinn>>n>>l;
vector<string>m(n);
for(i=0;i<n;i++){
cin>>m[i];
}
sort(m.begin(),m.end());
for(i=0;i<n;i++){
cout<<m[i];}
cout<<endl;
}
|
a.cc:2:20: error: expected ';' before '.' token
2 | using namespace std.
| ^
| ;
a.cc:2:20: error: expected unqualified-id before '.' token
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.