Compile Error

./Main.java:1: error: illegal character: '#'
#include<iostream>
^
./Main.java:1: error: class, interface, enum, or record expected
#include<iostream>
        ^
./Main.java:2: error: illegal character: '#'
#include<cstring>
^
./Main.java:3: error: illegal character: '#'
#include<cstdio>
^
./Main.java:5: error: class, interface, enum, or record expected
int main()
^
./Main.java:8: error: class, interface, enum, or record expected
	cin>>n;
	^
./Main.java:10: error: class, interface, enum, or record expected
	for(int i=0;i<n;i++)
	^
./Main.java:10: error: class, interface, enum, or record expected
	for(int i=0;i<n;i++)
	            ^
./Main.java:10: error: class, interface, enum, or record expected
	for(int i=0;i<n;i++)
	                ^
./Main.java:13: error: class, interface, enum, or record expected
	}
	^
./Main.java:15: error: class, interface, enum, or record expected
	s=0;
	^
./Main.java:16: error: class, interface, enum, or record expected
	w=n-1;
	^
./Main.java:17: error: class, interface, enum, or record expected
	while(to<=w)
	^
./Main.java:20: error: class, interface, enum, or record expected
		c=(to+w)/2;
		^
./Main.java:21: error: class, interface, enum, or record expected
		if(a[c]<h)
		^
./Main.java:24: error: class, interface, enum, or record expected
		}
		^
./Main.java:28: error: class, interface, enum, or record expected
		}
		^
./Main.java:32: error: class, interface, enum, or record expected
			cout<<c<<endl;
			^
./Main.java:33: error: class, interface, enum, or record expected
			break;
			^
./Main.java:34: error: class, interface, enum, or record expected
		}
		^
./Main.java:39: error: class, interface, enum, or record expected
		cout<<"No";
		^
./Main.java:40: error: class, interface, enum, or record expected
	}
	^
./Main.java:42: error: class, interface, enum, or record expected
 } 
 ^
23 errors
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1168 折半查找
语言
Java
递交时间
2021-12-15 20:52:38
评测时间
2021-12-15 20:52:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes