submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s706161287
p02235
C
include <stdio.h> #include <string.h> int LCS(void); char X[1000],Y[1000]; int c[1001][1001],k[150]; int main(){ int i,n; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",X); scanf("%s",Y); k[i]=LCS(); } for(i=0;i<n;i++) printf("%d\n",k[i]); return 0; } int LCS(){ int m=0,n=0,i,j; m=strlen(...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s929365482
p02235
C
include <stdio.h> #include <string.h> int LCS(void); char X[1000],Y[1000]; int c[1001][1001],k[150]; int main(){ int i,n; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",X); scanf("%s",Y); k[i]=LCS(); } for(i=0;i<n;i++) printf("%d\n",k[i]); return 0; } int LCS(){ int m=0,n=0,i,j; m=strlen(...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s639226885
p02235
C
include <stdio.h> #include <string.h> int LCS(void); char X[1000],Y[1000]; int c[1001][1001],k[150]; int main(){ int i,n; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",X); scanf("%s",Y); k[i]=LCS(); } for(i=0;i<n;i++) printf("%d\n",k[i]); return 0; } int LCS(){ int m=0,n=0,i,j; m=strlen(...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s703736546
p02235
C
include <stdio.h> #include <string.h> int LCS(void); char X[1000],Y[1000]; int c[1001][1001],k[150]; int main(){ int i,n; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",X); scanf("%s",Y); k[i]=LCS(); } for(i=0;i<n;i++) printf("%d\n",k[i]); return 0; } int LCS(){ int m=0,n=0,...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s658937555
p02235
C
#include <stdio.h> #include <string.h> int lcs(char ,char); int main(){ char x[1000],y[1000]; int n,i,j; scanf("%d",&n); for(i = 0;i < n;i++){ scanf("%s %s",x, y); printf("%d\n",lcs(x,y)); } return 0; } int lcs(char x[], char y[]){ int i,j; int m = strlen(x); int n = strlen(y); int c[m+1][n+1];...
main.c: In function 'main': main.c:11:22: error: passing argument 1 of 'lcs' makes integer from pointer without a cast [-Wint-conversion] 11 | printf("%d\n",lcs(x,y)); | ^ | | | char * main.c:3:9: note: expected 'char' but argument i...
s632453988
p02235
C
#include<stdio.h> #include<string.h> #define N 1000 char A[N+1],B[N+1]; ?? int lcn(){ ????int i,j,m,n,max=0; ????int c[N+1][N+1]; ????m=strlen(A); ????n=strlen(B); ????for(i=1;i<=m;i++) c[i][0]=0; ????for(j=1;j<=n;j++) c[0][j]=0; ?? ????for(i=1;i<=m;i++){ ????????for(j=1;j<=n;j++){ ????????????if(A[i-1]==B[j-1]) c[...
main.c:7:1: error: expected identifier or '(' before '?' token 7 | ?? | ^ main.c:28:1: error: expected identifier or '(' before '?' token 28 | ?? | ^ main.c: In function 'main': main.c:35:1: error: expected expression before '?' token 35 | ????int i,j,n; | ^ main.c:36:1: error: expected expr...
s960624903
p02235
C
#include <stdio.h> #include <string.h> #define N 1000 char s1[N+1],s2[N+1]; int lcs(void); int max(int,int); int main() { int i,n; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s%s",s1,s2); printf("%d\n",lcs()); } return 0; } int lcs() { int i,j,m,n; m=strlen(s1); n=strlen(s2); for(i=...
main.c: In function 'lcs': main.c:27:7: error: 'c' undeclared (first use in this function) 27 | c[i][0]=0; | ^ main.c:27:7: note: each undeclared identifier is reported only once for each function it appears in main.c:37:14: error: 't1' undeclared (first use in this function); did you mean 's1'? ...
s971299097
p02235
C
Last login: Wed Aug 9 23:24:03 on ttys000 MacBook-Pro:~ Toshiba$ ssh aizu PAM Authentication Password: bind: Address already in use channel_setup_fwd_listener_tcpip: cannot listen to port: 9999 Could not request local forwarding. Last login: Wed Aug 09 2017 23:29:53 +0900 from p8fbd796d Oracle Corporation SunOS 5...
main.c:1:1: error: unknown type name 'Last' 1 | Last login: Wed Aug 9 23:24:03 on ttys000 | ^~~~ main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token 1 | Last login: Wed Aug 9 23:24:03 on ttys000 | ^ main.c:8:21: error: invalid digit "9" in octal constant...
s209681862
p02235
C
#include <stdio.h> static const int N = 1000; char str1[N+1],str2[N+2] int max(int x,int y){ if(x>y) return x; else return y; } int longestCs(){ int c[N+1][N+1]; int max=0,i,j; m=strlen(str1); n=strlen(str2); for(i=0;i<=m;i++) c[i][0]=0; for(j=0;j<=n;j++) c[0][j]=0; for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ ...
main.c:4:6: error: variably modified 'str1' at file scope 4 | char str1[N+1],str2[N+2] | ^~~~ main.c:6:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' 6 | int max(int x,int y){ | ^~~ main.c: In function 'longestCs': main.c:15:1: error: 'm' undeclared (first use in this f...
s961864335
p02235
C
#include <stdio.h> static const int N = 1000; char str1[N+1],str2[N+1]; int max(int x,int y){ if(x>y) return x; else return y; } int longestCs(){ int c[N+1][N+1]; int maxv=0,i,j,m,n; m=strlen(str1); n=strlen(str2); for(i=0;i<=m;i++) c[i][0]=0; for(j=0;j<=n;j++) c[0][j]=0; for(i=1;i<=m;i++){ for(j=1;j<=n;j++...
main.c:4:6: error: variably modified 'str1' at file scope 4 | char str1[N+1],str2[N+1]; | ^~~~ main.c:4:16: error: variably modified 'str2' at file scope 4 | char str1[N+1],str2[N+1]; | ^~~~ main.c: In function 'longestCs': main.c:15:3: error: implicit declaration of function 'st...
s632844739
p02235
C
#include <stdio.h> static const int N = 1000; int max(int x,int y){ if(x>y) return x; else return y; } int longestCs(){ int c[N+1][N+1]; int maxv=0,i,j,m,n; m=strlen(str1); n=strlen(str2); for(i=0;i<=m;i++) c[i][0]=0; for(j=0;j<=n;j++) c[0][j]=0; for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ if(str1[i-1]==str2[...
main.c: In function 'longestCs': main.c:14:3: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 14 | m=strlen(str1); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen' 1 | #include <stdio.h> +++ |+#include <string.h> 2 | main.c:14:...
s321253702
p02235
C
#include <stdio.h> static const int N = 1000; int max(int x,int y){ if(x>y) return x; else return y; } int longestCs(){ int c[N+1][N+1]; int maxv=0,i,j,m,n; m=strlen(str1); n=strlen(str2); for(i=0;i<=m;i++) c[i][0]=0; for(j=0;j<=n;j++) c[0][j]=0; for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ if(str1[i-1]==str2[...
main.c: In function 'longestCs': main.c:14:3: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 14 | m=strlen(str1); | ^~~~~~ main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen' 1 | #include <stdio.h> +++ |+#include <string.h> 2 | main.c:14:...
s150869663
p02235
C
#include <stdio.h> static const int N = 1000; int max(int x,int y){ if(x>y) return x; else return y; } char str1[N+1],str2[N+1]; int longestCs(){ int c[N+1][N+1]; int maxv=0,i,j,m,n; m=strlen(str1); n=strlen(str2); for(i=0;i<=m;i++) c[i][0]=0; for(j=0;j<=n;j++) c[0][j]=0; for(i=1;i<=m;i++){ for(j=1;j<=n;j+...
main.c:10:6: error: variably modified 'str1' at file scope 10 | char str1[N+1],str2[N+1]; | ^~~~ main.c:10:16: error: variably modified 'str2' at file scope 10 | char str1[N+1],str2[N+1]; | ^~~~ main.c: In function 'longestCs': main.c:16:3: error: implicit declaration of function '...
s474268379
p02235
C
#include <stdio.h> #include <string.h> int main(){ char x[1000],y[1000]; int n,i,j; scanf("%d",&n); for(i = 0;i < n;i++){ scanf("%s %s",x, y); printf("%d\n",cal(x,y)); } return 0; } int cal(char x[], char y[]){ int i,j; int m = strlen(x); int n = strlen(y); int count[m+1][n+1]; for(i = 0;i <= m; i...
main.c: In function 'main': main.c:9:18: error: implicit declaration of function 'cal' [-Wimplicit-function-declaration] 9 | printf("%d\n",cal(x,y)); | ^~~ main.c: In function 'cal': main.c:31:13: error: 'cou' undeclared (first use in this function); did you mean 'count'? 31 | else ...
s626572651
p02235
C
#include<stdio.h> int LCS(int X,int Y,int a ,int b ){ int count,i,j; for(i=0;i<a;i++){ for(j=0;j<i;j++){ if(X[i]==Y[j]) count++; } } return count; } int main(){ int q,X,Y int a=0,b=0; int n[1000],m[1000]; scanf("%d",&q); for(i=0;i<=q;i++){ for(i=0;i<1000;i++){ scanf("%d",&n[i]); a++; if(n[i]==\n)...
main.c: In function 'LCS': main.c:9:5: error: subscripted value is neither array nor pointer nor vector 9 | if(X[i]==Y[j]) | ^ main.c:9:11: error: subscripted value is neither array nor pointer nor vector 9 | if(X[i]==Y[j]) | ^ main.c: In function 'main': main.c:19:9: error: expected '...
s933846182
p02235
C
#include<stdio.h> int LCS(int X,int Y,int a ,int b ){ int count,i,j; for(i=0;i<a;i++){ for(j=0;j<i;j++){ if(X[i]==Y[j]) count++; } } return count; } int main(){ int q,X,Y int a=0,b=0; int n[1000],m[1000]; scanf("%d",&q); for(i=0;i<=q;i++){ for(i=0;i<1000;i++){ scanf("%d",&n[i]); a++; if(n[i]==\n) break;} ...
main.c: In function 'LCS': main.c:9:5: error: subscripted value is neither array nor pointer nor vector 9 | if(X[i]==Y[j]) | ^ main.c:9:11: error: subscripted value is neither array nor pointer nor vector 9 | if(X[i]==Y[j]) | ^ main.c: In function 'main': main.c:19:1: error: expected '...
s970088182
p02235
C
#include<stdio.h> int LCS(int X,int Y,int a ,int b ){ int count,i,j,a,b,X,Y; for(i=0;i<a;i++){ for(j=0;j<i;j++){ if(X[i]==Y[j]) count++; } } return count; } int main(){ int q,X,Y int a=0,b=0; int n[1000],m[1000]; scanf("%d",&q); for(i=0;i<=q;i++){ for(i=0;i<1000;i++){ scanf("%d",&n[i]); a++; if(n[i]==\n) ...
main.c: In function 'LCS': main.c:6:15: error: 'a' redeclared as different kind of symbol 6 | int count,i,j,a,b,X,Y; | ^ main.c:4:25: note: previous definition of 'a' with type 'int' 4 | int LCS(int X,int Y,int a ,int b ){ | ~~~~^ main.c:6:17: error: 'b' redeclared ...
s219830744
p02235
C
#include<stdio.h> int void LCS(int X,int Y,int a ,int b ){ int count,i,j; for(i=0;i<a;i++){ for(j=0;j<i;j++){ if(X[i]==Y[j]) count++; } } return count; } int main(){ int q,X,Y int a=0,b=0; int n[1000],m[1000]; scanf("%d",&q); for(i=0;i<=q;i++){ for(i=0;i<1000;i++){ scanf("%d",&n[i]); a++; if(n[i]==\n) bre...
main.c:4:5: error: two or more data types in declaration specifiers 4 | int void LCS(int X,int Y,int a ,int b ){ | ^~~~ main.c: In function 'LCS': main.c:9:5: error: subscripted value is neither array nor pointer nor vector 9 | if(X[i]==Y[j]) | ^ main.c:9:11: error: subscripted value is neit...
s482070692
p02235
C
#include<stdio.h> int main void
main.c:2:9: error: expected ';' before 'void' 2 | int main void | ^~~~~ | ; main.c:2:1: error: expected identifier or '(' at end of input 2 | int main void | ^~~
s297777223
p02235
C
#include<stdio.h> int LCS(char [],char[]) int LCS(char X[],char Y[]){ int count,i,j,n,m,C[1000][1000]; count++; } } return count; } int main(){ int q,i; char n[1000],m[1000]; scanf("%d",&q); for(i=0;i<=q;i++){ scanf("%s",n[i]); scanf("%s",m[i]); printf("%d\n",LCS(n,m)); } return 0; }
main.c: In function 'LCS': main.c:5:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 5 | int LCS(char X[],char Y[]){ | ^ main.c:12:1: error: expected declaration specifiers before '}' token 12 | } | ^ main.c:13:1: error: expected declaration speci...
s666516665
p02235
C
#include <stdio.h> #define N 1000 int lcs(string X,string Y) int m,n,i,j,c[N+1][N+1]; m=X.length; n=Y.length; for(i=0;i<n;i++){ c[i][0]=0; } for(j=0;j<n;j++){ c[0][j]=0; } for(i=1;i<m;i++){ for(j=0;j<n;j++){ if(X[i]==Y[j]){ c[i][j]=c[i-1][j-1]+1; } else if(c[i-1][j...
main.c:4:9: error: unknown type name 'string'; did you mean 'stdin'? 4 | int lcs(string X,string Y) | ^~~~~~ | stdin main.c:4:18: error: unknown type name 'string'; did you mean 'stdin'? 4 | int lcs(string X,string Y) | ^~~~~~ | stdin mai...
s444345438
p02235
C
#include <stdio.h> #define N 1000 String lcs(string X,string Y) int m,n,i,j,c[N+1][N+1]; m=X.length; n=Y.length; for(i=0;i<n;i++){ c[i][0]=0; } for(j=0;j<n;j++){ c[0][j]=0; } for(i=1;i<m;i++){ for(j=0;j<n;j++){ if(X[i]==Y[j]){ c[i][j]=c[i-1][j-1]+1; } else if(c[i-1...
main.c:4:1: error: unknown type name 'String' 4 | String lcs(string X,string Y) | ^~~~~~ main.c:4:12: error: unknown type name 'string'; did you mean 'stdin'? 4 | String lcs(string X,string Y) | ^~~~~~ | stdin main.c:4:21: error: unknown type name 'string'; did you mean '...
s738579201
p02235
C
#include <stdio.h> #define N 1000 int lcs(string X,string Y) int m,n,i,j,c,maxl,[N+1][N+1]; m=X.length(); n=Y.length(); maxl=0; X=' '+X; Y=' '+Y; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<m;i++){ for(j=0;j<n;j++){ if(X[i]==Y[j]){ c[i][j]=c...
main.c:4:9: error: unknown type name 'string'; did you mean 'stdin'? 4 | int lcs(string X,string Y) | ^~~~~~ | stdin main.c:4:18: error: unknown type name 'string'; did you mean 'stdin'? 4 | int lcs(string X,string Y) | ^~~~~~ | stdin mai...
s148957016
p02235
C
#include<stdio.h> int main() { int q, a, i, u[150]; char X[1000], Y[1000]; a = 0; scanf("%d", &q); for ( i = 0; i < q; i++ ) { scanf("%s", X); scanf("%s", Y); u[i] = Dynamic(X, Y); } for ( i = 0; i < q; i++ ) { printf("%d\n", u[i]); } return 0; }
main.c: In function 'main': main.c:12:14: error: implicit declaration of function 'Dynamic' [-Wimplicit-function-declaration] 12 | u[i] = Dynamic(X, Y); | ^~~~~~~
s695057142
p02235
C
#include<stdio.h> int main() { int q, a, i, u[150]; char X[1000], Y[1000]; a = 0; scanf("%d", &q); for ( i = 0; i < q; i++ ) { scanf("%s", X); scanf("%s", Y); u[i] = Dynamic(X, Y); } for ( i = 0; i < q; i++ ) { printf("%s\n", u[i]); } return 0; }
main.c: In function 'main': main.c:12:14: error: implicit declaration of function 'Dynamic' [-Wimplicit-function-declaration] 12 | u[i] = Dynamic(X, Y); | ^~~~~~~
s042402765
p02235
C
#include<stdio.h> int main() { int q, a, i, u[150]; char X[1000], Y[1000]; a = 0; scanf("%d", &q); for ( i = 0; i < q; i++ ) { scanf("%s", X); scanf("%s", Y); u[i] = dynamic(X, Y); } for ( i = 0; i < q; i++ ) { printf("%d\n", u[i]); } return 0; }
main.c: In function 'main': main.c:12:14: error: implicit declaration of function 'dynamic' [-Wimplicit-function-declaration] 12 | u[i] = dynamic(X, Y); | ^~~~~~~
s643067510
p02235
C
#include <stdio.h> #include <string.h> void Ics(char *X, char *Y) { int c[1000][1000]; int m, n, i, j; m = strlen(X); n = strlen(Y); for ( i = 0; i <= m, i++ ) { c[i][0] = 0; } for ( j = 1; j <= n; j++ ) { c[0][j] =0; } for ( i = 1; i <= m; i++ ) { for ( j = 1; j <=n; j+...
main.c: In function 'Ics': main.c:12:28: error: expected ';' before ')' token 12 | for ( i = 0; i <= m, i++ ) { | ^~ | ;
s961298849
p02235
C
#include <stdio.h> #include <string.h> void Ics(char *X, char *Y) { int c[1000][1000]; int m, n, i, j; m = strlen(X); n = strlen(Y); for ( i = 1; i <= m, i++ ) { c[i][0] = 0; } for ( j = 1; j <= n; j++ ) { c[0][j] =0; } for ( i = 1; i <= m; i++ ) { for ( j = 1; j <=n; j+...
main.c: In function 'Ics': main.c:12:28: error: expected ';' before ')' token 12 | for ( i = 1; i <= m, i++ ) { | ^~ | ;
s808943910
p02235
C
#include <stdio.h> #include <string.h> void Ics(char *X, char *Y) { int c[1000][1000]; int m, n, i, j; m = strlen(X); n = strlen(Y); for ( i = 1; i <= m, i++ ) { c[i][0] = 0; } for ( j = 0; j <= n; j++ ) { c[0][j] =0; } for ( i = 1; i <= m; i++ ) { for ( j = 1; j <=n; j+...
main.c: In function 'Ics': main.c:12:28: error: expected ';' before ')' token 12 | for ( i = 1; i <= m, i++ ) { | ^~ | ;
s714432700
p02235
C
#include <stdio.h> #include <string.h> void Ics(char *X, char *Y) { int c[1000][1000]; int m, n, i, j; m = strlen(X); n = strlen(Y); for ( i = 1; i <= m, i++ ) { c[i][0] = 0; } for ( j = 0; j <= n; j++ ) { c[0][j] =0; } for ( i = 1; i <= m; i++ ) { for ( j = 1; j <=n; j+...
main.c: In function 'Ics': main.c:12:28: error: expected ';' before ')' token 12 | for ( i = 1; i <= m, i++ ) { | ^~ | ;
s424677220
p02235
C
#include <stdio.h> #include <string.h> void Ics(char *X, char *Y) { int c[1000][1000]; int m, n, i, j; m = strlen(X); n = strlen(Y); for ( i = 0; i <= m, i++ ) { c[i][0] = 0; } for ( j = 0; j <= n; j++ ) { c[0][j] =0; } for ( i = 1; i <= m; i++ ) { for ( j = 1; j <=n; j+...
main.c: In function 'Ics': main.c:12:28: error: expected ';' before ')' token 12 | for ( i = 0; i <= m, i++ ) { | ^~ | ;
s176900080
p02235
C
#include <stdio.h> #include <string.h> void Ics(char *X, char *Y) { int c[1000][1000]; int m, n, i, j; m = strlen(X); n = strlen(Y); for ( i = 0; i <= m, i++ ) { c[i][0] = 0; } for ( j = 0; j <= n; j++ ) { c[0][j] =0; } for ( i = 0; i <= m; i++ ) { for ( j = 1; j <=n; j+...
main.c: In function 'Ics': main.c:12:28: error: expected ';' before ')' token 12 | for ( i = 0; i <= m, i++ ) { | ^~ | ;
s876015374
p02235
C
#include <stdio.h> #include <string.h> void Ics(char *X, char *Y) { int c[1000][1000]; int m, n, i, j; m = strlen(X); n = strlen(Y); for ( i = 0; i <= m, i++ ) { c[i][0] = 0; } for ( j = 0; j <= n; j++ ) { c[0][j] =0; } for ( i = 0; i <= m; i++ ) { for ( j = 1; j <=n; j+...
main.c: In function 'Ics': main.c:12:28: error: expected ';' before ')' token 12 | for ( i = 0; i <= m, i++ ) { | ^~ | ;
s178987782
p02235
C
#include <stdio.h> #include <string.h> #define N 1000 #define n 150 void Ics(char *X, char *Y) { int c[N][N]; int m, n, i, j; m = strlen(X); n = strlen(Y); for ( i = 1; i <= m; i++ ) { c[i][0] = 0; } for ( j = 0; j <= n; j++ ) { c[0][j] =0; } for ( i = 1; i <= m; i++ ) { ...
main.c: In function 'Ics': main.c:4:11: error: expected identifier or '(' before numeric constant 4 | #define n 150 | ^~~ main.c:9:11: note: in expansion of macro 'n' 9 | int m, n, i, j; | ^ main.c:12:6: error: lvalue required as left operand of assignment 12 | n = strle...
s293380831
p02235
C
#include<stdio.h> int hantei(char x[], char y[]) { ????int xn = 0, yn = 0, flag = 0, i, j, max = 0; ????int c[1001][1001]; ????while (flag == 0) ????{ ????????if (x[xn] != '\0') ????????{ ????????????xn++; ????????} ????????else ????????{ ????????????flag = 1; ????????} ????} ????flag = 0; ????while (flag == 0) ???...
main.c: In function 'hantei': main.c:4:1: error: expected expression before '?' token 4 | ????int xn = 0, yn = 0, flag = 0, i, j, max = 0; | ^ main.c:5:1: error: expected expression before '?' token 5 | ????int c[1001][1001]; | ^ main.c:7:1: error: expected expression before '?' token 7 | ????wh...
s281660257
p02235
C
#include<stdio.h> #include<string.h> int i, j, m, n; int lcs(string X, string Y){ int c[1001][1001]; int m = strlen(X); int n = strlen(Y); int maxl = 0; X = ' '+X; Y = ' '+Y; for(i=0; i<=m; i++){ c[i][0] = 0; } for(j=1; j<=n; j++){ c[0][j] = 0; } for(i=1; i<=m; i++){ for(j=1; j<=...
main.c:6:9: error: unknown type name 'string'; did you mean 'stdin'? 6 | int lcs(string X, string Y){ | ^~~~~~ | stdin main.c:6:19: error: unknown type name 'string'; did you mean 'stdin'? 6 | int lcs(string X, string Y){ | ^~~~~~ | std...
s167824593
p02235
C
#include<stdio.h> #include<string.h> int i, j, m, n; int lcs(char X, char Y){ int c[1001][1001]; int m = strlen(X); int n = strlen(Y); int maxl = 0; X = ' '+X; Y = ' '+Y; for(i=0; i<=m; i++){ c[i][0] = 0; } for(j=1; j<=n; j++){ c[0][j] = 0; } for(i=1; i<=m; i++){ for(j=1; j<=n; j...
main.c: In function 'lcs': main.c:9:18: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion] 9 | int m = strlen(X); | ^ | | | char In file included from main.c:2: /usr/include/string.h:407:35: note: ...
s088901758
p02235
C
#include<stdio.h> #include<string.h> int i, j, m, n; int lcs(char X, char Y){ int c[1001][1001]; int m = strlen(X); int n = strlen(Y); int maxl = 0; X = ' '+X; Y = ' '+Y; for(i=0; i<=m; i++){ c[i][0] = 0; } for(j=1; j<=n; j++){ c[0][j] = 0; } for(i=1; i<=m; i++){ for(j=1; j<=n; j...
main.c: In function 'lcs': main.c:9:18: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion] 9 | int m = strlen(X); | ^ | | | char In file included from main.c:2: /usr/include/string.h:407:35: note: ...
s348782056
p02235
C
#include<stdio.h> #include<string.h> int i, j, m, n; int lcs(char X, char Y){ int c[1001][1001]; int m = strlen(X); int n = strlen(Y); int maxl = 0; X = ' '+X; Y = ' '+Y; for(i=0; i<=m; i++){ c[i][0] = 0; } for(j=1; j<=n; j++){ c[0][j] = 0; } for(i=1; i<=m; i++){ for(j=1; j<=n; j...
main.c: In function 'lcs': main.c:9:18: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion] 9 | int m = strlen(X); | ^ | | | char In file included from main.c:2: /usr/include/string.h:407:35: note: ...
s262615598
p02235
C
#include<stdio.h> #include<string.h> int i, j, m, n; int lcs(string X, string Y){ int c[1001][1001]; int m = strlen(X); int n = strlen(Y); int maxl = 0; X = ' '+X; Y = ' '+Y; for(i=0; i<=m; i++){ c[i][0] = 0; } for(j=1; j<=n; j++){ c[0][j] = 0; } for(i=1; i<=m; i++){ for(j=1; j<=...
main.c:6:9: error: unknown type name 'string'; did you mean 'stdin'? 6 | int lcs(string X, string Y){ | ^~~~~~ | stdin main.c:6:19: error: unknown type name 'string'; did you mean 'stdin'? 6 | int lcs(string X, string Y){ | ^~~~~~ | std...
s495628549
p02235
C
#include<stdio.h> #include<string.h> int i, j, m, n; int lcs(char X, char Y){ int c[1001][1001]; int m = strlen(X); int n = strlen(Y); int maxl = 0; X = ' '+X; Y = ' '+Y; for(i=0; i<=m; i++){ c[i][0] = 0; } for(j=1; j<=n; j++){ c[0][j] = 0; } for(i=1; i<=m; i++){ for(j=1; j<=n; j...
main.c: In function 'lcs': main.c:9:18: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion] 9 | int m = strlen(X); | ^ | | | char In file included from main.c:2: /usr/include/string.h:407:35: note: ...
s615889130
p02235
C
#include<stdio.h> #include<string.h> int i, j, m, n; int lcs(char X, char Y){ int c[1001][1001]; int m = strlen(X); int n = strlen(Y); int maxl = 0; X = ' '+X; Y = ' '+Y; for(i=0; i<=m; i++){ c[i][0] = 0; } for(j=1; j<=n; j++){ c[0][j] = 0; } for(i=1; i<=m; i++){ for(j=1; j<=n; j...
main.c: In function 'lcs': main.c:9:18: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion] 9 | int m = strlen(X); | ^ | | | char In file included from main.c:2: /usr/include/string.h:407:35: note: ...
s673815834
p02235
C
#include<stdio.h> #include<string.h> int i, j, m, n; int lcs(char X, char Y){ int c[1001][1001]; int m = strlen(X); int n = strlen(Y); int maxl = 0; X = ' '+X; Y = ' '+Y; for(i=0; i<=m; i++){ c[i][0] = 0; } for(j=1; j<=n; j++){ c[0][j] = 0; } for(i=1; i<=m; i++){ for(j=1; j<=n; j...
main.c: In function 'lcs': main.c:9:18: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion] 9 | int m = strlen(X); | ^ | | | char In file included from main.c:2: /usr/include/string.h:407:35: note: ...
s523867616
p02235
C
#include<stdio.h> #include<string.h> int i, j, m, n; int lcs(char X, char Y){ int c[1001][1001]; int m = strlen(X); int n = strlen(Y); int maxl = 0; X = ' '+X; Y = ' '+Y; for(i=0; i<=m; i++){ c[i][0] = 0; } for(j=1; j<=n; j++){ c[0][j] = 0; } for(i=1; i<=m; i++){ for(j=1; j<=n; j...
main.c: In function 'lcs': main.c:9:18: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion] 9 | int m = strlen(X); | ^ | | | char In file included from main.c:2: /usr/include/string.h:407:35: note: ...
s508616897
p02235
C
#include <stdio.h> #include <string.h> int i, j, max = 0; int lcs(char X[], char Y[]) { int common[1000][1000], x, y; x = strlen(X); y = strlen(Y); for(i = 0; i <= x; i++) common[i][0] = 0; for(j = 0; j <= y; j++) common[0][j] = 0; for(i = 1; i <= x; i++){ for(j = 1; j <= y; j++)...
main.c: In function 'main': main.c:40:35: error: unknown type name 'a' 40 | scanf("%s", X);scanf("%s", Y);a | ^ main.c:41:12: error: variable-sized object may not be initialized except with an empty initializer 41 | q[i] = lcs(X, Y); | ^~~
s649736746
p02235
C
#include <stdio.h> #include <string.h> char X[1001]; char Y[1001]; int c[1001][1001]; int n; int lcs(){ int m,n,i,j; m=strlen(X); n=strlen(Y); for(i=1;i<=m;i++){ c[i][0]=0; } for(j=0;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ if(X[i-1]==Y[j-1]){ c[i][j]=c[i-1][j...
main.c:31:1: error: expected identifier or '(' before '?' token 31 | ?? | ^
s966223723
p02235
C
#include <stdio.h> #include <string.h> char X[1001]; char Y[1001]; int c[1001][1001]; int n; ?? int lcs(){ ????int m,n,i,j; ????m=strlen(X); ????n=strlen(Y); ????for(i=1;i<=m;i++){ ????????c[i][0]=0; ????} ????for(j=0;j<=n;j++){ ????????c[0][j]=0; ????} ????for(i=1;i<=m;i++){ ????????for(j=1;j<=n;j++){ ??????????if(X[i...
main.c:7:1: error: expected identifier or '(' before '?' token 7 | ?? | ^ main.c: In function 'main': main.c:34:1: error: expected expression before '?' token 34 | ????scanf("%d",&n); | ^ main.c:35:1: error: expected expression before '?' token 35 | ????int i; | ^ main.c:36:1: error: expecte...
s770111008
p02235
C
#include<stdio.h> #include<string.h> #define N 1001 int lcslength(char [] ,char []); char X[N],Y[N]; int a[N][N]; int x,y; int main(){ ????int n,i; ???? ????scanf("%d",&n); ?????? ????for(i=1;i<=n;i++){ ????????scanf("%s %s",X,Y); ?????? ????????printf("%d\n",lcslength(X,Y)); ?????????? } ???????? ???????? ????return ...
main.c: In function 'main': main.c:10:1: error: expected expression before '?' token 10 | ????int n,i; | ^ main.c:11:1: error: expected expression before '?' token 11 | ???? | ^ main.c:12:17: error: 'n' undeclared (first use in this function) 12 | ????scanf("%d",&n); | ^ main....
s012059606
p02235
C
#include<stdio.h> #include<string.h> #define N 1001 int lcslength(char [] ,char []); char X[N],Y[N]; int a[N][N]; int x,y; int main(){ int n,i; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s %s",X,Y); printf("%d\n",lcslength(X,Y)); } ????return 0; } int lcslength(char X[] ,char Y[]){ ??int i,j; ??for(i=1;i<=stlen(x);...
main.c: In function 'main': main.c:19:1: error: expected expression before '?' token 19 | ????return 0; | ^ main.c: In function 'lcslength': main.c:22:1: error: expected expression before '?' token 22 | ??int i,j; | ^ main.c:23:1: error: expected expression before '?' token 23 | ??for(i=1;i<=stlen(...
s372655614
p02235
C
#include<stdio.h> #include<string.h> #define N 1001 int lcslength(char [] ,char []); char X[N],Y[N]; int a[N][N]; int x,y; int main(){ int n,i; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s %s",X,Y); printf("%d\n",lcslength(X,Y)); } return 0; } int lcslength(char X[] ,char Y[]){ int i,j; for(i=1;i<=stlen(x);i++){ a[i][...
main.c: In function 'lcslength': main.c:20:12: error: implicit declaration of function 'stlen'; did you mean 'strlen'? [-Wimplicit-function-declaration] 20 | for(i=1;i<=stlen(x);i++){ | ^~~~~ | strlen
s976569833
p02235
C
#include <stdio.h> #include <string.h> char x[1000],y[1000]; int LCS() { int i,j; int n=strlen(x),m=strlen(y); int a[n+1][m+1]; for(i=1;i<=n;i++){ a[i][0]=0; } for(i=0;i<=m;i++){ a[0][i]=0; } for(i=1;i<=n;i++){ for(j=1;j<=m;j++){ if(x[i-1]==y[j-1]){ a[i][j]=a[i-1][j-1]+1; }else if(a[i-1]...
main.c: In function 'LCS': main.c:31:2: error: 'returna' undeclared (first use in this function) 31 | returna[n][m]; | ^~~~~~~ main.c:31:2: note: each undeclared identifier is reported only once for each function it appears in
s586730343
p02235
C
#include <stdio.h> #include <string.h> ?? char x[1000],y[1000]; ?? int LCS() { ??int i,j; ??int n=strlen(x),m=strlen(y); ??int a[n+1][m+1]; ?? ??for(i=1;i<=n;i++){ ??????a[i][0]=0; ??} ?? ??for(i=0;i<=m;i++){ ??????a[0][i]=0; ??} ?? ??for(i=1;i<=n;i++){ ????for(j=1;j<=m;j++){ ??????if(x[i-1]==y[j-1]){ ??????????a[i][j]...
main.c:3:1: error: expected identifier or '(' before '?' token 3 | ?? | ^ main.c:5:1: error: expected identifier or '(' before '?' token 5 | ?? | ^ main.c:33:1: error: expected identifier or '(' before '?' token 33 | ?? | ^
s199409724
p02235
C
#include <stdio.h> #include <string.h> char x[1000],y[1000]; int LCS() { int i,j; int n=strlen(x),m=strlen(y); int a[n+1][m+1]; for(i=1;i<=n;i++){ a[i][0]=0; } ??for(i=0;i<=m;i++){ ??????a[0][i]=0; ??} ??for(i=1;i<=n;i++){ ????for(j=1;j<=m;j++){ ??????if(x[i-1]==y[j-1]){ ??????????a[i][j]=a[i-1][j-1]+1; ??...
main.c: In function 'LCS': main.c:16:1: error: expected expression before '?' token 16 | ??for(i=0;i<=m;i++){ | ^ main.c: In function 'main': main.c:36:1: error: expected expression before '?' token 36 | ??int i,n; | ^ main.c:38:1: error: expected expression before '?' token 38 | ??scanf("%d",&n); ...
s840581154
p02235
C
#include <stdio.h> int c[1001][1001]; int lcs(char X[],char Y[],int m,int n) int i,j,max; max=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j++){ if(X[i]==Y[j]){ c[i][j]=c[i-1][j-1]+1; } else if(c[i-1][j]>=c[i][j...
main.c: In function 'lcs': main.c:8:3: error: expected declaration specifiers before 'max' 8 | max=0; | ^~~ main.c:9:3: error: expected declaration specifiers before 'for' 9 | for(i=0;i<=m;i++){ | ^~~ main.c:9:11: error: expected declaration specifiers before 'i' 9 | for(i=0;i<=m;i++){...
s229831003
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char s[]) { int len; len=0; while(s[len]){ len++; return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max; max=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j++)...
main.c: In function 'lcs': main.c:17:3: error: expected declaration specifiers before 'max' 17 | max=0; | ^~~ main.c:18:3: error: expected declaration specifiers before 'for' 18 | for(i=0;i<=m;i++){ | ^~~ main.c:18:11: error: expected declaration specifiers before 'i' 18 | for(i=0;i<=m;i+...
s960345683
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char s[]) { int len; len=0; while(s[len]){ len++; return len; } int lcs(char X[],char Y[],int m,int n) ?? ????int i,j,max1; ????max1=0; ????for(i=0;i<=m;i++){ ????????c[i][0]=0; ????} ????for(j=1;j<=n;j++){ ????????c[0][j]=0; ????} ????for(i=1;i<=m;i...
main.c: In function 'lcs': main.c:15:1: error: expected declaration specifiers before '?' token 15 | ?? | ^ main.c:17:1: error: expected declaration specifiers before '?' token 17 | ????max1=0; | ^ main.c:18:1: error: expected declaration specifiers before '?' token 18 | ????for(i=0;i<=m;i++){ ...
s240819069
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char s[]) { int len; len=0; while(s[len]){ len++; return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j+...
main.c: In function 'lcs': main.c:17:3: error: expected declaration specifiers before 'max1' 17 | max1=0; | ^~~~ main.c:18:3: error: expected declaration specifiers before 'for' 18 | for(i=0;i<=m;i++){ | ^~~ main.c:18:11: error: expected declaration specifiers before 'i' 18 | for(i=0;i<=m...
s782540572
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char s[]) { int len; len=0; while(s[len]){ len++; return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j+...
main.c: In function 'lcs': main.c:17:3: error: expected declaration specifiers before 'max1' 17 | max1=0; | ^~~~ main.c:18:3: error: expected declaration specifiers before 'for' 18 | for(i=0;i<=m;i++){ | ^~~ main.c:18:11: error: expected declaration specifiers before 'i' 18 | for(i=0;i<=m...
s629538634
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char s[]) { int len; len=0; while(s[len]){ len++; return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j+...
main.c: In function 'lcs': main.c:17:3: error: expected declaration specifiers before 'max1' 17 | max1=0; | ^~~~ main.c:18:3: error: expected declaration specifiers before 'for' 18 | for(i=0;i<=m;i++){ | ^~~ main.c:18:11: error: expected declaration specifiers before 'i' 18 | for(i=0;i<=m...
s283352493
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char s[]) { int len; len=0; while(s[len]){ len++; return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j+...
main.c: In function 'lcs': main.c:17:3: error: expected declaration specifiers before 'max1' 17 | max1=0; | ^~~~ main.c:18:3: error: expected declaration specifiers before 'for' 18 | for(i=0;i<=m;i++){ | ^~~ main.c:18:11: error: expected declaration specifiers before 'i' 18 | for(i=0;i<=m...
s182129801
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char s[]) { int len; len=0; while(s[len]){ len++; return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j+...
main.c: In function 'lcs': main.c:17:3: error: expected declaration specifiers before 'max1' 17 | max1=0; | ^~~~ main.c:18:3: error: expected declaration specifiers before 'for' 18 | for(i=0;i<=m;i++){ | ^~~ main.c:18:11: error: expected declaration specifiers before 'i' 18 | for(i=0;i<=m...
s010296386
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char s[]) { int len; len=0; while(s[len]){ len++; return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j+...
main.c: In function 'lcs': main.c:17:3: error: expected declaration specifiers before 'max1' 17 | max1=0; | ^~~~ main.c:18:3: error: expected declaration specifiers before 'for' 18 | for(i=0;i<=m;i++){ | ^~~ main.c:18:11: error: expected declaration specifiers before 'i' 18 | for(i=0;i<=m...
s050760626
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char *s[]) { int len; len=0; while(s[len]){ len++; return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j<=n;j...
main.c: In function 'lcs': main.c:17:3: error: expected declaration specifiers before 'max1' 17 | max1=0; | ^~~~ main.c:18:3: error: expected declaration specifiers before 'for' 18 | for(i=0;i<=m;i++){ | ^~~ main.c:18:11: error: expected declaration specifiers before 'i' 18 | for(i=0;i<=m...
s620899118
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char *s[]) { int len; len=0; while(*s[len]){ len++; } return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j...
main.c: In function 'lcs': main.c:18:3: error: expected declaration specifiers before 'max1' 18 | max1=0; | ^~~~ main.c:19:3: error: expected declaration specifiers before 'for' 19 | for(i=0;i<=m;i++){ | ^~~ main.c:19:11: error: expected declaration specifiers before 'i' 19 | for(i=0;i<=m...
s367229623
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char *s[]) { int len; len=0; while(*s[len]){ len++; } return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j...
main.c: In function 'lcs': main.c:18:3: error: expected declaration specifiers before 'max1' 18 | max1=0; | ^~~~ main.c:19:3: error: expected declaration specifiers before 'for' 19 | for(i=0;i<=m;i++){ | ^~~ main.c:19:11: error: expected declaration specifiers before 'i' 19 | for(i=0;i<=m...
s340591395
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char *s[]) { int len; len=0; while(*s[len]){ len++; } return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1;j...
main.c: In function 'lcs': main.c:18:3: error: expected declaration specifiers before 'max1' 18 | max1=0; | ^~~~ main.c:19:3: error: expected declaration specifiers before 'for' 19 | for(i=0;i<=m;i++){ | ^~~ main.c:19:11: error: expected declaration specifiers before 'i' 19 | for(i=0;i<=m...
s472051525
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char *s[]) { int len; len=0; while(*s[len]++){ len++; } return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1...
main.c: In function 'lcs': main.c:18:3: error: expected declaration specifiers before 'max1' 18 | max1=0; | ^~~~ main.c:19:3: error: expected declaration specifiers before 'for' 19 | for(i=0;i<=m;i++){ | ^~~ main.c:19:11: error: expected declaration specifiers before 'i' 19 | for(i=0;i<=m...
s862542168
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char *s[]) { int len; len=0; while(*s[len]++){ len++; } return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1...
main.c: In function 'lcs': main.c:18:3: error: expected declaration specifiers before 'max1' 18 | max1=0; | ^~~~ main.c:19:3: error: expected declaration specifiers before 'for' 19 | for(i=0;i<=m;i++){ | ^~~ main.c:19:11: error: expected declaration specifiers before 'i' 19 | for(i=0;i<=m...
s273523107
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char *s[]) { int len; len=0; while(*s[len]++){ len++; } return len; } int lcs(char X[],char Y[],int m,int n) int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=1...
main.c: In function 'lcs': main.c:18:3: error: expected declaration specifiers before 'max1' 18 | max1=0; | ^~~~ main.c:19:3: error: expected declaration specifiers before 'for' 19 | for(i=0;i<=m;i++){ | ^~~ main.c:19:11: error: expected declaration specifiers before 'i' 19 | for(i=0;i<=m...
s486712753
p02235
C
#include <stdio.h> int c[1001][1001]; int length(const char *s[]) { int len; len=0; while(*s[len]++){ len++; } return len; } int lcs(char X[],char Y[],int m,int n){ int i,j,max1; max1=0; for(i=0;i<=m;i++){ c[i][0]=0; } for(j=1;j<=n;j++){ c[0][j]=0; } for(i=1;i<=m;i++){ for(j=...
main.c: In function 'main': main.c:52:15: error: passing argument 1 of 'length' from incompatible pointer type [-Wincompatible-pointer-types] 52 | ml=length(m); | ^ | | | char * main.c:5:24: note: expected 'const char **' but argument is of type 'char *...
s484812440
p02235
C
#include<stdio.h> #include<string.h> #define N 1000 char X[N], Y[N]; void LCS(char X[], Y[]) { int i, j; int C[1000][1000]; } int main() { int i, q; scanf("%d", &q); for (i=0; i<q; i++) scanf("%d %d", X, Y); LCS(X, Y); } return 0; }
main.c:7:20: error: expected declaration specifiers or '...' before 'Y' 7 | void LCS(char X[], Y[]) | ^ main.c: In function 'main': main.c:26:7: error: implicit declaration of function 'LCS' [-Wimplicit-function-declaration] 26 | LCS(X, Y); | ^~~ main.c: At top level: m...
s909246708
p02235
C
#include<stdio.h> #include<string.h> #define N 1001 char x[N],y[N]; int a[N][N]; int u,v; int main(void){ int n,i; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s %s",x,y); printf("%d\n",lcs(x,y)); } return 0; } int lcs(char x[] ,char y[]){ int i,j; u=strlen(x); v=strlen(y); for(i=1;i<=u;i++){ a[i][0] = 0; } for(j=0;j<=v...
main.c: In function 'main': main.c:13:15: error: implicit declaration of function 'lcs' [-Wimplicit-function-declaration] 13 | printf("%d\n",lcs(x,y)); | ^~~ main.c: In function 'lcs': main.c:37:9: error: array subscript is not an integer 37 | return a[x][y]; | ^
s681832930
p02235
C
#include<stdio.h> #include<string.h> int main(void){ int n,i; int x[1000],y[1000]; scanf("%d",&n); for(i=0;i<=n;i++){ scanf("%s %s",x,y); printf("%d\n",lcs(x,y)); } return 0; } int lcs(char x[] ,char y[]){ int a[u+1][v+1]; int i,j; u=strlen(x); v=strlen(y); for(i=0;i<=u;i++){ a[i][0] = 0; } for(j=0;j<=v;j++){ a[0][j]...
main.c: In function 'main': main.c:11:15: error: implicit declaration of function 'lcs' [-Wimplicit-function-declaration] 11 | printf("%d\n",lcs(x,y)); | ^~~ main.c: In function 'lcs': main.c:16:7: error: 'u' undeclared (first use in this function) 16 | int a[u+1][v+1]; | ^ main.c:...
s254478302
p02235
C
#include<stdio.h> #include<string.h> int main(void){ int n,i; int x[1000],y[1000]; scanf("%d",&n); for(i=0;i<=n;i++){ scanf("%s %s",x,y); printf("%d\n",lcs(x,y)); } return 0; } int lcs(char x[] ,char y[]){ int a[u+1][v+1]; int i,j; int u=strlen(x); int v=strlen(y); for(i=0;i<=u;i++){ a[i][0] = 0; } for(j=0;j<=v;j++){...
main.c: In function 'main': main.c:11:15: error: implicit declaration of function 'lcs' [-Wimplicit-function-declaration] 11 | printf("%d\n",lcs(x,y)); | ^~~ main.c: In function 'lcs': main.c:16:7: error: 'u' undeclared (first use in this function) 16 | int a[u+1][v+1]; | ^ main.c:...
s004357684
p02235
C
#include<stdio.h> #include<string.h> int max(int a,int b){ if(a>b)return a; return b; } int LCS(char X[],char Y[]){ int i,j; int dp[100][100]; for(i=0;i<=strlen(X);i++){ for(j=0;j<=strlen(Y);j++){ dp[j][i]=-1; } } for(i=0;i<=strlen(X);i++)dp[0][i]=0; for(i=0;i<=strlen(Y);i++)dp[i][0]=0; for(i=1;i<=strlen(X);...
main.c: In function 'main': main.c:48:2: error: 'a' undeclared (first use in this function) 48 | a=LCS(X,Y); | ^ main.c:48:2: note: each undeclared identifier is reported only once for each function it appears in
s137312978
p02235
C
#include<stdio.h> #include<string.h> #define MAX 1010 #define max(a,b) ((a<b)?b:a) char s[MAX], t[MAX]; int dp[MAX][MAX]==0; int LCS() { int n = strlen(s); int m = strlen(t); int i,j,maxi=0; for(i=0;i<n;i++) { for(j=0;j<m;j++) { if( i ) dp[i][j] = max(dp[i][j],dp[i-1][j]); if( j ) dp[i...
main.c:8:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token 8 | int dp[MAX][MAX]==0; | ^~ main.c: In function 'LCS': main.c:17:15: error: 'dp' undeclared (first use in this function) 17 | if( i ) dp[i][j] = max(dp[i][j],dp[i-1][j]); | ^~ ...
s683351981
p02235
C++
from string import ascii_letters def llcs(x, y): pm = dict((zip(ascii_letters, [0] * 52))) for c in pm: for i, xc in enumerate(x): if c == xc: pm[c] |= (1 << i) V = (1 << len(x)) - 1 for yc in y: V = ((V + (V & pm[yc])) | (V & ~pm[yc])) ans...
a.cc:1:1: error: 'from' does not name a type 1 | from string import ascii_letters | ^~~~
s083503206
p02235
C++
#include<bits/stdc++.h> using namespace std; #define inf 1e9 #define ll long long #define ull unsigned long long #define M 1000000007 #define P pair<int,int> #define PLL pair<ll,ll> #define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++) #define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--) #define rep(i,n) FOR(i,0,n) #define ...
a.cc:33:3: error: expected declaration before '}' token 33 | } | ^ a.cc:35:3: error: 'cout' does not name a type 35 | cout<<dp[(int)x.length()][(int)y.length()]<<endl; | ^~~~ a.cc:36:1: error: expected declaration before '}' token 36 | } | ^
s520200755
p02235
C++
n=int(input()) ans=[] for k in range(n): s1=input() s2=input() dp=[[0 for i in range(len(s2)+1)] for j in range(len(s1)+1)] for i in range(1,len(s1)+1): for j in range(1,len(s2)+1): if s1[i-1]==s2[j-1]: dp[i][j]=dp[i-1][j-1]+1 else: dp[i][j...
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^
s396560276
p02235
C++
n=int(input()) ans=[] for k in range(n): s1=input() s2=input() dp=[[0 for i in range(len(s2)+1)] for j in range(len(s1)+1)] for i in range(1,len(s1)+1): for j in range(1,len(s2)+1): if s1[i-1]==s2[j-1]: dp[i][j]=dp[i-1][j-1]+1 else: dp[i][j...
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^
s508316280
p02235
C++
#include <iostream> #include <string> /*int LCS(std::string str1, std::string str2, int i, int j){ if(str1[i] == str2[j]){ return 1; } else{ return 0; } } */ int max(int a, int b, int c){ int m = a; if(b > m){ m = b; } if(c > m){ m = c; } return m; } int main(){ int q; std::c...
a.cc: In function 'int main()': a.cc:60:2: error: expected '}' at end of input 60 | } | ^ a.cc:25:11: note: to match this '{' 25 | int main(){ | ^
s500462004
p02235
C++
n=int(input()) ans=[] for k in range(n): s1=input() s2=input() dp=[[0 for i in range(len(s2)+1)] for j in range(len(s1)+1)] for i in range(1,len(s1)+1): for j in range(1,len(s2)+1): if s1[i-1]==s2[j-1]: dp[i][j]=dp[i-1][j-1]+1 else: dp[i][j...
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^
s650378620
p02235
C++
def lcs(l1,l2): dp=[[0 for x in range(len(l2)+1)] for y in range(len(l1)+1)] for i in range(1,len(l1)+1): for j in range(1,len(l2)+1): if l1[i-1]==l2[j-1]: dp[i][j]=dp[i-1][j-1]+1 else: dp[i][j]=max(dp[i-1][j],dp[i][j-1]) retu...
a.cc:1:1: error: 'def' does not name a type 1 | def lcs(l1,l2): | ^~~
s128778599
p02235
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string X, Y; int v[1001][1001]; int dp(string X, string Y) { int n = X.size(); int m = Y.size(); memset(v, 0, sizeof(v)); for (int i = 0; i <= n; i++) { v[i][0] = 0; ///0のテーブル for (int j = 0; j <= m; j++) { v[0][j] = 0;...
a.cc: In function 'int dp(std::string, std::string)': a.cc:12:9: error: 'memset' was not declared in this scope 12 | memset(v, 0, sizeof(v)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> ...
s488715419
p02235
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string X, Y; int v[1001][1001]; int dp(string X, string Y) { int n = X.size(); int m = Y.size(); memset(v, 0, sizeof(v)); for (int i = 0; i <= n; i++) { v[i][0] = 0; ///0のテーブル for (int j = 0; j <= m; j++) { v[0][j] = 0;...
a.cc: In function 'int dp(std::string, std::string)': a.cc:12:9: error: 'memset' was not declared in this scope 12 | memset(v, 0, sizeof(v)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> ...
s893020317
p02235
C++
#include<iostream> #include<string> #include<algoritm> using namespace std; static const int N = 1000; int lcs(string X,string Y){ int c[N+1][N+1]; int m = X.size(); int n = Y.size(); int maxl = 0; X = ' ' + X; Y = ' ' + Y; for(int i = 1;i<=m;i++) c[i][0] = 0; for(int j = 1; j<=n;j++) c[0][j] = 0; fo...
a.cc:3:9: fatal error: algoritm: No such file or directory 3 | #include<algoritm> | ^~~~~~~~~~ compilation terminated.
s148631311
p02235
C++
#include<iostream> #include<string> #include<algoritm> using namespace std; static const int N = 1000; int lcs(string X,string Y){ int c[N+1][N+1]; int m = X.size(); int n = Y.size(); int maxl = 0; X = ' ' + X; Y = ' ' + Y; for(int i = 1;i<=m;i++) c[i][0] = 0; for(int j = 1; j<=n;j++) c[0][j] = 0; fo...
a.cc:3:9: fatal error: algoritm: No such file or directory 3 | #include<algoritm> | ^~~~~~~~~~ compilation terminated.
s324333603
p02235
C++
/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
s670713379
p02235
C++
#include<string> #include<iostream> using namespace std; #define N=1000; int lcs(string x,string y){ int c[N+1][N+1]; int m=x.size(); int n=y.size(); int maxl=0; x=' '+x; y=' '+y; for(int i=1;i<=m;i++) c[i][0]=0; for(int j=1;j<=n;j++) c[0][j]=0; for(int i=1;i<=m;i++){ ...
a.cc:6:9: warning: ISO C++11 requires whitespace after the macro name 6 | #define N=1000; | ^ a.cc: In function 'int lcs(std::string, std::string)': a.cc:6:10: error: expected primary-expression before '=' token 6 | #define N=1000; | ^ a.cc:8:11: note: in expansion of macro 'N' ...
s276665521
p02235
C++
#include<string> #include<iostream> #include<algorithm> using namespace std; #define N 1000; int lcs(string x,string y){ int c[N+1][N+1]; int m=x.size(); int n=y.size(); int maxl=0; x=' '+x; y=' '+y; for(int i=1;i<=m;i++) c[i][0]=0; for(int j=1;j<=n;j++) c[0][j]=0; for(int i...
a.cc: In function 'int lcs(std::string, std::string)': a.cc:8:15: error: expected ']' before ';' token 8 | #define N 1000; | ^ a.cc:10:11: note: in expansion of macro 'N' 10 | int c[N+1][N+1]; | ^ a.cc:10:14: error: expected ';' before ']' token 10 | int c[N+1][N+1]...
s450059124
p02235
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; static const int N=1000; int lcs(string X,string Z) { int c[N+1][N+1]; int m=X.size(); int n=Z.size(); int maxl=0; X=' '+X; Y=' '+Z; for(int i=1;i<=m;i++)c[i][0]=0; for(int j=1;j<=n;j++)c[0][j]=0; for(int i=1;i<=m;i++) ...
a.cc: In function 'int lcs(std::string, std::string)': a.cc:14:3: error: 'Y' was not declared in this scope 14 | Y=' '+Z; | ^ a.cc:20:19: error: 'j' was not declared in this scope 20 | for(int i=1;j<=n;j++) | ^ a.cc: In function 'int main()': a.cc:39:3: error: 'stirng' was ...
s929454116
p02235
C++
#include <iostream> #include <cstring> #include <algoritm> using namespace std; int main() { std::ios::sync_with_stdio(false); cout.tie(0); cin.tie(0); int N; cin>>N; string S1,S2; for (int k=0; k<N; k++) { cin>>S1>>S2; int m=S1.length(); int n=S2.length(); S1=' '+S1; S2=' '+S2; i...
a.cc:3:10: fatal error: algoritm: No such file or directory 3 | #include <algoritm> | ^~~~~~~~~~ compilation terminated.
s318089673
p02235
C++
import sys sys.setrecursionlimit(10000) def calc(x,y): i = len(x) j = len(y) if not d[i][j] == None: return d[i][j] else: if x[-1] == y[-1]: tmp = calc(x[:-1],y[:-1])+1 d[i][j] = tmp return tmp else: tmp = max(calc(x[:-1],y),calc(x...
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'
s861655504
p02235
C++
q = int(input()) for i in range(q): x = input() y = input() n = len(x) m = len(y) dp = [0]*((n+1)*(m+1)) for i in range(n): for j in range(m): a = (n+1)*(j+1)+i+1 if x[i] == y[j]: b = (n+1)*j+i dp[a] = dp[b]+1 else: ...
a.cc:1:1: error: 'q' does not name a type 1 | q = int(input()) | ^
s141228054
p02235
C++
q = int(input()) for i in range(q): x = input().rstrip() y = input().rstrip() n = len(x) m = len(y) d = [[0 for _ in range(m+1)] for _ in range(n+1)] for i in range(n): for j in range(m): if x[i] == y[j]: d[i+1][j+1] = d[i][j]+1 else: ...
a.cc:1:1: error: 'q' does not name a type 1 | q = int(input()) | ^
s381123013
p02235
C++
q = int(input()) ans = [] for i in range(q): x = input() y = input() n = len(x) m = len(y) dp1 = [0]*(m+1) for i in range(n): s = x[i] dp2 = dp1[:] for j in range(m): if s == y[j]: dp1[j+1] = dp2[j]+1 elif dp1[j+1] < dp1[j]: ...
a.cc:1:1: error: 'q' does not name a type 1 | q = int(input()) | ^
s507852190
p02235
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <set> #include <queue> #include <map> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<ld> vld; typedef pair<int,int> pii; typedef pair<ll,ll> pll; #d...
a.cc: In function 'int main(int, const char**)': a.cc:31:9: error: 'memset' was not declared in this scope 31 | memset(DP, 0, sizeof(DP)); | ^~~~~~ a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include <map> +++ |+#...
s575146208
p02235
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <set> #include <queue> #include <map> #include <stdlib> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<ld> vld; typedef pair<int,int> pii; typedef pai...
a.cc:8:10: fatal error: stdlib: No such file or directory 8 | #include <stdlib> | ^~~~~~~~ compilation terminated.
s410924228
p02235
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <set> #include <queue> #include <map> #include <stdlib.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<ld> vld; typedef pair<int,int> pii; typedef p...
a.cc: In function 'int main(int, const char**)': a.cc:31:9: error: 'memset' was not declared in this scope 31 | memset(DP, 0, sizeof(DP)); | ^~~~~~ a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #include <stdlib.h> ++...
s836304466
p02235
C++
#include <stdio.h> int score[1010][1010]; int max2 (int a, int b){ if (a >= b) return a; else return b; } int len_of_str(const char s[]){ int num = 0; while(s[num]) num++; return num; } int main() { char a[1010]; char b[1010]; int datanum; scanf("%d",&datanum); for(int c = 0; c < datanum; c++...
a.cc: In function 'int main()': a.cc:50:25: error: expected ';' before '}' token 50 | printf("%d\n",maximum) | ^ | ; 51 | } | ~