結果

問題 No.1882 Areas of Triangle
ユーザー cologne
提出日時 2022-03-22 23:36:42
言語 C++17(clang)
(clang++ 22.1.2 + boost 1.89.0)
コンパイル:
clang++ -O2 -lm -std=c++1z -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
TLE  
実行時間 -
コード長 412 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,354 ms
コンパイル使用メモリ 123,636 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-26 20:37:34
合計ジャッジ時間 10,245 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 22 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <cstdio>
#include <vector>
using namespace std;

int main()
{
	int N;
	long long K;
	scanf("%d%lld", &N, &K);
	vector<int> A(N);
	for (int &x : A)
		scanf("%d", &x);
	long long cnt = 0;
	for (int i = 0; i < N; ++i)
	{
		long long targ = (2*K+A[i]-1)/A[i];
		if(targ > 1'000'000'000) continue;
		int itarg = targ;
		for (int j = 0; j < N; ++j)
			if(A[j] >= itarg)
				++cnt;
	}
	printf("%lld\n", cnt);
}
0