Submission #928187

#TimeUsernameProblemLanguageResultExecution timeMemory
928187crystalA Huge Tower (CEOI10_tower)Java
Compilation error
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); } }

Compilation message (stderr)

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