結果

問題 No.1882 Areas of Triangle
ユーザー 👑 CleyL
提出日時 2022-07-05 09:41:49
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 383 bytes
コンパイル時間 784 ms
コンパイル使用メモリ 78,224 KB
最終ジャッジ日時 2025-01-30 04:43:34
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 15 RE * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
    int n,k;cin>>n>>k;
    vector<int> A(n);
    for(int i = 0; n > i; i++){
        cin>>A[i];
    }
    sort(A.begin(),A.end());
    long long ans = 0;
    for(int i = 0; n > i; i++){
        ans += A.end()-lower_bound(A.begin(),A.end(),(2*k+A[i]-1)/A[i]);
    }
    cout << ans << endl;
}
0