submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s777160707 | p03803 | Java | import java.io.*;
import java.util.*;
public class OneCardPoker {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int A = s.nextInt();
int B = s.nextInt();
if (A == B) {
System.out.println("Draw");
}
else if (A == 1) {
System.out.println("Alice");
}
else if (B == 1) {
System.out.println("Bob");
}
else if (A > B) {
System.out.println("Alice");
}
else {
System.out.println("Bob");
}
}
} | Main.java:4: error: class OneCardPoker is public, should be declared in a file named OneCardPoker.java
public class OneCardPoker {
^
1 error
|
s210949441 | p03803 | C++ | import java.io.*;
import java.util.*;
public class OneCardPoker {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int A = s.nextInt();
int B = s.nextInt();
if (A == B) {
System.out.println("Draw");
}
else if (A == 1) {
System.out.println("Alice");
}
else if (B == 1) {
System.out.println("Bob");
}
else if (A > B) {
System.out.println("Alice");
}
else {
System.out.println("Bob");
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
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.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class OneCardPoker {
| ^~~~~~
|
s458901530 | p03803 | C++ | #include <bits\stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a == 1) {
if (b == 1) {
cout << "Draw" << endl;
} else {
cout << "Alice" << endl;
}
return 0;
}
if (b == 1) {
cout << "Bob" << endl;
return 0;
}
if (a > b) {
cout << "Alice" << endl;
} else if (a == b) {
cout << "Draw" << endl;
} else {
cout << "Bob" << endl;
}
return 0;
}
| a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s118474512 | p03803 | C++ | #include <bits\stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a == 1) {
if (b == 1) {
cout << "Draw" << endl;
} else {
cout << "Alice" << endl;
}
return 0;
}
if (b == 1) {
cout << "Bob" << endl;
return 0;
}
if (a > b) {
cout << "Alice" << endl;
} else if (a == b) {
cout << "Draw" << endl;
} else {
cout << "Bob" << endl;
}
return 0;
}
| a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s045421795 | p03803 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
while( cin >> a >> b )
{
if(a==b)
cout << "Draw" << endl;
else
{
if{a==1}
cout << "Alice" << endl;
else if(b==1)
cout << "Bob" << endl;
else if(a>b)
cout << "Alice" << endl;
else
cout << "Bob" << endl;
}
}
return 0 ;
}
| a.cc: In function 'int main()':
a.cc:14:15: error: expected '(' before '{' token
14 | if{a==1}
| ^
| (
a.cc:16:13: error: 'else' without a previous 'if'
16 | else if(b==1)
| ^~~~
|
s128681366 | p03803 | C++ | #include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
long long lnN, lnM;
cin >> lnN;
cin >> lnM;
char nMatrixN[50][50];
memset(nMatrixN, NULL, sizeof(nMatrixN));
for (int i = 0; i < lnN; i++)
{
cin >> nMatrixN[i];
}
char nMatrixM[50][50];
memset(nMatrixM, NULL, sizeof(nMatrixM));
for (int i = 0; i < lnM; i++)
{
cin >> nMatrixM[i];
}
bool bJubge = false;
for (int i = 0; i <= (lnN-lnM); i++)
{
for (int j = 0; j <= (lnN-lnM); j++)
{
// MatrixMのループ用
bool bMatch = true;
for (int k = 0; k < lnM; k++)
{
if (0 != strnicmp(&nMatrixN[i + k][j], nMatrixM[k], lnM))
{
bMatch = false;
break;
}
}
if (true == bMatch)
{
bJubge = true;
goto JUDGE;
}
}
}
JUDGE:
if (true == bJubge)
cout << "Yes";
else
cout << "No";
return 0;
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
12 | memset(nMatrixN, NULL, sizeof(nMatrixN));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iostream>
+++ |+#include <cstring>
3 | using namespace std;
a.cc:34:42: error: 'strnicmp' was not declared in this scope
34 | if (0 != strnicmp(&nMatrixN[i + k][j], nMatrixM[k], lnM))
| ^~~~~~~~
|
s290555561 | p03803 | C++ | #include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
typedef struct edge{
int u,v;
} EDGE;
int search(int n,int visited[],int node[n][n],int position){
int node_local[n][n];
int visited_local[n];
memcpy(node_local,node,sizeof(int)*n*n);
memcpy(visited_local,visited,sizeof(int)*n);
int i,j;
int sum=0;
visited_local[position]=1;
/* puts("==========");
printf("node:%d\n",position+1);
for(i=0;i<n;i++){
for(j=0;j<n;j++){
printf("%d",node_local[i][j]);
}puts("");
}
printf("visited node\n");
for(i=0;i<n;i++){
printf("%d",visited_local[i]);
}puts("");
puts("=========="); */
visited_local[position]=1;
for(i=0;i<n;i++){
if(node_local[position][i]==1){
node_local[position][i]=0;
if(visited_local[i]==0){
sum+=search(n,visited_local,node_local,i);
}
}
}
int allVisited=1;
for(i=0;i<n;i++){
if(visited_local[i]==0){
allVisited=0;
break;
}
}
return sum+allVisited;
}
int main(){
int n,m;
scanf("%d %d",&n,&m);
EDGE e[m];
int node[n][n];
int visited[n];
int i,j;
for(i=0;i<n;i++){
visited[i]=0;
for(j=0;j<n;j++){
node[i][j]=0;
}
}
for(i=0;i<m;i++){
scanf("%d %d",&e[i].u,&e[i].v);
e[i].u--;e[i].v--;
node[e[i].u][e[i].v]=1;
node[e[i].v][e[i].u]=1;
}
int position=0;
printf("%d\n",search(n,visited,node,position));
}
| a.cc:13:42: error: use of parameter outside function body before ']' token
13 | int search(int n,int visited[],int node[n][n],int position){
| ^
a.cc:13:45: error: use of parameter outside function body before ']' token
13 | int search(int n,int visited[],int node[n][n],int position){
| ^
a.cc:13:46: error: expected ')' before ',' token
13 | int search(int n,int visited[],int node[n][n],int position){
| ~ ^
| )
a.cc:13:47: error: expected unqualified-id before 'int'
13 | int search(int n,int visited[],int node[n][n],int position){
| ^~~
|
s567538734 | p03803 | C++ | #include <iostream>
using namespace std;
int main(){
int N[2];
cin >> N[0] >> N[1];
__int64 map[2][64];
for (int i = 0; i < 2; i++){
for (int j = 0; j < N[i]; j++){
char in[50];
cin >> in;
map[i][j] = 0;
for (int k = 0; k < N[i]; k++){
if (in[k] == '#') map[i][j] = map[i][j] | (1<<k);
}
//cout << static_cast<bitset<8> >(map[i][j]) << endl;
}
}
int mask = (1 << N[1]);
mask--;
for (int i = 0; i <= (N[0] - N[1]); i++){
for (int j = 0; j <= (N[0] - N[1]); j++){
if (( (map[0][i] & (mask << j)) == (map[1][i] << j))){
for (int k = 1; k < N[1]; k++){
if (((map[0][i+k] & (mask << j)) != (map[1][i+k] << j))){
break;
}
if (k == (N[1] - 1)) { cout << "Yes" << endl; return 0; }
}
}
}
}
cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
8 | __int64 map[2][64];
| ^~~~~~~
| __int64_t
a.cc:13:25: error: 'map' was not declared in this scope
13 | map[i][j] = 0;
| ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
1 | #include <iostream>
+++ |+#include <map>
2 |
a.cc:25:32: error: 'map' was not declared in this scope
25 | if (( (map[0][i] & (mask << j)) == (map[1][i] << j))){
| ^~~
a.cc:25:32: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
|
s749520017 | p03803 | Java |
import java.util.Scanner;
public class OneCardPoker {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int alice = sc.nextInt(), bob = sc.nextInt();
if(alice == 1 && bob != 1)
System.out.println("Alice");
else if(bob == 1 && alice != 1)
System.out.println("Bob");
else if(alice < bob)
System.out.println("Bob");
else if(alice > bob)
System.out.println("Alice");
else
System.out.println("Draw");
}
}
| Main.java:5: error: class OneCardPoker is public, should be declared in a file named OneCardPoker.java
public class OneCardPoker {
^
1 error
|
s310459707 | p03803 | C++ | #include<iostream>
using namespace std;
int maim() {
unsigned int a,b;
cin >> a >> b;
a -= 2;
b -= 2;
if (a<b)cout << "Bob" << endl;
else if (a == b)cout << "Draw" << endl;
else cout << "Alice" << endl;
return 0;
}
| /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s769977672 | p03803 | C++ | #include <bits/stdc++.h>
#define ll long long
#define PRIME 1000000007
using namespace std;
vector<bool> isprime(1000001, true);
void sieve()
{
for(int i=2;i*i<=1000001;i++)
{
if(isprime[i]==true)
{
for(int j=(i+i);j<=1000001;j=j+i)
{
isprime[j]=false;
}
}
}
}
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0);
int a,b;
cin>>a>>b;
if(a==1)
{
a=14;
}
if(b==1)
{
b=14;
}
if(a>b)
{
cout<<"Alice";
}
else
{
cout<<"Bob";
}
else
{
cout<<"Draw";
}
} | a.cc: In function 'int main()':
a.cc:40:9: error: 'else' without a previous 'if'
40 | else
| ^~~~
|
s649154475 | p03803 | C | include<stdio.h>
int main(){
int a, b;
scanf("%d %d", &a, &b);
if(a > b)
printf("Alice\n");
else if(a == b)
printf("Draw\n");
else
printf("Bob\n");
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s807225047 | p03803 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int M = Integer.parseInt(sc.next());
String imgA[N];
String imgB[M];
Boolean checkAB;
int j;
int k;
String s = "No";
for(int i = 0;i<N;i++){
imgA[i]=sc.next();
}
for(int i = 0;i<M;i++){
imgB[i]=sc.next();
}
for(int i=0;i<(N-M+1);i++){
for(j=0;j<(N-M+1);j++){
checkAB = true;
for (k=0;j<M;j++){
checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
}
if(checkAB){
s="Yes";
}
}
}
System.out.println(s);
sc.close();
}
} | Main.java:8: error: ']' expected
String imgA[N];
^
Main.java:8: error: ';' expected
String imgA[N];
^
Main.java:9: error: ']' expected
String imgB[M];
^
Main.java:9: error: ';' expected
String imgB[M];
^
4 errors
|
s900608183 | p03803 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int M = Integer.parseInt(sc.next());
String[N] imgA;
String[M] imgB;
Boolean checkAB;
int j;
int k;
String s = "No";
for(int i = 0;i<N;i++){
imgA[i]=sc.next();
}
for(int i = 0;i<M;i++){
imgB[i]=sc.next();
}
for(int i=0;i<(N-M+1);i++){
for(j=0;j<(N-M+1);j++){
checkAB = true;
for (k=0;j<M;j++){
checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
}
if(checkAB){
s="Yes";
}
}
}
System.out.println(s);
sc.close();
}
} | Main.java:8: error: not a statement
String[N] imgA;
^
Main.java:8: error: ';' expected
String[N] imgA;
^
Main.java:8: error: not a statement
String[N] imgA;
^
Main.java:9: error: not a statement
String[M] imgB;
^
Main.java:9: error: ';' expected
String[M] imgB;
^
Main.java:9: error: not a statement
String[M] imgB;
^
6 errors
|
s432077369 | p03803 | Java | import java.util.*;
import java.io.*;
public class CardPoker{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a == b)
System.out.println("Draw");
else if(a == 1)
System.out.println("Alice");
else if(b == 1)
System.out.println("Bob");
else if(a > b)
System.out.println("Alice");
else
System.out.println("Bob");
}
} | Main.java:4: error: class CardPoker is public, should be declared in a file named CardPoker.java
public class CardPoker{
^
1 error
|
s586356228 | p03803 | Java | import java.util.*;
import java.sio.*;
public class CardPoker{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a == b)
System.out.println("Draw");
else if(a == 1)
System.out.println("Alice");
else if(b == 1)
System.out.println("Bob");
else if(a > b)
System.out.println("Alice");
else
System.out.println("Bob");
}
} | Main.java:4: error: class CardPoker is public, should be declared in a file named CardPoker.java
public class CardPoker{
^
Main.java:2: error: package java.sio does not exist
import java.sio.*;
^
2 errors
|
s295987803 | p03803 | C++ | #include <iostream>
#include <cstdint>
using namespace std;
int main()
{
int_least32_t a, b;
cin >> a >> b;
if(a == 1) {
a = 14;
}
if(b == 1) {
b == 14;
}
if(a > b) {
cout << "Alice" << endl;
}
else if(b > a) {
cout << "Bob" << endl;
}
else {
cou << "Draw" << endl;
}
} | a.cc: In function 'int main()':
a.cc:26:17: error: 'cou' was not declared in this scope
26 | cou << "Draw" << endl;
| ^~~
|
s796643217 | p03803 | Java | import java.util.Scanner;
public class Main {
public static int[] powerCard = new int[]{2,3,4,5,6,7,8,9,10,11,12,13,1};
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
String[] card = s.split(" ");
int i = Integer.parseInt(card[0]);
int j = Integer.parseInt(card[1]);
if ((i < 14 && j < 14) && (i > 0 && j > 0) {
for (int k = 0; k < powerCard.length; k++){
if (powerCard[k] == i){
i = k;
}
if (powerCard[k] == j){
j = k;
}
}
if (i > j){
System.out.println("Alice");
}
else if (i < j){
System.out.println("Bob");
}
else{
System.out.println("Draw");
}
}else{
System.out.println("Draw");
}
}
}
| Main.java:14: error: ')' expected
if ((i < 14 && j < 14) && (i > 0 && j > 0) {
^
1 error
|
s290043002 | p03803 | Java | import java.util.Scanner;
public class OneCardPoker {
public static int[] powerCard = new int[]{2,3,4,5,6,7,8,9,10,11,12,13,1};
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
String[] card = s.split(" ");
int i = Integer.parseInt(card[0]);
int j = Integer.parseInt(card[1]);
if ((i < 14 && j < 14) && (i > 0 && j > 0) {
for (int k = 0; k < powerCard.length; k++){
if (powerCard[k] == i){
i = k;
}
if (powerCard[k] == j){
j = k;
}
}
if (i > j){
System.out.println("Alice");
}
else if (i < j){
System.out.println("Bob");
}
else{
System.out.println("Draw");
}
}else{
System.out.println("Draw");
}
}
}
| Main.java:14: error: ')' expected
if ((i < 14 && j < 14) && (i > 0 && j > 0) {
^
1 error
|
s066729883 | p03803 | C++ | #include <iostream>
#include <cstdint>
using namespace std;
int main()
{
int_least32_t a, b;
cin >> a >> b;
if(a == 1) {
a = 14;
}
if(b == 1) {
b == 14;
}
if(a > b) {
cout << "Alice" << endl;
}
else if(b > a) {
cout << "Bob" endl;
}
else {
cou << "Draw" << endl;
}
} | a.cc: In function 'int main()':
a.cc:23:30: error: expected ';' before 'endl'
23 | cout << "Bob" endl;
| ^~~~~
| ;
a.cc:26:17: error: 'cou' was not declared in this scope
26 | cou << "Draw" << endl;
| ^~~
|
s293004477 | p03803 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cstdint>
using namespace std;
int main()
{
int_least32_t n, m;
cin >> n >> m;
vector<string> a( n ), b( m );
for(auto& x : a) {
cin >> x;
}
for(auto& x : b) {
cin >> x;
}
int_least32_t dif{ n - m };
bool isok;
for(auto i = 0; i < dif; ++i) {
for(auto j = 0; j < dif; ++j) {
isok = true;
for(auto k = 0; k < m; ++k) {
if(b != a[i + k].substr(j, m)) {
isok = false;
break;
}
}
if(isok) {
break;
}
}
if(isok) {
break;
}
}
if(isok) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:28:38: error: no match for 'operator!=' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'std::__cxx11::basic_string<char>')
28 | if(b != a[i + k].substr(j, m)) {
| ~ ^~ ~~~~~~~~~~~~~~~~~~~~~
| | |
| | std::__cxx11::basic_string<char>
| std::vector<std::__cxx11::basic_string<char> >
In file included from /usr/include/c++/14/iosfwd:42,
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/postypes.h:197:5: note: candidate: 'template<class _StateT> bool std::operator!=(const fpos<_StateT>&, const fpos<_StateT>&)'
197 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:197:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::fpos<_StateT>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:243:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const allocator<_CharT>&, const allocator<_T2>&)'
243 | operator!=(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:243:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::allocator<_CharT>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:455:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
455 | operator!=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::reverse_iterator<_Iterator>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
/usr/include/c++/14/bits/stl_iterator.h:500:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
500 | operator!=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::reverse_iterator<_Iterator>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
/usr/include/c++/14/bits/stl_iterator.h:1686:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1686 | operator!=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1686:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::move_iterator<_IteratorL>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
/usr/include/c++/14/bits/stl_iterator.h:1753:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1753 | operator!=(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1753:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::move_iterator<_IteratorL>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1052:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1052 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1052:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::pair<_T1, _T2>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:651:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
651 | operator!=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:651:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'std::basic_string_view<_CharT, _Traits>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
/usr/include/c++/14/string_view:658:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
658 | operator!=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:658:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'std::basic_string_view<_CharT, _Traits>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
/usr/include/c++/14/string_view:666:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
666 | operator!=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:666:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
/usr/include/c++/14/bits/basic_string.h:3833:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3833 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3833:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
/usr/include/c++/14/bits/basic_string.h:3847:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3847 | operator!=(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3847:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: mismatched types 'const _CharT*' and 'std::vector<std::__cxx11::basic_string<char> >'
28 | if(b != a[i + k].substr(j, m)) {
| ^
/usr/include/c++/14/bits/basic_string.h:3860:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3860 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3860:5: note: template argument deduction/substitution failed:
a.cc:28:61: note: 'std::vector<std::__cxx11::basic_string<char> >' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
28 | if(b != a[i + k].substr(j, m)) {
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2613:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator!=(const tuple<_UTypes ...>&, |
s500117877 | p03803 | C++ | #include <iostream>
int a, b;
int main() {
std::cin >> a >> b;
if(a == 1) a = 15;
if(b == 1) b = 15;
if(a > b) {
std::cout << "Alice" << std::endl;
else if(a < b) {
std::cout << "Bob" << std::endl;
}else {
std::cout << "Draw" << std::endl;
}
} | a.cc: In function 'int main()':
a.cc:12:3: error: expected '}' before 'else'
12 | else if(a < b) {
| ^~~~
a.cc:10:13: note: to match this '{'
10 | if(a > b) {
| ^
|
s687537759 | p03803 | Java | mport java.io.*;
public class OneCardPoker{
public static void main(String[] args){
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
String str;
int checkn = (int)' ';
String[] s = new String[2];
int[] a = new int[2];
try{
str = r.readLine();
s[0] = str.substring(0,str.indexOf(checkn));
s[1] = str.substring(str.indexOf(checkn)+1,str.length());
}catch(IOException e){
System.out.println(e);
}
for(int i = 0;i < 2;i++){
a[i] = Integer.parseInt(s[i]);
if(a[i] == 1){
a[i] = 14;
}
}
if(a[0] > a[1]){
System.out.println("Alice");
}else if(a[0] == a[1]){
System.out.println("Draw");
}else{
System.out.println("Bob");
}
}
}
| Main.java:1: error: class, interface, enum, or record expected
mport java.io.*;
^
1 error
|
s219893801 | p03803 | C++ | #include <iostream>
#include <cstdin>
using namespace std;
int main()
{
int_least32_t a, b;
cin >> a >> b;
if(a == 1) {
a = 14;
}
if(b == 1) {
b == 14;
}
if(a > b) {
cout << "Alice" << endl;
}
else if(b > a) {
cout << "Bob" endl;
}
else {
cou << "Draw" << endl;
}
}
| a.cc:2:10: fatal error: cstdin: No such file or directory
2 | #include <cstdin>
| ^~~~~~~~
compilation terminated.
|
s879969736 | p03803 | Java | import java.util.Scanner;
public class Test {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int input1 = scanner.nextInt();
int input2 = scanner.nextInt();
if (input1 == input2){
System.out.println("Draw");
}else if(input1 == 1 && input2 != 1){
System.out.println("Alice");
}else if(input2 == 1 && input1 != 1){
System.out.println("Bob");
}else if(input1 > input2){
System.out.println("Alice");
}else if(input1 < input2){
System.out.println("Alice");
}
scanner.close();
}
}
| Main.java:3: error: class Test is public, should be declared in a file named Test.java
public class Test {
^
1 error
|
s143626656 | p03803 | Java | import java.util.Scanner;
public class test {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int input1 = scanner.nextInt();
int input2 = scanner.nextInt();
if (input1 == input2){
System.out.println("Draw");
}else if(input1 == 1 && input2 != 1){
System.out.println("Alice");
}else if(input2 == 1 && input1 != 1){
System.out.println("Bob");
}else if(input1 > input2){
System.out.println("Alice");
}else if(input1 < input2){
System.out.println("Alice");
}
scanner.close();
}
}
| Main.java:3: error: class test is public, should be declared in a file named test.java
public class test {
^
1 error
|
s562492103 | p03803 | Java | package accoder;
import java.util.Scanner;
public class test {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int input1 = scanner.nextInt();
int input2 = scanner.nextInt();
if (input1 == input2){
System.out.println("Draw");
}else if(input1 == 1 && input2 != 1){
System.out.println("Alice");
}else if(input2 == 1 && input1 != 1){
System.out.println("Bob");
}else if(input1 > input2){
System.out.println("Alice");
}else if(input1 < input2){
System.out.println("Alice");
}
scanner.close();
}
}
| Main.java:5: error: class test is public, should be declared in a file named test.java
public class test {
^
1 error
|
s108227401 | p03803 | C++ |
#include<iostream>
using namespace std;
int main{
int a,b;
std::cin >> a >>b;
if(a==1&&b==1){
std::cout << "Draw" << '\n';
}else if(a==1){
std::cout << "Alice" << '\n';
}else if(b==1){
std::cout << "Bob" << '\n';
}else if(a<b){
std::cout << "Bob" << '\n';
}else if(a>b){
std::cout << "Alice" << '\n';
}else{
std::cout << "Draw" << '\n';
}
return 0;
}
| a.cc:5:5: error: cannot declare '::main' to be a global variable
5 | int main{
| ^~~~
a.cc:6:2: error: expected primary-expression before 'int'
6 | int a,b;
| ^~~
a.cc:6:2: error: expected '}' before 'int'
a.cc:5:9: note: to match this '{'
5 | int main{
| ^
a.cc:7:7: error: 'cin' in namespace 'std' does not name a type
7 | std::cin >> a >>b;
| ^~~
In file included from a.cc:3:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:2: error: expected unqualified-id before 'if'
8 | if(a==1&&b==1){
| ^~
a.cc:10:3: error: expected unqualified-id before 'else'
10 | }else if(a==1){
| ^~~~
a.cc:12:3: error: expected unqualified-id before 'else'
12 | }else if(b==1){
| ^~~~
a.cc:14:3: error: expected unqualified-id before 'else'
14 | }else if(a<b){
| ^~~~
a.cc:16:3: error: expected unqualified-id before 'else'
16 | }else if(a>b){
| ^~~~
a.cc:18:3: error: expected unqualified-id before 'else'
18 | }else{
| ^~~~
a.cc:21:2: error: expected unqualified-id before 'return'
21 | return 0;
| ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
22 | }
| ^
|
s662239984 | p03803 | C++ | #include<iostream>
#include <stdint.h>
using namespace std;
int n,m;
int sub(string a[n],string b[m],int i,int j){
for(int k=0;k<m;k++){
if(a[i+k].substr(j,j+m)==b[k]){
}else{
return 0;
}
}
cout<<"Yes"<<endl;
return 1;
}
int main(){
cin>>n>>m;
string a[n];
string b[m];
for(int i=0;i<n;i++){
cin>>a[i];
}
for(int i=0;i<m;i++){
cin>>b[i];
}
for(int i=0;i<=n-m;i++){
for(int j=0;j<=n-m;j++){
if(a[i].substr(j,j+m)==b[0]){
if(sub(a,b,i,j)==1){
return 0;
}
}
}
}
cout<<"No"<<endl;
return 0;
} | a.cc:5:18: error: size of array 'a' is not an integral constant-expression
5 | int sub(string a[n],string b[m],int i,int j){
| ^
a.cc:5:30: error: size of array 'b' is not an integral constant-expression
5 | int sub(string a[n],string b[m],int i,int j){
| ^
|
s010632068 | p03803 | C++ | #include <iostream>
using namspace std;
int main() {
int A, B;
cin >> A >> B;
A = A == 1 ? A : 14;
B = B == 1 ? B : 14;
cout << A == B ? "Draw" : A > B ? "Alice" : "Bob" << endl;
return 0;
}
| a.cc:3:7: error: expected nested-name-specifier before 'namspace'
3 | using namspace std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> A >> B;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout << A == B ? "Draw" : A > B ? "Alice" : "Bob" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:62: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | cout << A == B ? "Draw" : A > B ? "Alice" : "Bob" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s363144493 | p03803 | C++ | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ull = unsigned long long;
const char en='\n';
int main(){
int a,b
cin>>a>>b;
a+=11;
a%=13;
b+=11;
b%=13;
if(a<b){
cout<<"Alice"<<en;
}else if(a>b){
cout<<"Bob"<<en;
}else{
cout<<"Even"<<en;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:9: error: expected initializer before 'cin'
11 | cin>>a>>b;
| ^~~
a.cc:14:9: error: 'b' was not declared in this scope
14 | b+=11;
| ^
|
s720533424 | p03803 | C++ |
#include<iostream>
using namespace std;
int main{
int a,b;
std::cin >> a >>b;
if(a==1&&b==1){
std::cout << "Draw" << '\n';
}else if(a==1){
std::cout << "Alice" << '\n';
}else if(b==1){
std::cout << "Bob" << '\n';
}else if(a<b){
std::cout << "Bob" << '\n';
}else if(a>b){
std::cout << "Alice" << '\n';
}else{
std::cout << "Draw" << '\n';
}
return 0;
}
| a.cc:5:5: error: cannot declare '::main' to be a global variable
5 | int main{
| ^~~~
a.cc:6:2: error: expected primary-expression before 'int'
6 | int a,b;
| ^~~
a.cc:6:2: error: expected '}' before 'int'
a.cc:5:9: note: to match this '{'
5 | int main{
| ^
a.cc:7:7: error: 'cin' in namespace 'std' does not name a type
7 | std::cin >> a >>b;
| ^~~
In file included from a.cc:3:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:8:2: error: expected unqualified-id before 'if'
8 | if(a==1&&b==1){
| ^~
a.cc:10:3: error: expected unqualified-id before 'else'
10 | }else if(a==1){
| ^~~~
a.cc:12:3: error: expected unqualified-id before 'else'
12 | }else if(b==1){
| ^~~~
a.cc:14:3: error: expected unqualified-id before 'else'
14 | }else if(a<b){
| ^~~~
a.cc:16:3: error: expected unqualified-id before 'else'
16 | }else if(a>b){
| ^~~~
a.cc:18:3: error: expected unqualified-id before 'else'
18 | }else{
| ^~~~
a.cc:21:2: error: expected unqualified-id before 'return'
21 | return 0;
| ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
22 | }
| ^
|
s189065923 | p03803 | Java | import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if (A == 1) {
A = 14;
}
if (B == 1) {
B = 14;
}
if (A > B) {
System.out.println("Alice");
return;
}
if (B > A) {
System.out.println("Bob");
return;
} if(A == B) {
System.out.println("Draw");
}
}
} | Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s767263192 | p03803 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
sc.close();
String ans;
if(a==b){
ans="Draw";
}else if(a==1){
ans="Alice";
}else if(b==1){
ans="Bob";
}else{
ans = a>b ? "Alice":"Bob";
}
System.out.println(ans);
}
}
| Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s298585539 | p03803 | C++ | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ull = unsigned long long;
const char en='¥n';
int main(){
int a,b
cin>>a,b;
a+=11;
a%=13;
b+=11;
b%=13;
if(a<b){
cout<<"Alice"<<en;
}else if(a>b){
cout<<"Bob"<<en;
}else{
cout<<"Even"<<en;
}
return 0;
} | a.cc:7:15: warning: multi-character character constant [-Wmultichar]
7 | const char en='¥n';
| ^~~~
a.cc:7:15: warning: overflow in conversion from 'int' to 'char' changes value from '12756334' to '110' [-Woverflow]
a.cc: In function 'int main()':
a.cc:11:9: error: expected initializer before 'cin'
11 | cin>>a,b;
| ^~~
a.cc:14:9: error: 'b' was not declared in this scope
14 | b+=11;
| ^
|
s162119675 | p03803 | C++ | #include <iostream>
using namespace std;
int main() {
int a;int b;
cin>>a>>b;
if(b==1)b=14;
if(a==1)a=14;
if(a>b)cout<<"Alice";
else if(a<b)cout<<"Bob";
else cout<<"Draw";
retu | a.cc: In function 'int main()':
a.cc:12:9: error: 'retu' was not declared in this scope
12 | retu
| ^~~~
a.cc:12:13: error: expected '}' at end of input
12 | retu
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s386303881 | p03803 | Java | import java.util.*;
public class main {
public static void main(String[]args){
Scanner stdIn = new Scanner(System.in);
int a = stdIn.nextInt();
int b = stdIn.nextInt();
if(a==1){
if(b!=1){
System.out.println("Alice");
}
}
if(b==1){
if(a!=1){
System.out.println("Bob");
}
}
if((a>b)&&(a!=1)&&(b!=1)) System.out.println("Alice");
if((a<b)&&(a!=1)&&(b!=1)) System.out.println("Bob");
if(a==b) System.out.println("Draw");
}
} | Main.java:2: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s610255224 | p03803 | C++ | #include<iostream>
#include<string>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
using namespace std;
typedef pair<int, int> pii;
int main(){ll a,b;
cin>>a>>b;
if(a==b)return puts("Draw ") *0;
else if(a==1 ||b==1)a==1 ? cout<<"Alice"<<endl; : cout<<"Bob"<<endl;
else if(a>b) cout<<"Alice "<<endl;
else cout<<"Bob"<<endl;
}
| a.cc: In function 'int main()':
a.cc:13:47: error: expected ':' before ';' token
13 | else if(a==1 ||b==1)a==1 ? cout<<"Alice"<<endl; : cout<<"Bob"<<endl;
| ^
| :
a.cc:13:47: error: expected primary-expression before ';' token
a.cc:13:49: error: expected primary-expression before ':' token
13 | else if(a==1 ||b==1)a==1 ? cout<<"Alice"<<endl; : cout<<"Bob"<<endl;
| ^
a.cc:14:1: error: 'else' without a previous 'if'
14 | else if(a>b) cout<<"Alice "<<endl;
| ^~~~
|
s278382215 | p03803 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int CardA = Integer.parseInt(sc.next());
int CardB = Integer.parseInt(sc.next());
String s = "";
if(CardA == 1){
CardA = 14";
}
if(CardB == 1){
CardB = 14";
}
if(CardA > CardB){
s="Alice";
}else if(CardB > CardA){
s="Bob";
}else if(CardB == CardA){
s="Draw";
}
System.out.println(s);
sc.close();
}
} | Main.java:10: error: unclosed string literal
CardA = 14";
^
Main.java:14: error: unclosed string literal
CardB = 14";
^
2 errors
|
s382970879 | p03803 | C++ | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from fractions import gcd
def readln():
_res = list(map(int,str(input()).split(' ')))
return _res
def strong(x,y):
return (x == 1) or (x > y)
a = readln()
if a[0] == a[1]:
print("Draw")
elif strong(a[0],a[1]):
print("Alice")
else:
print("Bob")
| a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python3
| ^
a.cc:2:3: error: invalid preprocessing directive #-
2 | # -*- coding: utf-8 -*-
| ^
a.cc:4:1: error: 'from' does not name a type
4 | from fractions import gcd
| ^~~~
|
s265919941 | p03803 | C++ |
#include "stdafx.h"
int main()
{
int a, b;
scanf("%d %d", &a, &b);
if (a == 1)
a += 13;
if (b == 1)
b += 13;
if (a > b)
puts("Alice");
else if (a == b)
puts("Draw");
else if (a < b)
puts("Bob");
return 0;
} | a.cc:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s301117200 | p03803 | C | #include<stdio.h>
int main(void){
int Alice, Bob;
scanf("%d %d", Alice, Bob);
if(Alice < Bob && 1 < Alice){
printf("Bob");
}
else if(Alice > Bob && 1 < Bob){
printf("Alice")
}
else if(Alice == Bob){
printf("Draw");
}
else if(Alice < Bob && Alice == 1){
printf("Alice");
}
else{
printf("Bob");
}
return 0;
} | main.c: In function 'main':
main.c:9:16: error: expected ';' before '}' token
9 | printf("Alice")
| ^
| ;
10 | }
| ~
|
s886906848 | p03803 | 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();
if(A<B)
{
if(A==1)
{
System.out.priln("Alice");
}
else
{
System.out.println("Bob");
}
}
else if(A>B)
{
if(B==1)
{
System.out.println("Bob");
}
else
{
System.out.println("Alice");
}
}
else
{
System.out.println("Draw");
}
}
} | Main.java:13: error: cannot find symbol
System.out.priln("Alice");
^
symbol: method priln(String)
location: variable out of type PrintStream
1 error
|
s950555765 | p03803 | Java | mport java.util.Scanner;
/**
* Created by liguoxiang on 2017/02/11.
*/
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
// スペース区切りの整数の入力
int b = sc.nextInt();
if(((a!=b)&&(a==1))|| a>b){
System.out.println("Alice");
}else if(((a!=b) && (b==1)) ||a<b){
System.out.println("Bob");
}else{
System.out.println("Draw");
}
}
} | Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
|
s104957047 | p03803 | C++ | #include<iostream>
#include<vector>
#include<math.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a == b ? "Draw" : a < b && b =! 1 ? "Alice" : "Bob") << endl;
}
| a.cc: In function 'int main()':
a.cc:9:36: error: lvalue required as left operand of assignment
9 | cout << (a == b ? "Draw" : a < b && b =! 1 ? "Alice" : "Bob") << endl;
| ~~~~~~^~~~
|
s152728629 | p03803 | Java | import java.util.*;
public class a {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int a = sc.nextInt();
// get two integers separated with half-width break
int b = sc.nextInt();
if (a > 12) {
a = 0;
}
if (b > 12) {
b = 0;
}
if (a > b) {
System.out.println("Alice");
}
else {
if (b > a) {
System.out.println("Bob");
}
else {
System.out.println("Draw");
}
}
}
}
| Main.java:2: error: class a is public, should be declared in a file named a.java
public class a {
^
1 error
|
s031408260 | p03803 | C++ | #include <iostream>
using namespace std;
int main() {
int a;int b;
cin>>a>>b;
if(b==1)b=14;
if(a==1)a=14;
if(a<b)cout<<Alice;
else if(a>b)cout<<Bob;
else cout<<Draw;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:14: error: 'Alice' was not declared in this scope
9 | if(a<b)cout<<Alice;
| ^~~~~
a.cc:10:19: error: 'Bob' was not declared in this scope
10 | else if(a>b)cout<<Bob;
| ^~~
a.cc:11:12: error: 'Draw' was not declared in this scope
11 | else cout<<Draw;
| ^~~~
|
s595792350 | p03803 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int CardA = Integer.parseInt(sc.next());
int CardB = Integer.parseInt(sc.next());
String s;
if(CardA > CardB){
s="Alice";
}else if(CardB > CardA){
s="Bob";
}else if(CardB == CardA){
s="Draw";
}
System.out.println(s);
sc.close();
}
} | Main.java:16: error: variable s might not have been initialized
System.out.println(s);
^
1 error
|
s299692691 | p03803 | C++ | 1. #include<iostream>
2. #include<string>
3. #include<cstdio>
4. #include<algorithm>
5. #include<stack>
6. #include<queue>
7. #include<vector>
8. #include<cmath>
9. #include<utility>
10. #include<set>
11. #include<complex>
12. #include<map>
13. #define vi vector<int>
14. #define vvi vector<vector<int> >
15. #define ll long long int
16. #define vl vector<ll>
17. #define vvl vector<vector<ll>>
18. #define vb vector<bool>
19. #define vc vector<char>
20. #define vs vector<string>
21. #define ld long double
22. #define INF 1e9
23. #define EPS 0.0000000001
24. #define rep(i,n) for(int i=0;i<n;i++)
25. #define loop(i,s,n) for(int i=s;i<n;i++)
26. #define all(in) in.begin(), in.end()
27. #define MAX 9999999
28. using namespace std;
29. typedef pair<int, int> pii;
30. int main(){
31. ll a,b;
32. cin>>a>>b;
33. if(a==b)return puts("Draw ") *0;
34. else if(a==1 ||b==1)a==1 ? cout<<"Alice"<<endl; : cout<<"Bob"<<endl;
35. else if(a>b) cout<<"Alice "<<endl;
36. else cout<<"Bob"<<endl;
37.
38. }
| a.cc:1:4: error: stray '#' in program
1 | 1. #include<iostream>
| ^
a.cc:2:4: error: stray '#' in program
2 | 2. #include<string>
| ^
a.cc:3:4: error: stray '#' in program
3 | 3. #include<cstdio>
| ^
a.cc:4:4: error: stray '#' in program
4 | 4. #include<algorithm>
| ^
a.cc:5:4: error: stray '#' in program
5 | 5. #include<stack>
| ^
a.cc:6:4: error: stray '#' in program
6 | 6. #include<queue>
| ^
a.cc:7:4: error: stray '#' in program
7 | 7. #include<vector>
| ^
a.cc:8:4: error: stray '#' in program
8 | 8. #include<cmath>
| ^
a.cc:9:4: error: stray '#' in program
9 | 9. #include<utility>
| ^
a.cc:10:5: error: stray '#' in program
10 | 10. #include<set>
| ^
a.cc:11:5: error: stray '#' in program
11 | 11. #include<complex>
| ^
a.cc:12:5: error: stray '#' in program
12 | 12. #include<map>
| ^
a.cc:13:5: error: stray '#' in program
13 | 13. #define vi vector<int>
| ^
a.cc:14:5: error: stray '#' in program
14 | 14. #define vvi vector<vector<int> >
| ^
a.cc:15:5: error: stray '#' in program
15 | 15. #define ll long long int
| ^
a.cc:16:5: error: stray '#' in program
16 | 16. #define vl vector<ll>
| ^
a.cc:17:5: error: stray '#' in program
17 | 17. #define vvl vector<vector<ll>>
| ^
a.cc:18:5: error: stray '#' in program
18 | 18. #define vb vector<bool>
| ^
a.cc:19:5: error: stray '#' in program
19 | 19. #define vc vector<char>
| ^
a.cc:20:5: error: stray '#' in program
20 | 20. #define vs vector<string>
| ^
a.cc:21:5: error: stray '#' in program
21 | 21. #define ld long double
| ^
a.cc:22:5: error: stray '#' in program
22 | 22. #define INF 1e9
| ^
a.cc:23:5: error: stray '#' in program
23 | 23. #define EPS 0.0000000001
| ^
a.cc:24:5: error: stray '#' in program
24 | 24. #define rep(i,n) for(int i=0;i<n;i++)
| ^
a.cc:25:5: error: stray '#' in program
25 | 25. #define loop(i,s,n) for(int i=s;i<n;i++)
| ^
a.cc:26:5: error: stray '#' in program
26 | 26. #define all(in) in.begin(), in.end()
| ^
a.cc:27:5: error: stray '#' in program
27 | 27. #define MAX 9999999
| ^
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1. #include<iostream>
| ^~
a.cc:24:34: error: 'i' does not name a type
24 | 24. #define rep(i,n) for(int i=0;i<n;i++)
| ^
a.cc:24:38: error: 'i' does not name a type
24 | 24. #define rep(i,n) for(int i=0;i<n;i++)
| ^
a.cc:25:37: error: 'i' does not name a type
25 | 25. #define loop(i,s,n) for(int i=s;i<n;i++)
| ^
a.cc:25:41: error: 'i' does not name a type
25 | 25. #define loop(i,s,n) for(int i=s;i<n;i++)
| ^
a.cc:29:1: error: expected unqualified-id before numeric constant
29 | 29. typedef pair<int, int> pii;
| ^~~
a.cc:30:1: error: expected unqualified-id before numeric constant
30 | 30. int main(){
| ^~~
|
s086840489 | p03803 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a==1)
{
if(b==1)cout<<"Draw"<<endl;
else cout<<cout<<"Alice"<<endl;
}
else if(b==1)
{
if(a==1)cout<<"Draw"<<endl;
else cout<<"Bob"<<endl;
}
else
{
if(a>b)cout<<"Alice"<<endl;
else if(a==b)cout<<"Draw"<<endl;
else cout<<"Bob"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:18: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::ostream' {aka 'std::basic_ostream<char>'})
10 | else cout<<cout<<"Alice"<<endl;
| ~~~~^~~~~~
| | |
| | basic_ostream<[...]>
| basic_ostream<[...]>
a.cc:10:18: note: candidate: 'operator<<(int, int)' (built-in)
10 | else cout<<cout<<"Alice"<<endl;
| ~~~~^~~~~~
a.cc:10:18: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<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 'std::ostream' {aka 'std::basic_ostream<char>'} to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~ |
s238699887 | p03803 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a>b || (a==1 && b!=1)cout<<"Alice"<<endl;
else if(a<b || (b==1&&a!=1))cout<<"Bob"<<endl;
else cout<<"Draw"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:29: error: expected ';' before 'cout'
7 | if(a>b || (a==1 && b!=1)cout<<"Alice"<<endl;
| ^~~~
| ;
a.cc:8:5: error: expected primary-expression before 'else'
8 | else if(a<b || (b==1&&a!=1))cout<<"Bob"<<endl;
| ^~~~
a.cc:7:49: error: expected ')' before 'else'
7 | if(a>b || (a==1 && b!=1)cout<<"Alice"<<endl;
| ~ ^
| )
8 | else if(a<b || (b==1&&a!=1))cout<<"Bob"<<endl;
| ~~~~
|
s626671618 | p03803 | Java | import java.util.*;
public class a {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int a = sc.nextInt();
// get two integers separated with half-width break
int b = sc.nextInt();
if (a > 12) {
a = 0;
}
if (b > 12) {
b = 0;
}
if (a > b) {
System.out.println("Alice");
}
else {
if (b > a) {
System.out.println("Bob");
}
else {
System.out.println("Draw");
}
}
System.out.println();
}
}
| Main.java:2: error: class a is public, should be declared in a file named a.java
public class a {
^
1 error
|
s089168023 | p03803 | C++ | a, b = map(int, input().split())
l = ["Alice", "Bob", "Draw"]
if a > b:
if a == 13 and b == 1:
idx = 1
else:
idx = 0
elif a < b:
if a == 1 and b == 13:
idx = 0
else:
idx = 1
else:
idx = 2
print(l[idx])
| a.cc:1:1: error: 'a' does not name a type
1 | a, b = map(int, input().split())
| ^
|
s116034902 | p03803 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int cardA = Integer.parseInt(sc.next());
int CardB = Integer.parseInt(sc.next());
String s;
if(CardA > CardB){
s="Alice";
}else if(CardB > CardA){
s="Bob";
}else{
s="Draw";
}
System.out.println(s);
sc.close();
}
} | Main.java:9: error: cannot find symbol
if(CardA > CardB){
^
symbol: variable CardA
location: class Main
Main.java:11: error: cannot find symbol
}else if(CardB > CardA){
^
symbol: variable CardA
location: class Main
2 errors
|
s806946515 | p03803 | Java | import java.util.*;
public class a {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int a = sc.nextInt();
// get two integers separated with half-width break
int b = sc.nextInt();
if (a > 12) {
a = 0;
}
if (b > 12) {
b = 0;
}
if (a > b) {
System.out.println("Alice");
}
else {
if (b > a) {
System.out.println("Bob");
}
else {
System.out.println("Draw");
}
}
System.out.println();
}
} | Main.java:2: error: class a is public, should be declared in a file named a.java
public class a {
^
1 error
|
s462188255 | p03803 | C++ | v#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include<map>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
using namespace std;
#include <cstdint>
#define MAX_MOD 1000000007
#define REP(i,n) for(int i = 0;i < n;++i)
int main(){
int a,b;
cin >>a >> b;
a--;b--;
if (a == 0) a = 1000;
if (b== 0) b = 1000;
if (a < b) cout << "Alice"<< endl;
else if (a > b) cout << "Bob"<< endl;
else cout << "Draw" << endl;
} | a.cc:1:2: error: stray '#' in program
1 | v#define _CRT_SECURE_NO_WARNINGS
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#define _CRT_SECURE_NO_WARNINGS
| ^
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/bits/stl_algo.h:71,
from /usr/include/c++/14/algorithm:61,
from a.cc:3:
/usr/include/stdlib.h:98:8: error: 'size_t' does not name a type
98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
| ^~~~~~
/usr/include/stdlib.h:42:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
41 | # include <bits/waitstatus.h>
+++ |+#include <cstddef>
42 |
/usr/include/stdlib.h:278:36: error: 'size_t' has not been declared
278 | extern int strfromd (char *__dest, size_t __size, const char *__format,
| ^~~~~~
/usr/include/stdlib.h:282:36: error: 'size_t' has not been declared
282 | extern int strfromf (char *__dest, size_t __size, const char *__format,
| ^~~~~~
/usr/include/stdlib.h:286:36: error: 'size_t' has not been declared
286 | extern int strfroml (char *__dest, size_t __size, const char *__format,
| ^~~~~~
/usr/include/stdlib.h:298:38: error: 'size_t' has not been declared
298 | extern int strfromf32 (char *__dest, size_t __size, const char * __format,
| ^~~~~~
/usr/include/stdlib.h:304:38: error: 'size_t' has not been declared
304 | extern int strfromf64 (char *__dest, size_t __size, const char * __format,
| ^~~~~~
/usr/include/stdlib.h:310:39: error: 'size_t' has not been declared
310 | extern int strfromf128 (char *__dest, size_t __size, const char * __format,
| ^~~~~~
/usr/include/stdlib.h:316:39: error: 'size_t' has not been declared
316 | extern int strfromf32x (char *__dest, size_t __size, const char * __format,
| ^~~~~~
/usr/include/stdlib.h:322:39: error: 'size_t' has not been declared
322 | extern int strfromf64x (char *__dest, size_t __size, const char * __format,
| ^~~~~~
In file included from /usr/include/stdlib.h:514:
/usr/include/x86_64-linux-gnu/sys/types.h:33:9: error: '__u_char' does not name a type
33 | typedef __u_char u_char;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:34:9: error: '__u_short' does not name a type
34 | typedef __u_short u_short;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:35:9: error: '__u_int' does not name a type
35 | typedef __u_int u_int;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:36:9: error: '__u_long' does not name a type
36 | typedef __u_long u_long;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:37:9: error: '__quad_t' does not name a type
37 | typedef __quad_t quad_t;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:38:9: error: '__u_quad_t' does not name a type
38 | typedef __u_quad_t u_quad_t;
| ^~~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:39:9: error: '__fsid_t' does not name a type
39 | typedef __fsid_t fsid_t;
| ^~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:42:9: error: '__loff_t' does not name a type; did you mean '__locale_t'?
42 | typedef __loff_t loff_t;
| ^~~~~~~~
| __locale_t
/usr/include/x86_64-linux-gnu/sys/types.h:47:9: error: '__ino_t' does not name a type
47 | typedef __ino_t ino_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:54:9: error: '__ino64_t' does not name a type
54 | typedef __ino64_t ino64_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:59:9: error: '__dev_t' does not name a type
59 | typedef __dev_t dev_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:64:9: error: '__gid_t' does not name a type
64 | typedef __gid_t gid_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:69:9: error: '__mode_t' does not name a type; did you mean '__locale_t'?
69 | typedef __mode_t mode_t;
| ^~~~~~~~
| __locale_t
/usr/include/x86_64-linux-gnu/sys/types.h:74:9: error: '__nlink_t' does not name a type
74 | typedef __nlink_t nlink_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:79:9: error: '__uid_t' does not name a type
79 | typedef __uid_t uid_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:97:9: error: '__pid_t' does not name a type
97 | typedef __pid_t pid_t;
| ^~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:103:9: error: '__id_t' does not name a type
103 | typedef __id_t id_t;
| ^~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:114:9: error: '__daddr_t' does not name a type
114 | typedef __daddr_t daddr_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:115:9: error: '__caddr_t' does not name a type
115 | typedef __caddr_t caddr_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:121:9: error: '__key_t' does not name a type
121 | typedef __key_t key_t;
| ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:126:
/usr/include/x86_64-linux-gnu/bits/types/clock_t.h:7:9: error: '__clock_t' does not name a type
7 | typedef __clock_t clock_t;
| ^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:128:
/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h:7:9: error: '__clockid_t' does not name a type
7 | typedef __clockid_t clockid_t;
| ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:129:
/usr/include/x86_64-linux-gnu/bits/types/time_t.h:10:9: error: '__time_t' does not name a type
10 | typedef __time_t time_t;
| ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:130:
/usr/include/x86_64-linux-gnu/bits/types/timer_t.h:7:9: error: '__timer_t' does not name a type
7 | typedef __timer_t timer_t;
| ^~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:134:9: error: '__useconds_t' does not name a type
134 | typedef __useconds_t useconds_t;
| ^~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/sys/types.h:138:9: error: '__suseconds_t' does not name a type
138 | typedef __suseconds_t suseconds_t;
| ^~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:155:
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:24:9: error: '__int8_t' does not name a type; did you mean '__int128_t'?
24 | typedef __int8_t int8_t;
| ^~~~~~~~
| __int128_t
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:25:9: error: '__int16_t' does not name a type; did you mean '__int128_t'?
25 | typedef __int16_t int16_t;
| ^~~~~~~~~
| __int128_t
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:26:9: error: '__int32_t' does not name a type; did you mean '__int128_t'?
26 | typedef __int32_t int32_t;
| ^~~~~~~~~
| __int128_t
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:9: error: '__int64_t' does not name a type; did you mean '__int128_t'?
27 | typedef __int64_t int64_t;
| ^~~~~~~~~
| __int128_t
/usr/include/x86_64-linux-gnu/sys/types.h:158:9: error: '__uint8_t' does not name a type; did you mean '__uint128_t'?
158 | typedef __uint8_t u_int8_t;
| ^~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/sys/types.h:159:9: error: '__uint16_t' does not name a type; did you mean '__uint128_t'?
159 | typedef __uint16_t u_int16_t;
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/sys/types.h:160:9: error: '__uint32_t' does not name a type; did you mean '__uint128_t'?
160 | typedef __uint32_t u_int32_t;
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/sys/types.h:161:9: error: '__uint64_t' does not name a type; did you mean '__uint128_t'?
161 | typedef __uint64_t u_int64_t;
| ^~~~~~~~~~
| __uint128_t
In file included from /usr/include/endian.h:35,
from /usr/include/x86_64-linux-gnu/sys/types.h:176:
/usr/include/x86_64-linux-gnu/bits/byteswap.h:33:17: error: '__uint16_t' does not name a type; did you mean '__uint128_t'?
33 | static __inline __uint16_t
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/bits/byteswap.h:48:17: error: '__uint32_t' does not name a type; did you mean '__uint128_t'?
48 | static __inline __uint32_t
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/bits/byteswap.h:69:31: error: '__uint64_t' does not name a type; did you mean '__uint128_t'?
69 | __extension__ static __inline __uint64_t
| ^~~~~~~~~~
| __uint128_t
In file included from /usr/include/endian.h:36:
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h:32:17: error: '__uint16_t' does not name a type; did you mean '__uint128_t'?
32 | static __inline __uint16_t
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h:38:17: error: '__uint32_t' does not name a type; did you mean '__uint128_t'?
38 | static __inline __uint32_t
| ^~~~~~~~~~
| __uint128_t
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h:44:17: error: '__uint64_t' does not name a type; did you mean '__uint128_t'?
44 | static __inline __uint64_t
| ^~~~~~~~~~
| __uint128_t
In file included from /usr/include/x86_64-linux-gnu/sys/select.h:37,
from /usr/include/x86_64-linux-gnu/sys/types.h:179:
/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h:14:3: error: '__time_t' does not name a |
s896237476 | p03803 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#define FOR(i,k,n) for((i)=(k);(i)<(n);(i)++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define pb push_back
#define all(a) (a).begin(),(a).end() //greater<int>()
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A>B){
cout<<"Alice";
}
else if(B>A){
cout<<"Bob";
}
else{
cout<<"Draw"
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:25:29: error: expected ';' before '}' token
25 | cout<<"Draw"
| ^
| ;
26 | }
| ~
|
s834744953 | p03803 | C | #include<stdio,h>
int main()
{
int a, c;
scanf("%d%d", &a, &c);
if(a==c) printf("Draw");
else if(a==1) printf("Alice");
else if(c==1) printf("Bob");
else if(a>c) printf("Alice");
else printf("Bob");
return 0;
} | main.c:1:9: fatal error: stdio,h: No such file or directory
1 | #include<stdio,h>
| ^~~~~~~~~
compilation terminated.
|
s848743453 | p03803 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Main
{
class Program
{
static void Main(string[] args)
{
string[] str = Console.ReadLine().Split(' ');
int a, b;
a = int.Parse(str[0]);
b = int.Parse(str[1]);
if (a == 1) a = 14;
if (b == 1) b = 14;
if (a < b) Console.WriteLine("Alice");
else if (a == b) Console.WriteLine("Draw");
else Console.WriteLine("Bob");
}
}
} | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:11:26: error: 'string' has not been declared
11 | static void Main(string[] args)
| ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
11 | static void Main(string[] args)
| ^~~~
a.cc:23:6: error: expected ';' after class definition
23 | }
| ^
| ;
a.cc: In static member function 'static void Main::Program::Main(int*)':
a.cc:13:13: error: 'string' was not declared in this scope
13 | string[] str = Console.ReadLine().Split(' ');
| ^~~~~~
a.cc:13:20: error: expected primary-expression before ']' token
13 | string[] str = Console.ReadLine().Split(' ');
| ^
a.cc:15:17: error: expected primary-expression before 'int'
15 | a = int.Parse(str[0]);
| ^~~
a.cc:16:17: error: expected primary-expression before 'int'
16 | b = int.Parse(str[1]);
| ^~~
a.cc:19:24: error: 'Console' was not declared in this scope
19 | if (a < b) Console.WriteLine("Alice");
| ^~~~~~~
a.cc:20:30: error: 'Console' was not declared in this scope
20 | else if (a == b) Console.WriteLine("Draw");
| ^~~~~~~
a.cc:21:18: error: 'Console' was not declared in this scope
21 | else Console.WriteLine("Bob");
| ^~~~~~~
|
s782140910 | p03803 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <map>
#include <stack>
#include <set>
#include <vector>
#include <algorithm>
using namespace std;
#define INF 9999999999;
#define D(x) cout << x << endl;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vll;
int main() {
int a, b;
cin >> a >> b;
if (a == 1) {
a = 14;
}
if (b == 1) {
b = 14;
}
D(a > b ? "Alice" : "Bob");
return 0;
}
| a.cc: In function 'int main()':
a.cc:36:7: error: no match for 'operator>' (operand types are 'std::basic_ostream<char>' and 'int')
36 | D(a > b ? "Alice" : "Bob");
| ^ ~
| |
| int
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
a.cc:36:7: note: candidate: 'operator>(int, int)' (built-in)
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
a.cc:36:7: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
/usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
/usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3942 | operator>(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2619 | operator>(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
36 | D(a > b ? "Alice" : "Bob");
| ^
a.cc:16:22: note: in definition of macro 'D'
16 | #define D(x) cout << x << endl;
| ^
In file included from /usr/include/c++/14/deque:66,
from /usr/include/c++/14/queue:62,
from a.cc:6:
/usr/include/c++/14/bits/stl_deque.h:2349:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator>(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)'
2349 | operator>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_deque.h:2349:5: note: template argument deduction/substitution failed:
a.cc:36:9: note: 'std::basic_ostream<char>' is not derived from 'const std::deque<_Tp, _Alloc>'
36 |
s414833044 | p03803 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;cin >>a >> b;
if(a == 1 && b != 1){
cout << "Alice" << endl;
}
else if(a != 1 && b == 1){
cout << "Bob" << endl;
}
else if (a == b){
cout << "Draw" << endl;
}
else{
a > b ? cout << "Alice" << endl; : cout << "Bob" << endl;
}
} | a.cc: In function 'int main()':
a.cc:15:48: error: expected ':' before ';' token
15 | a > b ? cout << "Alice" << endl; : cout << "Bob" << endl;
| ^
| :
a.cc:15:48: error: expected primary-expression before ';' token
a.cc:15:50: error: expected primary-expression before ':' token
15 | a > b ? cout << "Alice" << endl; : cout << "Bob" << endl;
| ^
|
s100303446 | p03803 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main() {
int i, j;
int a, b;
scanf("%d, %d", &a, &b);
if (a==1) {
a = 14;
}
if( b== 1){
b = 14;
}
if(A>B){
printf("Alice");
} else if(A == B){
printf("Draw");
}
else {
printf("Bob");
}
return 0;
} | main.c: In function 'main':
main.c:18:6: error: 'A' undeclared (first use in this function)
18 | if(A>B){
| ^
main.c:18:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:8: error: 'B' undeclared (first use in this function)
18 | if(A>B){
| ^
|
s703629596 | p03803 | Java | import java.io.*;
import java.util.*;
public class A {
public static void main(String[] args) throws Exception {
FastScannerA fs = new FastScannerA();
PrintWriter out = new PrintWriter(System.out);
int n = fs.nextInt(), m = fs.nextInt();
if(n == 1 && m == 1) {
System.out.println("Draw");
} else if(n == 1) {
System.out.println("Alice");
} else if(m == 1) {
System.out.println("Bob");
} else {
if(n > m) {
System.out.println("Alice");
} else if(n < m) {
System.out.println("Bob");
} else {
System.out.println("Draw");
}
}
out.close();
}
}
class FastScannerA {
BufferedReader br;
StringTokenizer st;
public FastScannerA() {
try {
br = new BufferedReader(new InputStreamReader(System.in));
st = new StringTokenizer("");
} catch (Exception e){e.printStackTrace();}
}
public String next() {
if (st.hasMoreTokens()) return st.nextToken();
try {st = new StringTokenizer(br.readLine());}
catch (Exception e) {e.printStackTrace();}
return st.nextToken();
}
public int nextInt() {return Integer.parseInt(next());}
public long nextLong() {return Long.parseLong(next());}
public double nextDouble() {return Double.parseDouble(next());}
public String nextLine() {
String line = "";
try {line = br.readLine();}
catch (Exception e) {e.printStackTrace();}
return line;
}
public Integer[] nextIntegerArray(int n) {
Integer[] a = new Integer[n];
for(int i = 0; i < n; i++) a[i] = nextInt();
return a;
}
public int[] nextIntArray(int n) {
int[] a = new int[n];
for(int i = 0; i < n; i++) a[i] = nextInt();
return a;
}
public char[] nextCharArray() {
return nextLine().toCharArray();
}
} | Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s265881044 | p03803 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;cin >>a >> b;
if(a == 1 && b != 1){
cout << "Alice" << endl;
}
else if(a != 1 && b == 1){
cout << "Bob" << endl;
}
else if (a == b){
cout << "Draw" << endl;
}
else{
a > b ? cout << "Alice" << endl; cout << "Bob" << endl;
}
} | a.cc: In function 'int main()':
a.cc:15:48: error: expected ':' before ';' token
15 | a > b ? cout << "Alice" << endl; cout << "Bob" << endl;
| ^
| :
a.cc:15:48: error: expected primary-expression before ';' token
|
s169889307 | p03803 | C | #include<stdio,h>
int main()
{
int a, c;
scanf("%d%d", &a, &c);
| main.c:1:9: fatal error: stdio,h: No such file or directory
1 | #include<stdio,h>
| ^~~~~~~~~
compilation terminated.
|
s544290058 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;cin>>N>>M;
char A[N][N];
char B[M][M];
for(int i=0;i<N;i++) cin>>A[i];
for(int i=0;i<M;i++) cin>>B[i];
bool can=false;
for(int i=0;i<=N-M;i++){
for(int l=0;l<=N-M;l++){
bool isyes=true;
for(int j=0;j<M;j++){
for(int k=0;k<M;k++){
if(A[i+j][k+l]!=B[j][k]){
isyes=false;
break;
}
}
if(!isyes) break;
}
if(isyes){
can=true;
break;
}
}
if(can) break;
}
cout<<(can?"Yes":"No")<<endl;
}
}
| a.cc:32:1: error: expected declaration before '}' token
32 | }
| ^
|
s205591367 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
int main() {
ll N,M;
cin>>N>>M;
vector<string> A(N);
for(ll i=;i<N;i++) {
cin>>A[i];
}
vector<string> B(M);
for(ll i=0;i<M;i++) {
cin>>B[i];
}
for(ll i=0;i<N-M+1;i++) {
for(ll j=0;j<N-M+1;j++) {
bool a=true;
for(ll h=0;h<M;h++) {
for(ll k=0;k<M;k++) {
if(S[i+h][j+k]!=T[h][k]) {
a=false;
}
}
}
if(a) {
cout<<"Yes"<<endl;
return 0;
}
}
}
cout<<"No"<<endl;
}
| a.cc: In function 'int main()':
a.cc:10:12: error: expected primary-expression before ';' token
10 | for(ll i=;i<N;i++) {
| ^
a.cc:24:6: error: 'S' was not declared in this scope
24 | if(S[i+h][j+k]!=T[h][k]) {
| ^
a.cc:24:19: error: 'T' was not declared in this scope
24 | if(S[i+h][j+k]!=T[h][k]) {
| ^
|
s097018620 | p03804 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int m = scn.nextInt();
char[][] aa = new char[n][n];
char[][] bb = new char[m][m];
for(int i=0; i<n; i++){
String a = scn.next();
for(int j=0; j<n; j++){
aa[i][j]=a.charAt(j);
}
}
for(int i=0; i<m; i++){
String b = scn.next();
for(int j=0;j<m;j++){
bb[i][j]=b.charAt(j);
}
}
for(int i=0; i<n; i++){
for(int j=0; j<n; j++){
if(i+m>n || j+m>n){
break;
}
String ans = "Yes";
for(int k=0; k<m; k++){
for(int l=0; l<m; l++){
if(aa[i+k][j+l]!=bb[k][l]){
ans = "No";
break;
}
}
}
if(ans.equals("Yes")){
System.out.println(ans);
return;
}
}
}
System.out.println(ans);
}
}
| Main.java:42: error: cannot find symbol
System.out.println(ans);
^
symbol: variable ans
location: class Main
1 error
|
s673476186 | p03804 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int m = scn.nextInt();
char[][] aa = new char[n][n];
char[][] bb = new char[m][m];
for(int i=0;i<n;i++){
String a = scn.next();
for(int j=0;j<n;j++){
A[i][j]=a.charAt(j);
}
}
for(int i=0;i<m;i++){
String b = scn.next();
for(int j=0;j<m;j++){
bb[i][j]=b.charAt(j);
}
}
String ans = "No";
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(i+m>n || j+m>n){
break;
}
for(int k=0;k<m;k++){
for(int l=0;l<m;l++){
if(aa[i+k][j+l]==bb[k][l]){
ans = "Yes";
break;
}
}
}
}
}
System.out.println(ans);
}
}
| Main.java:13: error: cannot find symbol
A[i][j]=a.charAt(j);
^
symbol: variable A
location: class Main
1 error
|
s400891485 | p03804 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int m = scn.nextInt();
char[][] A = new char[n][n];
char[][] B = new char[m][m];
for(int i=0;i<n;i++){
String n = scn.next();
for(int j=0;j<n;j++){
A[i][j]=n.charAt(j);
}
}
for(int i=0;i<m;i++){
String m = scn.next();
for(int j=0;j<m;j++){
B[i][j]=m.charAt(j);
}
}
String ans = "No";
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(i+m>n || j+m>n){
break;
}
for(int k=0;k<m;k++){
for(int l=0;l<m;l++){
if(A[i+k][j+l]==B[k][l]){
ans = "Yes";
break;
}
}
}
}
}
System.out.println(ans);
}
}
| Main.java:11: error: variable n is already defined in method main(String[])
String n = scn.next();
^
Main.java:12: error: bad operand types for binary operator '<'
for(int j=0;j<n;j++){
^
first type: int
second type: String
Main.java:17: error: variable m is already defined in method main(String[])
String m = scn.next();
^
Main.java:18: error: bad operand types for binary operator '<'
for(int j=0;j<m;j++){
^
first type: int
second type: String
4 errors
|
s583694440 | p03804 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int m = scn.nextInt();
char[][] A = new char[n][n];
char[][] B = new char[m][m];
for(int i=0;i<n;i++){
String n = scn.next();
for(int j=0;j<n;j++){
A[i][j]=n.charAt(j);
}
}
for(int i=0;i<m;i++){
String m = scn.next();
for(int j=0;j<m;j++){
B[i][j]=m.charAt(j);
}
}
String ans = "No";
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(i+m>n || j+m>n){
break;
}
for(int k=0;k<m;k++){
for(int l=0;l<m;l++){
if(A[i+k][j+l]==B[k][l]){
ans = ""Yes";
break;
}
}
}
}
System.out.println(ans);
}
} | Main.java:31: error: ';' expected
ans = ""Yes";
^
Main.java:31: error: unclosed string literal
ans = ""Yes";
^
Main.java:39: error: reached end of file while parsing
}
^
3 errors
|
s580874269 | p03804 | C++ | #include<bits/stdc++.h>
using namespace std;
#define oo (long long)1e18
#define ll long long
#define setdp memset(dp,-1,sizeof(dp))
const ll mod = 1e9+7;
void _IOS(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin.sync_with_stdio(0);}
#define PI 3.14159265359
int sx,sy,tx,ty;
ll a[3009][3009];
ll b[200003];
ll n,m;
bool vis[1009][1009];
struct threeElements{
int _1st,_2nd,_3rd;
};
int main()
{
// freopen ("jumping.in","r",stdin);
_IOS();
//18:17
vector<string>v,im;
cin>>n>>m;
for(int i=0;i<n;i++)
{
string s;
cin>>s;
v.push_back(s);
}
for(int i=0;i<m;i++)
{
string s;
cin>>s;
im.push_back(s);
}
for(int i=0;i<n-m+1;i++)
{
for(int j=0;j<n-m+1;j++)
{
int count = 0;
for(int k = 0; k < m; k++){
if(v[k + i].substring(j, (j + m))==im[k]){
count++;
}else{
break;
}
}
if(count == m){
cout<<"Yes";
return 0;
}
}
}
cout<<"No";
}
| a.cc: In function 'int main()':
a.cc:43:37: error: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
43 | if(v[k + i].substring(j, (j + m))==im[k]){
| ^~~~~~~~~
| substr
|
s184226692 | p03804 | C++ | #include<bits/stdc++.h>
using namespace std;
#define oo (long long)1e18
#define ll long long
#define setdp memset(dp,-1,sizeof(dp))
const ll mod = 1e9+7;
void _IOS(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin.sync_with_stdio(0);}
#define PI 3.14159265359
int sx,sy,tx,ty;
ll a[3009][3009];
ll b[200003];
ll n,m;
bool vis[1009][1009];
struct threeElements{
int _1st,_2nd,_3rd;
};
int main()
{
// freopen ("jumping.in","r",stdin);
_IOS();
//18:17
vector<string>v,im;
cin>>n>>m;
for(int i=0;i<n;i++)
{
string s;
cin>>s;
v.push_back(s);
}
for(int i=0;i<m;i++)
{
string s;
cin>>s;
im.push_back(s);
}
for(int i=0;i<n-m+1;i++)
{
for(int j=0;j<n-m+1;j++)
{
int count = 0;
for(int k = 0; k < m; k++){
if(v[k + i].substring(j, (j + m))==im[k]){
count++;
}else{
break;
}
}
if(count == m){
cout<<"Yes";
return 0;
}
}
}
cout<<"No";
}
| a.cc: In function 'int main()':
a.cc:43:37: error: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
43 | if(v[k + i].substring(j, (j + m))==im[k]){
| ^~~~~~~~~
| substr
|
s440377147 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n , m;
cin >> n >> m;
if ( m > n){
cout << "No" << endl;
return 0;
}
vector <string> a(n),b(m);
for ( int i=0 ; i< n ; i++){
cin >> a.at(i);
}
for ( int i=0 ; i< m ; i++){
cin >> b.at(i);
}
for ( int i= 0 ; i <= n-m ; i++){
for ( int j=0 ; j<= n-m ; j++ ){
bool ans = true ;
for ( int k=0 ; k<=m-1 ; k++){
for (int l=0 ; l<=m-1 ; l++){
if ( b.at(k).at(l) != a.at(i+k).at(j+l)){
ans = false ;
break ;
}
}
if(!ans){
break ;
}else if (ans){
cout << "Yes" << endl;
return 0 ;
}
}
}
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:38:2: error: expected '}' at end of input
38 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s351348204 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n , m;
cin >> n >> m;
vector <string> a(n),b(m);
for ( int i=0 ; i< n ; i++){
cin >> a(i);
}
for ( int i=0 ; i< m ; i++){
cin >> b(i);
}
for ( int i= 0 ; i < n-m+1 ; i++){
for ( int j=0 ; j< n-m+1 ; j++ ;){
bool ans = true ;
for ( int k=0 ; j<m ; k++){
for (int l=0 ; l<m ; l++){
if ( b.at(k).at(l) != a.at(i+k).at(j+l)){
ans = false ;
}
}
if(ans) cout << "Yes" << endl;
return 0 ;
}
}
}
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:9:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
9 | cin >> a(i);
| ~^~~
a.cc:12:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
12 | cin >> b(i);
| ~^~~
a.cc:16:35: error: expected ')' before ';' token
16 | for ( int j=0 ; j< n-m+1 ; j++ ;){
| ~ ^~
| )
a.cc:16:37: error: expected primary-expression before ')' token
16 | for ( int j=0 ; j< n-m+1 ; j++ ;){
| ^
|
s488040819 | p03804 | C++ | #include<bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;
template<class T,class U> using umap = unordered_map<T,U>;
template<class T> using uset = unordered_set<T>;
template<class T>
bool ChangeMax(T&a,const T&b){
if(a >= b) return false;
a = b; return true;
}
template<class T>
bool ChangeMin(T&a,const T&b){
if(a <= b) return false;
a = b; return true;
}
template<class T, size_t N, class U>
void Fill(T (&a)[N], const U&v){
fill((U*)a,(U*)(a+N),v);
}
template<class T>
istream& operator >> (istream&is, vector<T>&v){
for(auto&e:v)is >> e;
return is;
}
int main(){
int n,m;cin >> n >> m;
vector<string> a(n); cin >> a;
vector<string> b(m); cin >> b;
for(int i = 0; i < n-m+1; ++i){
for(int j = 0; j < n-m+1; ++j){
bool f = true;
for(int k = 0; k < m; ++k){
for(int l = 0; l < m; ++l){
f &= a[i+k][j+l] == b[k][l];
}
}
if(f)break;
}
}
cout << (f?"Yes":"No") << endl;
}
| a.cc: In function 'int main()':
a.cc:54:12: error: 'f' was not declared in this scope
54 | cout << (f?"Yes":"No") << endl;
| ^
|
s507324511 | p03804 | C++ | #include <bits/stdc++.h>
#define endl '\n'
#define fast_in ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define mp make_pair
#define pb push_back
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define bit(x) __builtin_popcountll(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair <int,int> pii;
const int inf = (int) 1e9+99999, mod = (int)1e9+7;
const ll linf = (ll) 2e18+99999;
int mul (int x, int y) { return ((ll)x * y) % mod; }
int sub (int x, int y) { x -= y; if (x < 0) return x + mod; return x; }
int add (int x, int y) { x += y; if (x >= mod) return x - mod; return x; }
const int maxn = (int) 3e5;
void solve () {
int n, m; cin >> n >> m;
for (int i = 1; i <= n; i ++) {
for (int j = 1; j <= n; j ++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= n; i ++) {
for (int j = 1; j <= n; j ++) {
cin >> b[i][j];
}
}
for (int i = 1; i <= n; i ++) {
for (int j = 1; j <= n; j ++) {
bool ok = true;
for (int x = 1; x <= m; x ++) {
for (int y = 1; y <= m; y ++) {
if (a[i + x - 1][j + y - 1] != b[x][y]) {
ok = false;
break;
}
}
}
if (ok) {
cout << "Yes";
return;
}
}
}
cout << "No";
}
main () { fast_in;
int t = 1; //cin >> t;
while (t --) {
solve ();
}
return 0;
} | a.cc: In function 'void solve()':
a.cc:27:32: error: 'a' was not declared in this scope
27 | cin >> a[i][j];
| ^
a.cc:32:32: error: 'b' was not declared in this scope
32 | cin >> b[i][j];
| ^
a.cc:41:45: error: 'a' was not declared in this scope
41 | if (a[i + x - 1][j + y - 1] != b[x][y]) {
| ^
a.cc:41:72: error: 'b' was not declared in this scope
41 | if (a[i + x - 1][j + y - 1] != b[x][y]) {
| ^
a.cc: At global scope:
a.cc:56:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
56 | main () { fast_in;
| ^~~~
|
s734637608 | p03804 | Java | package _200;
import java.util.Scanner;
public class B_TempleteMatching {
//public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int M = sc.nextInt();
String[] A = new String[N];
String[] B = new String[M];
for(int i = 0; i < N; i++) {
A[i] = sc.next();
}
for(int i = 0; i < M; i++) {
B[i] = sc.next();
}
String result = Serch(N,M,A,B);
System.out.println(result);
}
private static String Serch(int N,int M,String[] A,String[] B) {
int count = 0;
for(int i = 0; i <= N-M; i++) {
for(int j = 0; j <= N-M; j++) {
for(int k = 0; k < M; k++) {
if(A[i+k].substring(j,j+M).equals(B[k].substring(0))) {
count++;
}else {
count = 0;
break;
}
if(count == M) {
return "Yes";
}
}
}
}
return "No";
}
}
| Main.java:5: error: class B_TempleteMatching is public, should be declared in a file named B_TempleteMatching.java
public class B_TempleteMatching {
^
1 error
|
s924558918 | p03804 | Java | import java.util.Scanner;
piblic class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int M = sc.nextInt();
String[] A = new String[N];
String[] B = new String[M];
for(int i = 0; i < N; i++) {
A[i] = sc.next();
}
for(int i = 0; i < M; i++) {
B[i] = sc.next();
}
int count = 0;
for(int i = 0; i < N-M+1; i++) {
for(int j = 0; j < N-M+1; j++) {
if(A[i].substring(j,j+M).equals(B[0].substring(0))) {
for(int k = 1; k < M; k++) {
if(A[i+k].substring(j,j+M).equals(B[k].substring(0))) {
count++;
}else {
count = 0;
break;
}
}
}
}
}
if(count == 0) {
System.out.println("No");
}else {
System.out.println("Yes");
}
}
}
| Main.java:2: error: class, interface, enum, or record expected
piblic class Main {
^
1 error
|
s798644732 | p03804 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int n, m;
cin >> n >> m;
vector<string> a(n), b(m);
rep(i,n) cin >> a.at(i);
rep(i,m) cin >> b.at(i);
for(int i = 0; i <= n-m; i++) {
int pos = a.at(i).find(b.at(0));
while(pos != string::npos && pos > 0) {
for(int j = 1; j < m; j++) {
string asub = a.at(i+j).substr(pos, b.at(j).size());
if(asub != b.at(j)) {
pos = a.at(i).find(b.at(0), pos;
continue;
}
}
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:19:52: error: expected ')' before ';' token
19 | pos = a.at(i).find(b.at(0), pos;
| ~ ^
| )
|
s902475799 | p03804 | C++ | v#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
char A[N][N], B[M][M];
for (int i=0; i<N; i++){
for (int j=0; j<N; j++){
cin >> A[i][j];
}
}
for (int i=0; i<M; i++){
for (int j=0; j<M; j++){
cin >> B[i][j];
}
}
for (int i=0; i<N-M+1; i++){
for (int j=0; j<N-M+1; j++){
bool found=true;
for (int k=0; k<M; k++){
for (int l=0; l<M; l++){
if (A[i+k][j+l]!=B[k][l]){
found=false;
}
}
}
if (found){
cout << "Yes" << endl;
return 0;
}
}
}
cout << "No" << endl;
return 0;
} | a.cc:1:2: error: stray '#' in program
1 | v#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
6 | cin >> N >> M;
| ^~~
a.cc:29:21: error: 'cout' was not declared in this scope
29 | cout << "Yes" << endl;
| ^~~~
a.cc:29:38: error: 'endl' was not declared in this scope
29 | cout << "Yes" << endl;
| ^~~~
a.cc:34:9: error: 'cout' was not declared in this scope
34 | cout << "No" << endl;
| ^~~~
a.cc:34:25: error: 'endl' was not declared in this scope
34 | cout << "No" << endl;
| ^~~~
|
s701312398 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
char A[N][N], B[M][M];
for (int i=0; i<N; i++){
for (int j=0; j<N; j++){
cin >> A[i][j];
}
}
for (int i=0; i<M; i++){
for (int j=0; j<M; j++){
cin >> B[i][j];
}
}
for (int i=0; i<N-M+1; i++){
for (int j=0; j<N-M+1; j++){
bool found=true;
for (int k=0; k<M; k++){
for (int l=0; l<M; l++){
if (A[i+k][j+l]!=B[k][l]){
found=false;
}
}
}
}
}
if (found) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:30:13: error: 'found' was not declared in this scope; did you mean 'round'?
30 | if (found) cout << "Yes" << endl;
| ^~~~~
| round
|
s752939112 | p03804 | C++ | #include<bits/stdc++.h>
int main(void){
int N,M;
cin >> N >> M;
const int nmmax=50;
char A[nmmax][nmmax],B[nmmax][nmmax];
for(int y=0;y<N;++y){
for(int x=0;x<N;++x){
cin >> A[y][x];
}
}
for(int y=0;y<M;++y){
for(int x=0;x<M;++x){
cin >> B[y][x];
}
}
bool exist=false;
for(int ly=0;ly<N;++ly){
for(int lx=0;lx<N;++lx){
if(ly+M-1>=N or lx+M-1>=N) continue;
bool match=true;
for(int y=0;y<M;++y){
for(int x=0;x<M;++x){
if(A[ly+y][lx+x]!=B[y][x]) match=false;
}
}
if(match) exist=true;
}
}
if(exist)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> N >> M;
| ^~~
| 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:40:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
40 | cout << "Yes" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:40:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
40 | cout << "Yes" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:42:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
42 | cout << "No" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:42:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
42 | cout << "No" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s378925310 | p03804 | C++ | 4 1
....
....
....
....
# | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4 1
| ^
|
s159702283 | p03804 | C++ | #define _USE_MATH_DEFINES
#include <stdio.h>
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
int main(void) {
int N, M;
cin >> N >> M;
const int nmmax = 50;
char A[nmmax][nmmax], B[nmmax][nmmax];
for (int y = 0; y < N; ++y) {
for (int x = 0; x < N; ++x) {
cin >> A[y][x];
}
}
for (int y = 0; y < M; ++y) {
for (int x = 0; x < M; ++x) {
cin >> B[y][x];
}
}
bool exist = false;
for (int ly = 0; ly < N; ++ly) {
for (int lx = 0; lx < N; ++lx) {
if (ly + M - 1 >= N or lx + M - 1 >= N) continue;
bool match = true;
for (int y = 0; y < M; ++y) {
for (int x = 0; x < M; ++x) {
if (A[ly + y][lx + x] != B[y][x]) match = false;
}
}
if (match) exist = true;
}
}
if (exist)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
14 | cin >> N >> M;
| ^~~
| std::cin
In file included from a.cc:3:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:49:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
49 | cout << "Yes" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:49:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
49 | cout << "Yes" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:51:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
51 | cout << "No" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:51:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
51 | cout << "No" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s235298006 | p03804 | C | #include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(){
char a[50][51],b[50][51];
int n,m,i,j,k,l,o;
scanf("%d%d",&n,&m);
for(i=0;i<n;i++)scanf("%s",a[i]);
for(i=0;i<m;i++)scanf("%s",b[i]);
for(i=0;i<=n-m;i++)for(j=0;j<=n-m;j++){
o=1;
for(k=0;k<m;k++)for(l=0;l<m;l++)if([i+k][j+l]!=b[k][l])o=0;
if(o){printf("Yes");return 0;}
}
printf("No");
}
| main.c: In function 'main':
main.c:12:40: error: expected expression before '[' token
12 | for(k=0;k<m;k++)for(l=0;l<m;l++)if([i+k][j+l]!=b[k][l])o=0;
| ^
|
s513477940 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
string A[N], B[M];
for (int i = 0; i < N; i++) {
cin >> A[i];
}
for (int i = 0; i < M; i++) {
cin >> B[i];
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
bool valid = true;
for (int k = 0; k < M; k++) {
for (int l = 0; l < M; l++) {
if (A[i+k][j+l] != B[k][l]) {
valid = false;
}
}
}
if (valid) {
cout << "Yes";
return 0;
}
}
}
cout << "No"
} | a.cc: In function 'int main()':
a.cc:29:15: error: expected ';' before '}' token
29 | cout << "No"
| ^
| ;
30 | }
| ~
|
s506048441 | p03804 | C++ | #include<bits/stdc++.h>
using namespace std;
int main () {
int N, M;
cin >> N >> M;
char mat[55][55];
char mbt[55][55];
for (int i = 0; i < N; i ++) {
for (int j = 0; j < N; j ++) {
cin << mat[i][j];
}
}
for (int i = 0; i < M; i ++) {
for (int j = 0; j < M; j ++) {
cin >> mbt[i][j];
}
}
for (int i = 0; i <= N - M; i ++) {
for (int j = 0; j <= N - M; j ++) {
bool ok = true;
for (int p = 0; p < M; p ++) {
for (int q = 0; q < M; q ++) {
if (mat[i + p][j + q] != mbt[p][q]) ok = false;
}
}
if (ok) {
cout << "Yes" << endl;
return 0;
}
}
}
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:10:11: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char')
10 | cin << mat[i][j];
| ~~~ ^~ ~~~~~~~~~
| | |
| | char
| std::istream {aka std::basic_istream<char>}
a.cc:10:11: note: candidate: 'operator<<(int, int)' (built-in)
10 | cin << mat[i][j];
| ~~~~^~~~~~~~~~~~
a.cc:10:11: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:10:7: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
10 | cin << mat[i][j];
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
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/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
10 | cin << mat[i][j];
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
10 | cin << mat[i][j];
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
10 | cin << mat[i][j];
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:10:22: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
10 | cin << mat[i][j];
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c |
s868190002 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin >> n >> m;
vector<string>data_a(n);
vector<string>data_b(m);
for(int i=0;i<n;i++){
cin >> data_a.at(i);
}
for(int i=0;i<m;i++){
cin >> data_b.at(i);
}
bool exist=false;
for(int li=0;li<n;li++){
for(int lj=0;lj<n;lj++){
if(li+m-1>=n||lj+m-1>=n){
continue;
}
bool judge=true;
for(int i=0;i<m;i++){
for(int j=0;j<m;j++){
if(data_a.at(li+i).at(lj+j)!=data_b.at(i).at(j)){
judge=false;
}
if(judge){
exist=true
}
}
}
}
}
if(exist){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:28:23: error: expected ';' before '}' token
28 | exist=true
| ^
| ;
29 | }
| ~
|
s352177258 | p03804 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
vector<string> data;
string name;
vector save;
int a,b;
cin>>a>>b;
for(int i=0;i<a;i++){
cin>>name;
data.push_back(name);
}
for(int i=0;i<b;i++){
cin>>name;
if(i==0){
for(int j=0;j<data.size();j++){
if(data[j].find(name)!=npos){
save.push_back(j);
}
}
}
if(i!=0){
for(int j=0;j<save.size();j++){
if(data[save[j]+1].find(name)!=npos){
save.push_back(j);
}
else{
save.erase(save.begin()+j);
}
}
}
}
if(save.size()!=0){
cout<<"Yes"<<endl;
}
else{
cout<<"No";
}
} | a.cc: In function 'int main()':
a.cc:9:10: error: class template argument deduction failed:
9 | vector save;
| ^~~~
a.cc:9:10: error: no matching function for call to 'vector()'
In file included from /usr/include/c++/14/vector:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _Tp, class _Alloc, class _InputIterator, class> vector(_InputIterator, _InputIterator, const _Alloc&)-> std::vector<_Tp, _Alloc>'
707 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::initializer_list<_Tp>, const _Alloc&)-> std::vector<_Tp, _Alloc>'
678 | vector(initializer_list<value_type> __l,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&)-> std::vector<_Tp, _Alloc>'
659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const _Alloc&, std::false_type)-> std::vector<_Tp, _Alloc>'
640 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&, const _Alloc&, std::true_type)-> std::vector<_Tp, _Alloc>'
635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&)-> std::vector<_Tp, _Alloc>'
624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>&&)-> std::vector<_Tp, _Alloc>'
620 | vector(vector&&) noexcept = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const std::vector<_Tp, _Alloc>&)-> std::vector<_Tp, _Alloc>'
601 | vector(const vector& __x)
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::size_t, const _Tp&, const _Alloc&)-> std::vector<_Tp, _Alloc>'
569 | vector(size_type __n, const value_type& __value,
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'template<class _Tp, class _Alloc> vector(std::size_t, const _Alloc&)-> std::vector<_Tp, _Alloc>'
556 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'template<class _Tp, class _Alloc> vector(const _Alloc&)-> std::vector<_Tp, _Alloc>'
542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'template<class _Tp, class _Alloc> vector()-> std::vector<_Tp, _Alloc>'
531 | vector() = default;
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:531:7: note: template argument deduction/substitution failed:
a.cc:9:10: note: couldn't deduce template parameter '_Tp'
9 | vector save;
| ^~~~
/usr/include/c++/14/bits/stl_vector.h:428:11: note: candidate: 'template<class _Tp, class _Alloc> vector(std::vector<_Tp, _Alloc>)-> std::vector<_Tp, _Alloc>'
428 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:428:11: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:2033:5: note: candidate: 'template<class _InputIterator, class _ValT, class _Allocator, class, class> std::vector(_InputIterator, _InputIterator, _Allocator)-> vector<_ValT, _Allocator>'
2033 | vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
| ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:2033:5: note: candidate expects 2 arguments, 0 provided
a.cc:20:32: error: 'npos' was not declared in this scope
20 | if(data[j].find(name)!=npos){
| ^~~~
a.cc:27:40: error: 'npos' was not declared in this scope
27 | if(data[save[j]+1].find(name)!=npos){
| ^~~~
|
s082665513 | p03804 | C++ | #include <bits/stdc++.h>
#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;
using ll = long long;
using P = pair<int, int>;
const double PI=acos(-1);
const int INF = numeric_limits<int>::max();
int main(){
int n, m;
cin >> n >> m;
vector<string> a[n];
rep(i,n) cin >> a[i];
vector<string> b[n];
rep(i,m) cin >> b[i];
rep(i,n-m+1){
rep(j,n-m+1){
rep(k,m){
string sub = a[i+k].substr(j,m);
if(sub != b[k]) break;
if(k == m-1){
cout << "Yes" << endl;
return 0;
}
}
}
}
cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:18: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
15 | rep(i,n) cin >> a[i];
| ~~~ ^~ ~~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
| 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>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Tr |
s444100701 | p03804 | C++ | #include <bits/stdc++.h>
#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;
using ll = long long;
using P = pair<int, int>;
const double PI=acos(-1);
const int INF = numeric_limits<int>::max();
int main(){
int n, m;
cin >> n >> m;
vector<string> a[n];
rep(i,n) cin >> a[i];
vector<string> b[n];
rep(i,m) cin >> b[i];
rep(i,n-m){
rep(j,n-m){
int I = i;
while(I < i + m){
if(a[I].substr(j,m) != b[I-i]) break;
I++;
if(I == m+i){
cout << "Yes" << endl;
return 0;
}
}
}
}
cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:18: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
15 | rep(i,n) cin >> a[i];
| ~~~ ^~ ~~~~
| | |
| | std::vector<std::__cxx11::basic_string<char> >
| 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>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Tr |
s033090970 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
char A[N][N], B[M][M];
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < M; i++) {
for (int j = 0; j < M; j++) {
cin >> B[i][j];
}
}
for (int i = 0; i < N-M; i++) {
for (int j = 0; j < N-M; j++) {
bool cond = true;
for (int k = 0; k < M; k++) {
for (int l = 0; l < M; l++) {
if (B[k][l] != A[i+k][j+l]) {
cond = false
}
}
}
if (cond) {
cout << "Yes" << endl;
return 0;
}
}
}
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:27:25: error: expected ';' before '}' token
27 | cond = false
| ^
| ;
28 | }
| ~
a.cc: At global scope:
a.cc:44:1: error: expected declaration before '}' token
44 | }
| ^
|
s385959391 | p03804 | C++ | #include <bits/stc++.h>
using namespace std;
int main() {
int N, M;
char A[N][N], B[M][M];
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cin >> A[i][j];
}
}
for (int i = 0; i < M; i++) {
for (int j = 0; j < M; j++) {
cin >> B[i][j];
}
}
for (int i = 0; i < N-M; i++) {
for (int j = 0; j < N-M; j++) {
bool cond = true;
for (int k = 0; k < M; k++) {
for (int l = 0; l < M; l++) {
if (B[k][l] != A[i+k][j+l]) {
cond = false
}
}
}
if (cond) {
cout << "Yes" << endl;
return 0;
}
}
}
cout << "No" << endl;
}
} | a.cc:1:10: fatal error: bits/stc++.h: No such file or directory
1 | #include <bits/stc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s536094882 | p03804 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
const string YES = "Yes";
const string NO = "No";
void solve(int N, int M, vector<string> A, vector<string> B) {
bool include = false;
rep(i, N - M + 1) {
// find left top
const int offset = A[i].find(B[0]);
if (offset == string::npos || offset > N - M)
continue;
// check all row
bool match = true;
rep(j, M)
if (A[i + j].substr(offset, M) != B[j]) {
match = false;
break;
}
if (!match)
continue;
// all row is equal !!
include = true;
break;
}
}
cout << (include ? YES : NO) << endl;
}
int main(){
// int 3E4 long 2E9 ll 9E18
cin.tie(0);
ios::sync_with_stdio(false);
int N, M;
cin >> N >> M;
vector<string> A(N);
for(int i = 0 ; i < N ; i++)
cin >> A[i];
vector<string> B(M);
for(int i = 0 ; i < M ; i++)
cin >> B[i];
solve(N, M, move(A), move(B));
return 0;
}
| a.cc:29:3: error: 'cout' does not name a type
29 | cout << (include ? YES : NO) << endl;
| ^~~~
a.cc:30:1: error: expected declaration before '}' token
30 | }
| ^
|
s645597064 | p03804 | C++ | #include <iostream>
#include <string>
#include <vector>
// TLEの場合はbit shiftに変える
using namespace std;
int N, M;
bool is_same(vector <string>A, vector <string>B, int strow, int stcol)
{
if ((strow+M) > N) return false;
if ((stcol+M) > N) return false;
for (int Brow = 0; Brow < M; Brow++) {
for (int Bcol = 0; Bcol < N; Bcol++) {
if ((B[Brow][Bcol])!=(A[Brow+strow][Bcol+stcol])) {
return false;
}
}
}
return true;
}
int main()
{
cin >> N >> M;
vector <string> A(N);
vector <string> B(M);
for (int i = 0; i < N; i++) cin >> A[i];
for (int i = 0; i < M; i++) cin >> B[i];
bool ans = false;
for (int row = 0; row < N-M+1; row++) {
for (int col = 0; col < N-M+1; col++) {
if (is_same(A, B, row, col)) {
cout << "Yes" << endl;
return 0;
}
}
}
cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:31:11: error: reference to 'is_same' is ambiguous
31 | if (is_same(A, B, row, col)) {
| ^~~~~~~
In file included from /usr/include/c++/14/bits/move.h:37,
from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/type_traits:780:12: note: candidates are: 'template<class, class> struct std::is_same'
780 | struct is_same;
| ^~~~~~~
a.cc:7:6: note: 'bool is_same(std::vector<std::__cxx11::basic_string<char> >, std::vector<std::__cxx11::basic_string<char> >, int, int)'
7 | bool is_same(vector <string>A, vector <string>B, int strow, int stcol)
| ^~~~~~~
|
s150812508 | p03804 | C++ | #include <iostream>
#include <string>
#include <vector>
// TLEの場合はbit shiftに変える
using namespace std;
int N, M;
bool is_same(vector <string>A, vector <string>B, int strow, int stcol)
{
if ((strow+M) > N) return false;
if ((stcol+M) > N) return false;
for (int Brow = 0; Brow < M; Brow++) {
for (int Bcol = 0; Bcol < N; Bcol++) {
if ((B[Brow][Bcol])!=(A[Brow+strow][Bcol+stcol])) {
return false;
}
}
}
return true;
}
int main()
{
cin >> N >> M;
vector <string> A(N), B(M);
for (int i = 0; i < N; i++) cin >> A[i];
for (int i = 0; i < M; i++) cin >> B[i];
bool ans = false;
for (int row = 0; row < N-M+1; row++) {
for (int col = 0; col < N-M+1; col++) {
if (is_same(A, B, row ,col)) {
cout << "Yes" << endl;
return 0;
}
}
}
cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:30:11: error: reference to 'is_same' is ambiguous
30 | if (is_same(A, B, row ,col)) {
| ^~~~~~~
In file included from /usr/include/c++/14/bits/move.h:37,
from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr/include/c++/14/exception:166,
from /usr/include/c++/14/ios:41,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/type_traits:780:12: note: candidates are: 'template<class, class> struct std::is_same'
780 | struct is_same;
| ^~~~~~~
a.cc:7:6: note: 'bool is_same(std::vector<std::__cxx11::basic_string<char> >, std::vector<std::__cxx11::basic_string<char> >, int, int)'
7 | bool is_same(vector <string>A, vector <string>B, int strow, int stcol)
| ^~~~~~~
|
s327142754 | p03804 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
int main(){
ll n,m;
cin>>n>>m;
vector<string> a(n),b(m);
rep(i,n) cin>>a[i];
rep(i,m) cin>>b[i];
for(ll i=0;i+m<=n;i++){
for(ll j=0;j+m<=n;j++){
bool flag=0;
rep(k,m){
rep(l,m){
if(b[k][l]!=a[i+k][j+l]){
flag=1;
break;
}
}
if(flag) break;
}
if(!flag){
cout<<"Yes"<<endl;
return;
}
}
}
cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:29:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
29 | return;
| ^~~~~~
|
s363476098 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
cin>>N>>M;
vector<string> A(N);
vector<string> B(M);
for(int i=0;i<N;i++){
cin>>A.at(i);
}
for(int i=0;i<M;i++){
cin>>B.at(i);
}
for(int y=0;y<=N-M;y++){
for(int x=0;x<=N-M;c++){
int count=0;
for(int by=0;by<M;by++){
if(B.at(by)==A.at(by+y).substr(x,M)){
count++;
}
}
if(count==M){
cout<<"Yes"<<endl;
return 0;
}
}
}
cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:24: error: 'c' was not declared in this scope
15 | for(int x=0;x<=N-M;c++){
| ^
|
s906008224 | p03804 | C++ | #include <bits/stdc++.h>
#include <boost/algorithm/cxx11/all_of.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm/equal.hpp>
#include <boost/range/combine.hpp>
#include <boost/range/irange.hpp>
using namespace std;
using namespace boost;
using namespace boost::adaptors;
using namespace boost::algorithm;
main() {
int64_t n, m;
cin >> n >> m;
vector<string> a(n), b(m);
for (auto&& aa : a) {
cin >> aa;
}
for (auto&& bb : b) {
cin >> bb;
}
for (auto si : irange(0L, n - m + 1)) {
for (auto sj : irange(0L, n - m + 1)) {
auto ok = all_of(combine(a | sliced(si, si + m), b), [&](const auto& ab) {
return equal(get<0>(ab) | sliced(sj, sj + m), get<1>(ab));
});
if (ok) {
cout << "Yes" << endl;
return 0;
}
}
}
cout << "No" << endl;
} | a.cc:3:10: fatal error: boost/algorithm/cxx11/all_of.hpp: No such file or directory
3 | #include <boost/algorithm/cxx11/all_of.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.