记录详情

Compile Error

./Main.java:1: error: illegal character: '#'
#include <iostream>
^
./Main.java:1: error: class, interface, or enum expected
#include <iostream>
         ^
./Main.java:2: error: illegal character: '#'
#include <cstdio>
^
./Main.java:3: error: illegal character: '#'
#include <queue>
^
./Main.java:5: error: class, interface, or enum expected
priority_queue<int>q;
^
./Main.java:6: error: class, interface, or enum expected
int a[100005];
^
./Main.java:7: error: class, interface, or enum expected
int main(){
^
./Main.java:8: error: class, interface, or enum expected
	int n,k,sum=0; cin>>n>>k;
	               ^
./Main.java:9: error: class, interface, or enum expected
	for(int i=0;i<n-1;i++){
	^
./Main.java:9: error: class, interface, or enum expected
	for(int i=0;i<n-1;i++){
	            ^
./Main.java:9: error: class, interface, or enum expected
	for(int i=0;i<n-1;i++){
	                  ^
./Main.java:11: error: class, interface, or enum expected
		sum+=a[i];
		^
./Main.java:12: error: class, interface, or enum expected
		q.push(a[i]);
		^
./Main.java:13: error: class, interface, or enum expected
	}
	^
./Main.java:14: error: class, interface, or enum expected
	for(int i=0;i<k;i++){
	            ^
./Main.java:14: error: class, interface, or enum expected
	for(int i=0;i<k;i++){
	                ^
./Main.java:16: error: class, interface, or enum expected
		q.pop();
		^
./Main.java:17: error: class, interface, or enum expected
	}
	^
./Main.java:19: error: class, interface, or enum expected
	return 0;
	^
./Main.java:20: error: class, interface, or enum expected
}
^
20 errors
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1278 走访城市
语言
Java
递交时间
2021-07-19 09:35:23
评测时间
2021-07-19 09:35:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes