結果
問題 |
No.2803 Bocching Star
|
ユーザー |
![]() |
提出日時 | 2024-06-15 13:12:55 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 484 bytes |
コンパイル時間 | 732 ms |
コンパイル使用メモリ | 75,332 KB |
実行使用メモリ | 13,756 KB |
最終ジャッジ日時 | 2024-07-05 10:29:19 |
合計ジャッジ時間 | 4,933 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 TLE * 1 -- * 33 |
ソースコード
#include<stdio.h> #include<cmath> #include<queue> using namespace std; int main(){ int N,S; scanf("%d%d",&N,&S); int P[N]; for(int i=0;i<N;i++){ scanf("%d",&P[i]); } 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"); }