답안 #857442

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
857442 2023-10-06T08:01:44 Z CMJ A Huge Tower (CEOI10_tower) C
컴파일 오류
0 ms 0 KB
#include <algorithm>
#include <stdio.h>
int b[1000000];int main(){int n,d; scanf("%d %d\n",&n,&d);long long sol=1;for(int i=0;i<n;i++)scanf("%d",b+i);std::sort(b,b+n);for(int l=0,r=0;l<n;l++){while((r<n)&&(b[r]<=b[l]+d))r++;sol*=(r-l);sol%=1000000009;}printf("%d\n",sol);}

Compilation message

tower.c:1:10: fatal error: algorithm: No such file or directory
    1 | #include <algorithm>
      |          ^~~~~~~~~~~
compilation terminated.