結果
問題 |
No.1882 Areas of Triangle
|
ユーザー |
![]() |
提出日時 | 2023-09-19 03:38:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 683 ms / 2,000 ms |
コード長 | 592 bytes |
コンパイル時間 | 2,180 ms |
コンパイル使用メモリ | 199,092 KB |
最終ジャッジ日時 | 2025-02-16 23:32:15 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> #include<iostream> #include<map> #include<vector> #include <algorithm> #include<math.h> #include <iomanip> #include<set> #include <numeric> #include<string> using ll = long long; using namespace std; int main() { ll n, k, sum1 = 0; cin >> n >> k; vector<ll> a(n); for (int i = 0; i < n; i++) cin >> a[i]; sort(a.begin(), a.end()); for (ll i = 0; i < n; i++){ for (ll j = 0; j < n; j++){ if (a[i]*a[j] >= 2*k){ sum1 += (n-j); break; } } } cout << sum1 << endl; }