0_0_16940290_4094.cpp:1:1: error: 'import' does not name a type
import java.util.*;
^
0_0_16940290_4094.cpp:3:12: error: expected unqualified-id before '[' token
static int[][] dp;
^
0_0_16940290_4094.cpp:4:9: error: expected ':' before 'static'
public static void main(String[] args){
^
0_0_16940290_4094.cpp:4:26: error: 'String' has not been declared
public static void main(String[] args){
^
0_0_16940290_4094.cpp:4:35: error: expected ',' or '...' before 'args'
public static void main(String[] args){
^
0_0_16940290_4094.cpp:13:9: error: expected ':' before 'static'
public static void lcs(String str1,String str2){
^
0_0_16940290_4094.cpp:13:25: error: 'String' has not been declared
public static void lcs(String str1,String str2){
^
0_0_16940290_4094.cpp:13:37: error: 'String' has not been declared
public static void lcs(String str1,String str2){
^
0_0_16940290_4094.cpp:26:1: error: expected ';' after class definition
}
^
0_0_16940290_4094.cpp: In static member function 'static void Main::main(int*)':
0_0_16940290_4094.cpp:5:3: error: 'Scanner' was not declared in this scope
Scanner sc=new Scanner(System.in);
^
0_0_16940290_4094.cpp:6:9: error: 'sc' was not declared in this scope
while(sc.hasNext()){
^
0_0_16940290_4094.cpp:7:4: error: 'String' was not declared in this scope
String str1=sc.next();
^
0_0_16940290_4094.cpp:8:11: error: expected ';' before 'str2'
String str2=sc.next();
^
0_0_16940290_4094.cpp:9:8: error: 'str1' was not declared in this scope
lcs(str1,str2);
^
0_0_16940290_4094.cpp:9:13: error: 'str2' was not declared in this scope
lcs(str1,str2);
^
0_0_16940290_4094.cpp:10:4: error: 'System' was not declared in this scope
System.out.println(dp[str1.length()][str2.length()]);
^
0_0_16940290_4094.cpp:10:23: error: 'dp' was not declared in this scope
System.out.println(dp[str1.length()][str2.length()]);
^
0_0_16940290_4094.cpp: In static member function 'static void Main::lcs(int, int)':
0_0_16940290_4094.cpp:15:3: error: 'dp' was not declared in this scope
dp=new int[str1.length()+1][str2.length()+1];
^
0_0_16940290_4094.cpp:15:19: error: request for member 'length' in 'str1', which is of non-class type 'int'
dp=new int[str1.length()+1][str2.length()+1];
^
0_0_16940290_4094.cpp:15:36: error: request for member 'length' in 'str2', which is of non-class type 'int'
dp=new int[str1.length()+1][str2.length()+1];
^
0_0_16940290_4094.cpp:16:19: error: request for member 'length' in 'str1', which is of non-class type 'int'
for(i=1;i<=str1.length();i++){
^
0_0_16940290_4094.cpp:17:20: error: request for member 'length' in 'str2', which is of non-class type 'int'
for(j=1;j<=str2.length();j++){
^
0_0_16940290_4094.cpp:18:13: error: request for member 'charAt' in 'str1', which is of non-class type 'int'
if(str1.charAt(i-1)==str2.charAt(j-1)){
^
0_0_16940290_4094.cpp:18:31: error: request for member 'charAt' in 'str2', which is of non-class type 'int'
if(str1.charAt(i-1)==str2.charAt(j-1)){
^
0_0_16940290_4094.cpp:21:15: error: 'Math' was not declared in this scope
dp[i][j]=Math.max(dp[i-1][j], dp[i][j-1]);
^
|