/in/Main.java:1: error: class, interface, or enum expected
public static void main(String args[]){
^
/in/Main.java:4: error: class, interface, or enum expected
int numUnderGovernExpect;
^
/in/Main.java:6: error: class, interface, or enum expected
int tempPrice=0,tempNum=0;
^
/in/Main.java:7: error: class, interface, or enum expected
int goodPrice,totalProfit;
^
/in/Main.java:8: error: class, interface, or enum expected
int taxOrSubsidy;
^
/in/Main.java:9: error: class, interface, or enum expected
int count=0,count1=0;
^
/in/Main.java:10: error: class, interface, or enum expected
int x1=0,x2=0,y1=0,y2=0,k,b;
^
/in/Main.java:11: error: class, interface, or enum expected
int maxPriceGiven=0,numUnderMaxPriceGiven=0;
^
/in/Main.java:12: error: class, interface, or enum expected
Scanner sc=new Scanner(System.in);
^
/in/Main.java:13: error: class, interface, or enum expected
int[] testProfit=new int[100];int i=0;
^
/in/Main.java:13: error: class, interface, or enum expected
int[] testProfit=new int[100];int i=0;
^
/in/Main.java:15: error: class, interface, or enum expected
Map<Integer,Integer> priceMap=new LinkedHashMap<Integer,Integer>();
^
/in/Main.java:16: error: class, interface, or enum expected
governExpect=sc.nextInt();
^
/in/Main.java:17: error: class, interface, or enum expected
tempPrice=sc.nextInt();
^
/in/Main.java:18: error: class, interface, or enum expected
goodPrice=tempPrice;
^
/in/Main.java:19: error: class, interface, or enum expected
tempNum=sc.nextInt();
^
/in/Main.java:20: error: class, interface, or enum expected
count1++;
^
/in/Main.java:21: error: class, interface, or enum expected
while (tempNum!=-1&&tempPrice!=-1){
^
/in/Main.java:23: error: class, interface, or enum expected
tempPrice=sc.nextInt();
^
/in/Main.java:24: error: class, interface, or enum expected
tempNum=sc.nextInt();
^
/in/Main.java:25: error: class, interface, or enum expected
count1++;
^
/in/Main.java:26: error: class, interface, or enum expected
}
^
/in/Main.java:28: error: class, interface, or enum expected
for(Integer key:priceMap.keySet()){
^
/in/Main.java:30: error: class, interface, or enum expected
switch (count){
^
/in/Main.java:33: error: class, interface, or enum expected
y1=value;
^
/in/Main.java:34: error: class, interface, or enum expected
break;
^
/in/Main.java:35: error: class, interface, or enum expected
case 2:
^
/in/Main.java:37: error: class, interface, or enum expected
y2=value;
^
/in/Main.java:38: error: class, interface, or enum expected
break;
^
/in/Main.java:39: error: class, interface, or enum expected
default:
^
/in/Main.java:41: error: class, interface, or enum expected
}
^
/in/Main.java:43: error: class, interface, or enum expected
if(count==count1-1) {
^
/in/Main.java:45: error: class, interface, or enum expected
numUnderMaxPriceGiven=value;
^
/in/Main.java:46: error: class, interface, or enum expected
}
^
/in/Main.java:49: error: class, interface, or enum expected
}
^
/in/Main.java:52: error: class, interface, or enum expected
int max=testProfit[0];
^
/in/Main.java:53: error: class, interface, or enum expected
while(testProfit[i]!=0){
^
/in/Main.java:56: error: class, interface, or enum expected
}
^
/in/Main.java:58: error: class, interface, or enum expected
}
^
/in/Main.java:59: error: class, interface, or enum expected
k=(y2-y1)/(x2-x1);b=y1-k*x1;
^
/in/Main.java:60: error: class, interface, or enum expected
if(governExpect<=maxPriceGiven){
^
/in/Main.java:62: error: class, interface, or enum expected
}else {
^
/in/Main.java:64: error: class, interface, or enum expected
}
^
/in/Main.java:66: error: class, interface, or enum expected
System.out.println("total profit: "+totalProfit);
^
/in/Main.java:67: error: class, interface, or enum expected
System.out.println("max: "+max);
^
/in/Main.java:68: error: class, interface, or enum expected
if(totalProfit<max){
^
/in/Main.java:70: error: class, interface, or enum expected
System.out.println(taxOrSubsidy);
^
/in/Main.java:71: error: class, interface, or enum expected
}else if(totalProfit>max){
^
/in/Main.java:73: error: class, interface, or enum expected
System.out.println(taxOrSubsidy);
^
/in/Main.java:74: error: class, interface, or enum expected
}else{
^
/in/Main.java:76: error: class, interface, or enum expected
}
^
51 errors