結果
問題 |
No.2803 Bocching Star
|
ユーザー |
![]() |
提出日時 | 2024-06-15 13:23:11 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 562 bytes |
コンパイル時間 | 709 ms |
コンパイル使用メモリ | 77,476 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-05 10:29:26 |
合計ジャッジ時間 | 5,000 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 TLE * 1 -- * 33 |
ソースコード
#include<stdio.h> #include<cmath> #include<queue> #pragma GCC target("avx2") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") int main(){ int N,S; scanf("%d%d",&N,&S); int P[N]; for(int i=0;i<N;i++){ scanf("%d",&P[i]); } std::queue<int> que; for(int i=0;i<N;i++){ bool check=true; for(int j=0;j<N;j++){ if(i!=j && S>=abs(P[i]-P[j])){ check=false; break; } } if(check){ que.push(i+1); } } printf("%d\n",(int)(que.size())); while(!que.empty()){ printf("%d ",que.front()); que.pop(); } printf("\n"); }