submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s018919825 | 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];
string tmp;
for(int i=0;i+m<=n;i++){
}
| a.cc: In function 'int main()':
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s293600738 | p03804 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <algorithm>
#include <numeric>
#include <math.h>
using namespace std;
#define N_MAX (100000)
#define LL_MAX_NUM (1LL<<60)
typedef long long ll;
typedef long long int lli;
int main() {
int N, M;
cin >> N >> M;
string Ai[N]... | a.cc: In function 'int main()':
a.cc:36:19: error: expected '}' before 'else'
36 | } else if (M == 1 && N == 1 && Ai[j].find(Bi[i]) >= 0 && Ai[j].find(Bi[i]) <= N-1)
| ^~~~
a.cc:30:87: note: to match this '{'
30 | if (M > 1 && N > 1 && Ai[j].find(Bi[i]) >= 0 && ... |
s460502056 | p03804 | C++ | #include<iostream>
using namespace std;
const int maxn=100;
int main(){
char a[maxn][maxn],b[maxn][maxn];
int m,n,;
cin>>m>>n;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
cin>>a[i];
}
}
for(int i=0;i<m;i++){
for(int j=0;j<m;j++){
cin>>b[i];
}
}
bool flag=false;
for(int i=0;i<n-m+1;i++){
for(... | a.cc: In function 'int main()':
a.cc:6:17: error: expected unqualified-id before ';' token
6 | int m,n,;
| ^
a.cc:26:56: error: 'x' was not declared in this scope
26 | if(a[i+x][j+y]!=b[x][y]){
| ... |
s846893815 | p03804 | C | #include<stdio.h>
#include<string.h>
int main(){
int N, M, i, j , k , l, flag;
char A[50][51], B[50][51];
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 <= M - N; i++){
for (j = 0; j <= M - N; j++){
... | main.c: In function 'main':
main.c:22:21: error: expected ';' before ':' token
22 | flag = 0:
| ^
| ;
|
s267661313 | p03804 | C | #include<stdio.h>
#include<string.h>
int main(){
int N, M, i, j , k , l;
char A[50][51], B[50][51];
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 <= M - N; i++){
for (j = 0; j <= M - N; j++){
for... | main.c: In function 'main':
main.c:20:11: error: 'flag' undeclared (first use in this function)
20 | flag = 1;
| ^~~~
main.c:20:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:21: error: expected ';' before ':' token
22 | f... |
s714972517 | p03804 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(Systee.in);
int N = sc.nextInt();
int M = sc.nextInt();
A = new char[N][N];
for (int i = 0; i < N; i++)
A[i] = sc.next().toCharArray();
B = new char[M][M];... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(Systee.in);
^
symbol: variable Systee
location: class Main
Main.java:9: error: cannot find symbol
A = new char[N][N];
^
symbol: variable A
location: class Main
Main.java:11: error: cannot... |
s345005587 | p03804 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <cstring>
using namespace std;
int main(){
int N,M,a=0;
cin >> N >> M;
vector<string> str1(N+M);
for(int i=0;i<N+M;i++){
cin >> str1.at(i);
}
for(int i=0;i<N;i++){
if(a==1)break;
for(int j=N;j<N+M;j++){
... | a.cc: In function 'int main()':
a.cc:18:21: error: no matching function for call to 'strstr(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&, __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_strin... |
s270230005 | p03804 | C | #include<stdio.h>
int N, M, L, i, j, x, y;
short flag;
char A[51][51], B[51][51];
int main(){
scanf("%d %d\n", &N, &M);
for(i=0; i<N; i++){
scanf("%s\n", A[i]);
}
for(i=0; i<M; i++){
scanf("%s\n", B[i]);
}
L=N-M;
for(i=0; i<L; i++){
for(i=0; i<L; i++){
flag=1;
for(x=0; x<M; x++){... | main.c: In function 'main':
main.c:19:17: error: subscripted value is neither array nor pointer nor vector
19 | if(M[x][y] != N[i+x][j+y]){
| ^
main.c:19:28: error: subscripted value is neither array nor pointer nor vector
19 | if(M[x][y] != N[i+x][j+y]){
| ... |
s511949244 | p03804 | C++ | #include <iostream>
using namespace std
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... | a.cc:2:20: error: expected ';' before 'int'
2 | using namespace std
| ^
| ;
3 | int main(void){
| ~~~
|
s725815136 | p03804 | C++ | 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;
... | a.cc: In function 'int main()':
a.cc:2:18: error: 'cin' was not declared in this scope
2 | int N,M; cin>>N>>M;
| ^~~
a.cc:28:9: error: 'cout' was not declared in this scope
28 | cout << "Yes" << endl;
| ^~~~
a.cc:28:26: error: 'endl' was not declared in this s... |
s494144998 | p03804 | C++ | int main(void){
int N,M;
cin >> N >> M;
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);
bool is_exist = false;
for (int i=0; i<N-M+1; i++) {
for (int j=0; j<N-M+1; j++) {
if (A.at(i).at(j) != B.at(0).at(0)) continue;
else {
... | a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> N >> M;
| ^~~
a.cc:4:3: error: 'vector' was not declared in this scope
4 | vector<string> A(N), B(M);
| ^~~~~~
a.cc:4:10: error: 'string' was not declared in this scope
4 | vector<string> A... |
s088658055 | p03804 | C++ | n, m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
mon = ([row[j:j+m] for row in a[i:i+m]]
for i in range(n-m+1) for j in range(n-m+1))
print('Yes' if any(c == b for c in mon) else 'No') | a.cc:6:7: warning: multi-character character constant [-Wmultichar]
6 | print('Yes' if any(c == b for c in mon) else 'No')
| ^~~~~
a.cc:6:46: warning: multi-character character constant [-Wmultichar]
6 | print('Yes' if any(c == b for c in mon) else 'No')
| ... |
s305250283 | p03804 | C++ | #include<bits/stdc++.h>
using namespace std;
char a[51][51],b[51][51];
int main(){
int n,m,i;
cin>>n>>m;
getchar();
for(i=1;i<=n;i++){
gets(a[i]);
}
for(i=1;i<=m;i++){
gets(b[i]);
}
for(i=0;i+m-1<n;i++){
for(int j=0;j+m-1<n;j++){
bool flag=true;
for(int k=0;k<n;k++){
for(int l=0;l<n;l++){
... | a.cc: In function 'int main()':
a.cc:9:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(a[i]);
| ^~~~
| getw
a.cc:12:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(b[i]);
... |
s513621016 | p03804 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int a[101][101],b[101][101];
bool tmp[101][101];
int main()
{
int i,j,k,p,x,y;
bool tmp;
cin>>x>>y;
for(i=1;i<=x;i++)
{
for(j=1;j<=x;j++)
{
cin>>a[i][j];
}
}
for(i=1;i<=y;i++)
{
for(j=1;j<=y;j++)
{
... | a.cc: In function 'int main()':
a.cc:38:60: error: invalid types 'bool[int]' for array subscript
38 | tmp[k][p]=false;
| ^
a.cc:50:31: error: invalid types 'bool[int]' for array subscript
50 | ... |
s676164520 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
char c[a][a];
char d[b][b];
for(int i=0;i<a;i++){
for(int j=0;j<a;j++){
cin>>c[i][j];
}
}
for(int i=0;i<b;i++){
for(int j=0;j<b;j++){
cin>>d[i][j];
}
}
bool f=false;
int e;
for(int i=0;i<a-b+1... | a.cc: In function 'int main()':
a.cc:20:22: error: expected ';' before ')' token
20 | for(int i=0;i<a-b+1){
| ^
| ;
a.cc:21:24: error: expected ';' before ')' token
21 | for(int j=0;j<a-b+1){
| ^
| ... |
s495278533 | p03804 | C++ | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
// hamko utils
#define rep(i,n) for(long long i = 0; i < (long long)(n); i++)
#define repi(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
... | a.cc:74:3: error: expected unqualified-id before 'if'
74 | if(ans) cout << "Yes" << endl;
| ^~
a.cc:75:3: error: expected unqualified-id before 'else'
75 | else cout << "No" << endl;
| ^~~~
a.cc:76:3: error: expected unqualified-id before 'return'
76 | return 0;
| ^~~~~~
a.cc:77:1... |
s880691546 | p03804 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char a[50][50];
char b[50][50];
int n,m;
cin >> n >> 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];
... | a.cc: In function 'int main()':
a.cc:10:28: error: expected ';' before ')' token
10 | for(int j=0;j<n,j++){
| ^
| ;
a.cc:15:28: error: expected ';' before ')' token
15 | for(int j=0;j<m,j++){
| ^
... |
s654000127 | p03804 | C++ | #include <iostream>
#include <string>
int main() {
int N, M;
std::cin >> N >> M;
std::string A[N], B[M];
for (int i = 0; i < N; ++i) {
std::cin >> A[i];
}
for (int i = 0; i < M; ++i) {
std::cin >> B[i];
}
bool exist = false;
for (int i = 0; i < N; ++i) {
for (int j = 0; j < N; ++j) {
... | a.cc: In function 'int main()':
a.cc:18:25: error: expected primary-expression before '||' token
18 | if ( j + M - 1 >= || i + M - 1 ) continue;
| ^~
a.cc:22:60: error: expected ';' before '}' token
22 | if ( A[i + ii][j + jj] != B[i][j] ) match = false
| ... |
s362726738 | p03804 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<functional>
#include<utility>
#include<stack>
#include<queue>
#include<cmath>
#include<list>
#include<cstdint>
#include<vector>
#include<map>
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i,rept) for(ll i = 0; i<rept;i++)
typedef ... | a.cc: In function 'int main()':
a.cc:76:2: error: expected '}' at end of input
76 | }
| ^
a.cc:43:12: note: to match this '{'
43 | int main() {
| ^
|
s065026835 | p03804 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
bool c=true;
char x[a][a],y[b][b];
for(int i=0;i<a;i++){
for(int j=0;j<a;j++)cin>>x[i][j];
}
for(int i=0;i<b;i++){
for(int j=0;j<b;j++)cin>>y[i][j];
}
for(int i=0;i<=a-b;i++){
for(int... | a.cc: In function 'int main()':
a.cc:19:25: error: invalid types 'int[int]' for array subscript
19 | if(a[i+k][j+l]!=b[k][l])c=false;
| ^
a.cc:19:38: error: invalid types 'int[int]' for array subscript
19 | if(a[i+k][j+l]!=b[k][l])c=false;
... |
s645654538 | p03804 | C++ | using System;
namespace ABC054B
{
class Program
{
static void Main(string[] args)
{
string[] bufs = Console.ReadLine().Split(' ');
int N = Int32.Parse(bufs[0]);
int M = Int32.Parse(bufs[1]);
string[] A = new string[N];
string[] B = new... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:7:26: error: 'string' has not been declared
7 | static void Main(string[] args)
| ^~~~~~
a.cc:7:35: error: expected ',' or '...' before 'args'
7 | static... |
s129626550 | p03804 | C++ | #include <stdio.h>
#include <math.h>
int main(void){
char a[2500],b[2500];
int i,n,m;
scanf("%d%d",&n,&m);
for(i=0;i<n;i++)
scanf("%c",&a[i]);
for(i=0;i<m;i++)
scanf("%c",&b[i]);
sqrt
} | a.cc: In function 'int main()':
a.cc:11:5: error: expected ';' before '}' token
11 | sqrt
| ^
| ;
......
20 | }
| ~
a.cc:20:1: error: statement cannot resolve address of overloaded function
20 | }
| ^
|
s765315723 | p03804 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
string a[50], b[50];
for (int i = 0; i < n; i++)cin >> a[i];
for (int i = 0; i < m; i++)cin >> b[i];
string ans = "No";
for (int i = 0; i + m <= n; i++) {
ans = "No";
for (int j = 0;j <= n - m;j++) {
for (int... | a.cc: In function 'int main()':
a.cc:22:25: error: break statement not within loop or switch
22 | break;
| ^~~~~
a.cc: At global scope:
a.cc:25:9: error: 'cout' does not name a type
25 | cout << ans << endl;
| ^~~~
a.cc:26:1: error: expec... |
s601471618 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF 1e9
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n,m;
cin>>n>>m;
char c1[60][60],c2[60][60];
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
cin>>c1[i][j];
}
}
for(int i=0;i<m;i++){
... | a.cc: In function 'int main()':
a.cc:35:32: error: expected ';' before 'continue'
35 | f=false
| ^
| ;
36 | continue;
| ~~~~~~~~
|
s661992132 | p03804 | C++ | //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <f... | a.cc:6:23: error: missing terminating > character
6 | #include <set//include
| ^
a.cc:713:12: error: redefinition of 'int toInt(std::string)'
713 | inline int toInt(string s) {
| ^~~~~
a.cc:54:12: note: 'int toInt(std::string)' previously defined here
54 | inline in... |
s301920456 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int n,m;
char a[55][55],b[55][55];
int main(){
cin >> n >> m;
for(int i=0;i<n;i++)for(int j=0;j<n;j++)cin>>a[j][i];
for(int i=0;i<m;i++)for(int j=0;j<n;j++)cin>>b[j][i];
bool exist=false;
for(int dy=0;dy<n;dy++){
for(int dx=0;dx<n;dx++){
if(dx+m-1>=n||dy+m-... | a.cc: In function 'int main()':
a.cc:25:20: error: 'match' was not declared in this scope; did you mean 'rpmatch'?
25 | if(match) exist=true;
| ^~~~~
| rpmatch
|
s728214013 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int n,m,dy;
char a[55][55],b[55][55];
int main(){
cin >> n >> m;
for(int i=0;i<n;i++)for(int j=0;j<n;j++)cin>>a[j][i];
for(int i=0;i<m;i++)for(int j=0;j<n;j++)cin>>b[j][i];
bool exist=false;
for(int dy=0;dy<n;dy++){
for(dx=0;dx<n;dx++){
if(dx+m-1>=n||dy+m-1... | a.cc: In function 'int main()':
a.cc:16:21: error: 'dx' was not declared in this scope; did you mean 'dy'?
16 | for(dx=0;dx<n;dx++){
| ^~
| dy
a.cc:22:44: error: 'dx' was not declared in this scope; did you mean 'x'?
22 | ... |
s835885986 | p03804 | C++ | #include <iostream>
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 y=0; y<N-M+1; y++){
int flag=1;
for(int x=0; x<... | a.cc: In function 'int main()':
a.cc:42:2: error: expected '}' at end of input
42 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s776394708 | p03804 | C++ | #include <iostream>
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 y=0; y<N-M+1; y++){
int flag=0;
for(int x=0; x<... | a.cc: In function 'int main()':
a.cc:31:27: error: expected '}' before 'else'
31 | } else if {
| ^~~~
a.cc:22:45: note: to match this '{'
22 | if(A[y][x]==B[0][0]){
| ^
a.cc:31:35: err... |
s018138778 | p03804 | C++ | #include <iostream>
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 y=0; y<N-M+1; y++){
int flag=0;
for(int x=0; x<... | a.cc: In function 'int main()':
a.cc:32:35: error: expected '(' before '{' token
32 | } else if {
| ^
| (
a.cc:41:2: error: expected '}' at end of input
41 | }
| ^
a.cc:4:11: note: to match this '{'
... |
s572403675 | p03804 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s085323860 | p03804 | C++ | #include <iostream>
using namespace std;
int main(){
int N, M, c;
cin >> N >> M;
int 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++){
c=0;
for(int j=0; j<N-M+1;... | a.cc: In function 'int main()':
a.cc:40:2: error: expected '}' at end of input
40 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s713663276 | p03804 | C++ | import sys
def main():
n, m = map(int, input().split())
A = [list(input()) for _ in range(n)]
B = [list(input()) for _ in range(m)]
for i in range(n - m + 1):
for j in range(n - m + 1):
f = 1
for k in range(m):
for l in range(m):
if A[... | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s717110730 | p03804 | C++ | #include <bits/stdc++.h>
#define INF 114514810
using namespace std;
int main(void){
int n, m;
char a[50], b[50];
cin >> n >> 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++) {
bool flag = true;
for (int j = 0; i... | a.cc: In function 'int main()':
a.cc:20:14: error: 'flag' was not declared in this scope
20 | cout << (flag ? "Yes" : "No") << endl;
| ^~~~
|
s149485258 | p03804 | C++ | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <li... | a.cc: In function 'int main()':
a.cc:47:20: error: 'i' was not declared in this scope
47 | rep(j, m) cin>>t[i];
| ^
|
s468469015 | p03804 | C++ | #include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <iostream>
using namespace std;
int main(){
int N,M;
char A[51],B[51];
scanf("%d %d",&N,&M);
for(int i=1;i<=N;i++){
for(int j=1;j<=N;j++) scanf("%c",&A[i][j]);
}
for(int i=1;i<=M;i++){
for(int j=1;j<=M;j++) scanf("%c... | a.cc: In function 'int main()':
a.cc:12:43: error: invalid types 'char[int]' for array subscript
12 | for(int j=1;j<=N;j++) scanf("%c",&A[i][j]);
| ^
a.cc:15:43: error: invalid types 'char[int]' for array subscript
15 | for(int j=1;j<=M;j++) scanf("%c",&B[i]... |
s290544309 | p03804 | C++ | #include<bits/stdc++.h>
using namespace std;
char a[1200][1200],b[120][120];
int n,m;
int mark=1;
int main() {
cin>>n>>m;
for(int i=0;i<n;i++) {
scanf("%s",a[i]);
}
for(int i=0;i<m;i++) {
scanf("%s",b[i]);
}
for(int i=0;i<n;i++) {
for(int j=0;j<n;j++) {
if(a[i][j]=... | a.cc: In function 'int main()':
a.cc:17:17: error: 'flag' was not declared in this scope
17 | flag=0;
| ^~~~
a.cc:27:17: error: 'flag' was not declared in this scope
27 | if(flag==0) {
| ^~~~
|
s671198665 | p03804 | C++ | #include <iostream>
#include <string>
using namespace std;
int m,n;
string a[100], b[100];
int main(){
cin >> m >> n;
for(int i = 0; i < m; ++i){
cin >> a[i];
}
for(int i = 0; i < n; ++i){
cin >> b[i];
}
bool allok = false;
for(int i = 0; i <= m - n; ++i){
for(int j = 0; j <= m - n; ++j){
bool ok = true;
for(int k = 0;... | a.cc: In function 'int main()':
a.cc:20:50: error: expected ';' before '}' token
20 | if(a[i + k][j + l] != b[k][l]) {ok = false; break}
| ^
| ;
|
s743198071 | p03804 | C++ | #include<string>
#include<vector>
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];
}
bool match = false;
for(int i = 0; i < n - m + 1; i++){
... | a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
7 | cin >> n >> m;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<vector>
+++ |+#include <iostream>
3 | using names... |
s855346342 | p03804 | C++ | 3 2
#.#
.#.
#.#
#.
.# | a.cc:2:2: error: invalid preprocessing directive #.
2 | #.#
| ^
a.cc:3:2: error: stray '#' in program
3 | .#.
| ^
a.cc:4:2: error: invalid preprocessing directive #.
4 | #.#
| ^
a.cc:5:2: error: invalid preprocessing directive #.
5 | #.
| ^
a.cc:6:2: error: stray '#' in progr... |
s307002084 | p03804 | C++ | #include <iostream>
#include <string.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
char** a = new int[n][n];
char** b = new int[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][... | a.cc: In function 'int main()':
a.cc:8:32: error: array size in new-expression must be constant
8 | char** a = new int[n][n];
| ^
a.cc:8:32: error: the value of 'n' is not usable in a constant expression
a.cc:6:13: note: 'int n' is not const
6 | int n, m;
... |
s423754199 | p03804 | C++ | #define rep(i,n) for (int i=0;i<(n);i++)
#include<iostream>
using namespace std;
int main(){
int m,n;
string a[51],b[51];
cin >> n >> m;
rep(i,n) cin >>a[i];
rep(i,m) cin >>b[i];
bool exist = false;
for(int i=0;i<=n-m;i++){
for(int j=0;j<=n-m;j++{
bool match = true;
for(int y=0;y<m;y++){
for(int... | a.cc: In function 'int main()':
a.cc:14:39: error: expected ')' before '{' token
14 | for(int j=0;j<=n-m;j++{
| ~ ^
| )
|
s495958794 | p03804 | C | /*
B - Template Matching
<http://abc054.contest.atcoder.jp/tasks/abc054_b>
*/
#include <stdio.h>
int main(int argc, char const *argv[]) {
int N,M;
int i,j,k,l;
char A[50][51],B[50][51];
int judge;
scanf("%d %d", &N, &M);
for( i=0; i<N; i++ ){
scanf("%s", A[i]);
}
for( i=0; i<M; i++ ){
sc... | main.c:59:5: error: redefinition of 'main'
59 | int main(int argc, char const *argv[]) {
| ^~~~
main.c:8:5: note: previous definition of 'main' with type 'int(int, const char **)'
8 | int main(int argc, char const *argv[]) {
| ^~~~
|
s581233923 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_... | a.cc: In function 'int main()':
a.cc:44:28: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
44 | cout << flg ? "Yes" : "No" << endl;
| ~~~~~^~~~~~~
|
s154037696 | p03804 | C++ | 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;... | a.cc: In function 'int main()':
a.cc:3:2: error: 'cin' was not declared in this scope
3 | cin >> N >> M;
| ^~~
a.cc:38:3: error: 'cout' was not declared in this scope
38 | cout << "Yes" << endl;
| ^~~~
a.cc:38:20: error: 'endl' was not declared in this scope
38 | cout << "Yes" << endl;
... |
s709112513 | p03804 | C++ | 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){
... | a.cc: In function 'int main()':
a.cc:3:2: error: 'cin' was not declared in this scope
3 | cin >> N >> M;
| ^~~
a.cc:38:2: error: 'cout' was not declared in this scope
38 | cout << "Yes" << endl;
| ^~~~
a.cc:38:19: error: 'endl' was not declared in this scope
38 | cout << "Yes" << endl;
... |
s523430023 | p03804 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int N=sc.nextInt(),M=sc.nextInt(),i,j,k,l;
String[] a=new String[N],b=new String[M];
boolean f=true;
for(i=0;i<N;i++){
a[i]=sc.next();
}
for(i=0;i<M;i++){
b[i]=sc.next();
}
for(i=0... | Main.java:32: error: reached end of file while parsing
}
^
1 error
|
s468347229 | p03804 | Java | a | Main.java:1: error: reached end of file while parsing
a
^
1 error
|
s016859017 | p03804 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
class FMT {
public:
// P < 2^31
static constexpr uint32_t N = 1 << 27, W = 137, P = 15 * N + 1;
FMT() : nx_(n_), ny_(1) {
data_.resize(n_);
}
FMT(int nx, int ny) : nx_(nx), ny_(ny) {
i... | a.cc:10:22: error: 'uint32_t' does not name a type
10 | static constexpr uint32_t N = 1 << 27, W = 137, P = 15 * N + 1;
| ^~~~~~~~
a.cc:5:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
4 | #include <algorithm>
+++ |+#... |
s790249855 | p03804 | C++ | #include <iostream>
#include <vector>
int main() {
int n, m;
std::cin >> n >> m;
std::vector<std::string> a(n);
std::vector<std::string> b(m);
for (int i = 0; i <n;) {
std::cin >> a[i];
}
for (int i = 0; i <m;) {
std::cin >> b[i];
}
bool flag;
for (int i = 0; i < n-m+1; i++) { //a's row; n-m+1 = 2
int row... | a.cc: In function 'int main()':
a.cc:38:8: error: 'coud' is not a member of 'std'; did you mean 'cout'?
38 | std::coud << "No" << std::endl;
| ^~~~
| cout
|
s179174623 | p03804 | C++ | #include <iostream>
#include <vector>
int main() {
int n, m;
std::cin >> n >> m;
std::vector<std::string> a[n];
std::vector<std::string> b[m];
for (int i = 0; i <n;) {
std::cin >> a[i];
}
for (int i = 0; i <m;) {
std::cin >> b[i];
}
bool flag;
for (int i = 0; i < n-m+1; i++) { //a's row; n-m+1 = 2
int row... | a.cc: In function 'int main()':
a.cc:9:14: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >')
9 | std::cin >> a[i];
| ~~~~~~~~ ^~ ~~~~
| | |
| | std::vec... |
s812460970 | p03804 | C++ | #include <iostream>
#include <vector>
#include <cstdlib>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N;
int M;
cin >> N >> M;
vector<string> ar;
vector<string> br;
string s;
for(int i = 0; i < N; i++){
cin >> s;
ar.push_back... | a.cc: In function 'int main()':
a.cc:54:5: error: 're' was not declared in this scope
54 | re
| ^~
a.cc:54:7: error: expected '}' at end of input
54 | re
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s121960470 | p03804 | C++ | #include<iostream>
using namespace std;
int main(){
int m,n,f=0;
char a[51][51],b[51][51];
cin>>n>>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;i++)
for(int j=0;j<n;j++)
if(a[i][j]==b[0][0]){
int f1=0;
... | a.cc: In function 'int main()':
a.cc:21:14: error: 'l' was not declared in this scope
21 | if(a[i+l][j+k]==b[l][k])f=1;
| ^
a.cc:21:19: error: 'k' was not declared in this scope
21 | if(a[i+l][j+k]==b[l][k])f=1;
| ^
a.cc: At global scope:
a.cc:25:2: error: ex... |
s474734609 | p03804 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb... | a.cc: In function 'int main()':
a.cc:47:42: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
47 | rep(x,m)rep(y,m)if(a[i+x][j+y]!=b[x][y])h=false;
| ^
a.cc:47:53: error: invalid typ... |
s396497291 | p03804 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int N,M;
vector<string> A,B;
string s;
cin >> N >> M;
for(int i=0;i<N;++i){
cin >> s;
A.push_back(s);
}
for(int i=0;i<M;++i){
cin >> s;
B.push_back(s);
}
for(int i=0;i<N-M;++i){
int pos = A[i].find(B[0]);
bool match = true;
for... | a.cc: In function 'int main()':
a.cc:7:9: error: 'vector' was not declared in this scope
7 | vector<string> A,B;
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
... |
s717771828 | p03804 | C++ | #include<iostream>
using namespace std;
char a[50][50];
char b[50][50];
bool check(int m, int x, int y){
for(int i = 0; i < m; ++i){
for(int i2 = 0; i2 < m; ++i){
if(a[y + i][x + i2] != b[i][i2]){ return false; }
}
}
return true;
}
int main(){
int n, m;
cin >> n >> m;... | a.cc: In function 'int main()':
a.cc:29:26: error: too few arguments to function 'bool check(int, int, int)'
29 | if(check()){ flg = true; break; }
| ~~~~~^~
a.cc:7:6: note: declared here
7 | bool check(int m, int x, int y){
| ^~~~~
|
s938400186 | p03804 | C++ | #include <iostream>
#include <string>
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++){
string s;
cin >> s;
strcpy(A[i], s.c_str());
}
for(int i=0;i<M;i++){
string s;
cin >> s;
strcpy(B... | a.cc: In function 'int main()':
a.cc:14:9: error: 'strcpy' was not declared in this scope
14 | strcpy(A[i], s.c_str());
| ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstri... |
s891300041 | p03804 | C++ | #include <bits/stdc++.h>
#include<fstream>
#define ll long long
#define F first
#define S second
#define mp make_pair
#define mod 1000000007
#define All(v) v.begin(),v.end()
using namespace std;
int main()
{
bool w = 0, b = 0;
int n,m;
cin >> n >> m;
for(int i=0;i<n;i++)
{
string s;
... | a.cc: In function 'int main()':
a.cc:45:13: error: expected ';' before 'return'
45 | cout << '\n'
| ^
| ;
46 |
47 | return 0;
| ~~~~~~
|
s635036033 | p03804 | C | #include<stdio.h>
int main(){
int x,y,N,M;
int a[50][50],b[50][50];
scanf("%d %d\n",&N,&M);
for(x=0;x<N;x++){
for(y=0;y<N;y++){
scanf("%d",&a[x][y]);
}
}
printf("\n");
for(x=0;x<M;x++){
for(y=0;y<M;y++){
scanf("%d",... | main.c: In function 'main':
main.c:49:7: error: expected declaration or statement at end of input
49 | }
| ^
|
s557708250 | p03804 | C | #include <stdio.h>
int main(void)
{
int N, M;
char A[50][50];
char B[50][50];
int i, j;
int s, t;
int f = 0;
int tmp = 1;
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+1; i++) {
for(j = 0; ... | main.c: In function 'main':
main.c:32:13: error: expected declaration or statement at end of input
32 | tmp = 1;
| ^~~
main.c:32:13: error: expected declaration or statement at end of input
main.c:32:13: error: expected declaration or statement at end of input
main.c:32:13: error: expec... |
s193555945 | p03804 | C++ | #include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
int N, M;
vector< vector<bool> > A, B;
int find1(vector<bool> X, vector<bool> Y, int pos)
{
int y = Y.size();
int n = X.size() - y + 1;
for(int i = pos; i < n; i++) {
if(X[i] == Y[i]) ... | /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
|
s687069109 | p03804 | C++ | #include <iostream>
#include <string>
using namespace std;
int N, M;
string board[60];
string pattern[60];
int main() {
cin >> N >> M;
for (int i = 0; i < N; i++) cin >> board[i];
for (int i = 0; i < M; i++) cin >> pattern[i];
bool found = false;
for (int i = 0; i <= N - M; i++) {
for (int j = 0; j <= N - M; j... | a.cc: In function 'int main()':
a.cc:16:29: error: 'match' was not declared in this scope; did you mean 'rpmatch'?
16 | if (match(i, j)) found = true;
| ^~~~~
| rpmatch
|
s430971068 | p03804 | C++ | //Written by Zhu Zeqi
//Come on,baby
//Hack,please
#include<cmath>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<complex>
#include<csetjmp>
#include<csignal>
#inc... | a.cc: In function 'bool check(int, int)':
a.cc:75:23: error: 'm' was not declared in this scope
75 | for(int i=0;i<m;i++) {
| ^
a.cc: In function 'int main()':
a.cc:87:14: error: 'n' was not declared in this scope
87 | cin>>n>>m;
| ^
a.cc:87:17: error... |
s573681632 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n)... | a.cc: In function 'int main()':
a.cc:56:25: error: 'l' was not declared in this scope
56 | if(A[j].substr(i, B[l].length()) == B[0]){
| ^
a.cc:57:18: error: redeclaration of 'int l'
57 | int k = j, l = 0;
| ^
a.cc:56:25: note: '<typeprefixerror>l' pre... |
s954554959 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
string S;
vector<string> s,s2;
cin >> n >> m;
for(int i=0;i<n;i++){
cin >> S;
s.push_back(S);
}
for(int i=0;i<m;i++){
cin >> S;
s2.push_back(S);
}
bool ok... | a.cc: In function 'int main()':
a.cc:24:47: error: 'b' was not declared in this scope
24 | for(int l=0;l<b;l++){
| ^
|
s466703725 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n)... | a.cc: In function 'int main()':
a.cc:63:10: error: expected '}' before 'else'
63 | }else{
| ^~~~
a.cc:56:46: note: to match this '{'
56 | if(A[j].substr(i, B[0].length()) == B[0]){
| ^
a.cc: At global scope:
a.cc:69:3: error: expected u... |
s222166538 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n)... | a.cc: In function 'int main()':
a.cc:63:10: error: expected '}' before 'else'
63 | }else{
| ^~~~
a.cc:56:46: note: to match this '{'
56 | if(A[j].substr(i, B[0].length()) == B[0]){
| ^
a.cc:64:18: error: expected ';' before 'break'
6... |
s280897421 | p03804 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// 1行、2つ(複数)数字
String[] ss0 = br.readLine().trim().split(" ", 0);
int N = I... | Main.java:36: error: illegal start of expression
if ( sa.equals(sb) ){ System.out.println("Yes"); return }
^
1 error
|
s560863280 | p03804 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);;
int i,tmp,pre;
int n=sc.nextInt();
int m=sc.nextInt();
String[] a=new String[n];
String[] b=new String[m];
for(i=0;i<n;i++){a[i]=sc.next();}
for(i=0;i<m;i++){b[i]=sc.next(... | Main.java:14: error: variable pre might not have been initialized
if(j==0)tmp=0; else tmp=pre;
^
1 error
|
s736627782 | p03804 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);;
int i,tmp,pre;
int n=sc.nextInt();
int m=sc.nextInt();
String[] a=new String[n];
String[] b=new String[m];
for(i=0;i<n;i++){a[i]=sc.next();}
for(i=0;i<m;i++){b[i]=sc.next(... | Main.java:27: error: cannot find symbol
for(int i=1;i<m;i++){
^
symbol: variable m
location: class Main
1 error
|
s299483820 | p03804 | Java | import java.util.*;
public class Main(){
public static void main(String[] args){
Scanner sc=new Scanner(System.in);;
int i,tmp,pre;
int n=sc.nextInt();
int m=sc.nextInt();
String[] a=new String[n];
String[] b=new String[m];
for(i=0;i<n;i++){a[i]=sc.next();}
for(i=0;i<m;i++){b[i]=sc.nex... | Main.java:2: error: '{' expected
public class Main(){
^
1 error
|
s178116563 | p03804 | C++ | #include <iostream>
#include <stdlib.h>
#include <bitset>
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... | a.cc: In function 'int main()':
a.cc:9:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
9 | __int64 map[2][64];
| ^~~~~~~
| __int64_t
a.cc:14:25: error: 'map' was not declared in this scope
14 | map[i][j] = 0;
| ... |
s256922206 | p03804 | C++ | #include "bits/stdc++.h"
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;
using ll = long long;
using ull = unsigned long long;
const char en='\n';
int main(){
int n,m;
char a[50][50],b[50][50];
cin>>n>>m;
for(int i=0;i<n*n;i++){
cin>>a[i%n][i/n];
}
for(int i=0;i<m*m;i++){
cin>>b[i%m][... | a.cc: In function 'int main()':
a.cc:28:50: error: incompatible types in assignment of 'bool' to 'char [50][50]'
28 | b=true;
| ~^~~~~
|
s318698722 | p03804 | 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=new String[];
String[] imgB=new String[];
Boolean checkAB;
int j;
int k;
String s = "No";
for... | Main.java:8: error: array dimension missing
String[] imgA=new String[];
^
Main.java:9: error: array dimension missing
String[] imgB=new String[];
^
2 errors
|
s722043652 | p03804 | C++ | #include <stdio.h>
int main(){
int n, m; //文字列の大きさ
int i,j;
int k,l;
int x;
scanf("%d %d", &n, &m);
char A[n+1][n+1];
char B[m+1][m+1];
for(j = 0; j < n; j++){
scanf("%s", A[j]);
}
for(j = 0; j < m; j++){
scanf("%s", B[j]);
}
for(i = 0; i <= n-m; i++){
for(j = 0; j <= n-m; j++){
//どっかしらがfitした
... | a.cc: In function 'int main()':
a.cc:46:18: error: expected '}' at end of input
46 | return 0;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s462317265 | p03804 | 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;
String[] imgB;
Boolean checkAB;
int j;
int k;
String s = "No";
for(int i = 0;i<N;i++){
im... | Main.java:15: error: variable imgA might not have been initialized
imgA[i]="";
^
Main.java:19: error: variable imgB might not have been initialized
imgB[i]="";
^
Main.java:26: error: variable imgA might not have been initialized
checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]);
... |
s523378854 | p03804 | 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++){... | 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
|
s125839653 | p03804 | C++ | #include <cstdio>
using namespace std;
int n,m,i,j,k,h;
char s[54][54],s1[54][54];
bool ok,ok1;
int main()
{
scanf ("%d %d\n", &n, &m);
for (i=0;i<=(n-1);i++)
gets(s[i]);
for (i=0;i<=(m-1);i++)
gets(s1[i]);
ok1=false;
for (i=0;(i<=(n-m)) && (ok1==false);i++)
for (j=0;(j<=(n-... | a.cc: In function 'int main()':
a.cc:11:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(s[i]);
| ^~~~
| getw
a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(s1[i]);
| ^~~~
| ... |
s345707358 | p03804 | 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++){
... | 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
|
s754898220 | p03804 | 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++){
... | 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;
... |
s493384388 | p03804 | C++ | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <stack>
#include <queue>
#include <map>
using namespace std;
#define max_n 50
#define max_m 50
#define max_w 10000
#define max_h 1000
#define max_k 10000
#d... | a.cc: In function 'int main()':
a.cc:38:14: error: no matching function for call to 'strstr(char [101], char [50][101])'
38 | if(strstr(a,b)!=NULL){
| ~~~~~~^~~~~
In file included from a.cc:5:
/usr/include/string.h:330:14: note: candidate: 'char* strstr(char*, const char*)'
330 | extern char *strs... |
s838219825 | p03804 | 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;
String[] imgB;
Boolean checkAB;
int j;
int k;
String s = "No";
for(int i = 0;i<N;i++){
im... | Main.java:15: error: variable imgA might not have been initialized
imgA[i]=sc.next();
^
Main.java:18: error: variable imgB might not have been initialized
imgB[i]=sc.next();
^
Main.java:24: error: variable imgA might not have been initialized
checkAB = (checkAB) && (imgA[j+k].substring(i, i+M)==imgB[k]... |
s887117353 | p03804 | C++ | #include <stdio.h>
#include <string.h>
int main(void){
int a,b,hantei=0;
scanf("%d %d",&a,&b);
char as[a][a],bs[b][b];
for(int i=0;i<a;i++){
for (int i2=0;i2<a;i2++){
scanf("%d",as[i][i2]);
}
}
for(int i=0;i<b;i++){
for (int i2=0;i2<b;i2++){
scanf("%d",bs[i][i2]);
}
}
for(int i=0;i<a;i++){
... | a.cc: In function 'int main()':
a.cc:23:42: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
23 | if(strcmp(bs[1][1],as[i][i2])==0){
| ~~~~~~~^
| |
| ... |
s856692451 | p03804 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() {
int n = 0;
int m = 0;
scanf("%d", &n);
scanf("%d", &m);
int a[51][51] = { 0 };
int b[51][51] = { 0 };
char tmp;
//a読み込み部
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
scanf("%c", &tmp);
if (tmp == '\n') { scanf("%c", &tm... | a.cc: In function 'int main()':
a.cc:52:51: error: 'y' was not declared in this scope
52 | if (x == m - 1 && y == m-1) { printf("Yes");
| ^
|
s449462368 | p03804 | 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;... | 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)) {
| ~ ^~ ~~~~~~~~~~~~~~... |
s038678160 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
#define N 55
int n,m;
string s[N],r[N];
bool che(int i,int j){
for(int a=0;a<m;a++){
for(int b=0;b<m;b++){
if(s[a+i][b+j]!=r[a][b])
return 0;
}
}
return 1;
}
bool solve(){
for(int i=0;i<=n-m;i++)
for(int j=0;j<=n-m;j++)
if(che(i,j))
return 1;
retu... | a.cc: In function 'int main()':
a.cc:32:27: error: expected '}' at end of input
32 | else cout<<"No\n";
| ^
a.cc:25:11: note: to match this '{'
25 | int main(){
| ^
|
s877496037 | p03804 | Java | public class Main {
static int n;
static int m;
public static void main(String[] args) throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer(br.readLine());
n=Integer.parseInt(st.nextToken());
... | Main.java:6: error: cannot find symbol
public static void main(String[] args) throws IOException {
^
symbol: class IOException
location: class Main
Main.java:7: error: cannot find symbol
BufferedReader br=new BufferedReader(new InputStreamReader(System... |
s834690788 | p03804 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
using namespace std;
#define FOR(i,k,n) for(int i=k;i<n;i++)
#define FORR(i,k,n) for(int i=k;i<=n;i++)
#define scan(a) scan... | a.cc: In function 'int main()':
a.cc:54:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
54 | gets(a[i]);
| ^~~~
| getw
a.cc:56:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
56 | gets(b[i]);
| ^~~~
| ... |
s493025187 | p03804 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, m; cin >> n >> m;
string* a = new string [n];
string* b = new string [m];
for(int i = 0; i < n; ++i) { cin >> a[i]; }
for(int i = 0; i < m; ++i) { cin >> b[i]; }
for(int top = 0; top < n-m+1; ++top)
{
for... | a.cc: In function 'int main()':
a.cc:15:13: error: 'found' was not declared in this scope
15 | found = true;
| ^~~~~
a.cc:28:14: error: 'found' was not declared in this scope
28 | cout << (found ? "Yes" : "No") << endl;
| ^~~~~
|
s333281198 | p03804 | C++ | #include <bits/stdc++.h>
using namespace std;
vector<string>A, B;
int main()
{
int N, M;
cin>>N>>M;
string inp;
for(int i = 0; i < N; i++)
{
cin>>inp;
A.push_back(inp);
}
for(int i = 0; i < M; i++)
{
cin>>inp;
B.push_back(inp);
}
int i, j, k,... | a.cc:40:16: warning: missing terminating " character
40 | else cout<<"No<<endl;
| ^
a.cc:40:16: error: missing terminating " character
40 | else cout<<"No<<endl;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:41:5: error: expected primary-expression before 'ret... |
s424808976 | p03804 | C++ | #include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <fstream>
#include <map>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <set>
#include <queue>
#include <list>
using namespace std;
char a[55][55],b[55][55];
int main()... | a.cc: In function 'int main()':
a.cc:25:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
25 | gets(a[i]);
| ^~~~
| getw
a.cc:27:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
27 | gets(b[i]);
| ^~~~
| ... |
s817913751 | p03804 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
int n, m; cin >> n >> m;
string* a = new string [n];
string* b = new string [m];
for(int i = 0; i < n; ++i) { cin >> a[i]; }
for(int i = 0; i < m; ++i) { cin >> b[i]; }
bool found = true;
for(int top = 0; top < n-m; ++top)
{
for(int lef = 0; lef <... | a.cc: In function 'int main()':
a.cc:25:19: error: expected ';' before ':' token
25 | if (found) goto ff:
| ^
| ;
a.cc:25:19: error: expected primary-expression before ':' token
|
s698123627 | p03804 | C++ |
#include <cstdio>
#include <iostream>
using namespace std;
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
char a[60][60];
char b[60][60];
int main(void) {
int n, m;
scanf("%d %d ", &n, &m);
REP(i, n)
gets(a[i]);
REP(i, m)
gets(b[i]);
REP(i, n-m+1) REP(j, n-m+1) {
bool ok = true;
REP(ii... | a.cc: In function 'int main()':
a.cc:14:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
14 | gets(a[i]);
| ^~~~
| getw
a.cc:16:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
16 | gets(b[i]);
| ^~~~
| getw
|
s607521374 | p03804 | C++ | #include<cstdio>
char a[50][51],b[50][51];
int main()
[
int i,j,k,l,n,m;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++){
bool f=true;
for(k=0;k<m&&f;k++)
for(l=0;l<m&&f;l++)
if(a[i+k][j+l]!=b[k][l])f=false;
if(f)return puts("Yes"),0;
}
puts(... | a.cc:5:1: error: expected primary-expression before 'int'
5 | int i,j,k,l,n,m;scanf("%d%d",&n,&m);
| ^~~
a.cc:4:2: error: expected ']' before 'int'
4 | [
| ^
| ]
5 | int i,j,k,l,n,m;scanf("%d%d",&n,&m);
| ~~~
a.cc:5:22: error: expected constructor, destructor, or type conversion be... |
s242334629 | 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++)
#define repv(i,n) for(int i = n-1; i >= 0; i--)
#define fi first
#define sc second
#define pb push_back
using namespace std;
typedef long long ll;
char BUF[3500000];
inline void I(int&a){scanf("%d",&a);}
i... | a.cc: In function 'int main()':
a.cc:54:26: error: expected '}' at end of input
54 | cout << "No" << endl;
| ^
a.cc:31:11: note: to match this '{'
31 | int main(){
| ^
|
s553042150 | p03805 | C++ | #include <iostream>
#include <vector>
using namespace std;
const int MAXN = 8;
vector <int> g[MAXN+1];
int n,m;
long long int res=0;
dfs(int v, long long int mask){
if(mask==((1LL<<n)-1)){
res+=1;
}
else{
for(int i=0; i<g[v].size(); i++){
if(!((1LL<<g[v][i])&(mask))){
dfs(g[v][i], mask|(1LL<<g[v][i]));
... | a.cc:8:1: error: ISO C++ forbids declaration of 'dfs' with no type [-fpermissive]
8 | dfs(int v, long long int mask){
| ^~~
a.cc: In function 'int dfs(int, long long int)':
a.cc:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
19 | }
| ^
|
s746562982 | p03805 | C++ | #include<bits/stdc++.h>
using namespace std;
int N,M,a,b,startingPoint,visit,ans;
vector<int> adj[100100];
bool visited[100100];
void dfs(int x){
if(visited[x]) return;
visited[x] = true;
visit++;
for(int i = 0;i < adj[x].size();i++){
int y = adj[x][i];
dfs(y);
}
if (visit == N) ans++;
visited[x] = f... | a.cc: In function 'void dfs(int)':
a.cc:11:5: error: reference to 'visit' is ambiguous
11 | visit++;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, cla... |
s713712416 | p03805 | C++ | #include<bits/stdc++.h>
using namespace std;
int N,M,a,b,startingPoint,visit,ans;
vector<int> adj[100100];
bool visited[100100];
void dfs(int x){
if(visited[x]) return;
visited[x] = true;
visit++;
for(int i = 0;i < adj[x].size();i++){
int y = adj[x][i];
dfs(y);
}
if (visit == N) ans++;
visited[x] = f... | a.cc: In function 'void dfs(int)':
a.cc:11:5: error: reference to 'visit' is ambiguous
11 | visit++;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, cla... |
s135847402 | p03805 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define all(x) x.begin(),x.end()
typedef long long ll;
ll mod = 1000000007;
ll inf = 1e18;
int main(){
int n,m;
cin >> n >> m;
vector<int> v(n);
rep(i,n) v[i]=i+1;
v... | a.cc:46:2: error: unterminated argument list invoking macro "rep"
46 | }
| ^
a.cc: In function 'int main()':
a.cc:31:13: error: 'rep' was not declared in this scope
31 | rep(j,l[p].size(){
| ^~~
a.cc:31:16: error: expected '}' at end of input
31 | rep(j,l[p].siz... |
s303735114 | p03805 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N,M; cin>>N>>M;
vector<vector<bool>>C(N,vector<bool>(N,false));
for(int i=0;i<M;i++){
int a,b; cin>>a>>b;
C[a][b]=true;
C[b][a]=true;
}
int count=1;
for(int i=1;i<N;i++)count*=i;
int ans=0;
vector<int>B(N);
for(int i=0;i<count;i... | a.cc: In function 'int main()':
a.cc:17:15: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
17 | if(!B[j][j-1])break;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.