제출 #857442

#제출 시각아이디문제언어결과실행 시간메모리
857442CMJA Huge Tower (CEOI10_tower)C11
컴파일 에러
0 ms0 KiB
#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);}

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

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