제출 #928187

#제출 시각아이디문제언어결과실행 시간메모리
928187crystalA Huge Tower (CEOI10_tower)Java
컴파일 에러
0 ms0 KiB
import java.util.*; public class aHugeTower { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int [] vals = new int [n]; for(int i =0;i<n;i++) { vals[i]=sc.nextInt(); } Arrays.sort(vals); int r=0; long ans =1; for(int i=0;i<n;i++) { while(r+1<n&&vals[r+1]-vals[i]<=m) { r++; } ans*=((long)r-i+1)%1000000000; ans%=1000000000; } System.out.println(ans); } }

컴파일 시 표준 에러 (stderr) 메시지

tower.java:3: error: class aHugeTower is public, should be declared in a file named aHugeTower.java
public class aHugeTower {
       ^
1 error