結果

問題 No.723 2つの数の和
コンテスト
ユーザー 👑 tails
提出日時 2018-08-03 22:57:28
言語 cLay
(20250308-1 + boost 1.89.0)
コンパイル:
clayc _filename_
実行:
./a.out
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 122 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,571 ms
コンパイル使用メモリ 193,572 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-03-26 21:55:15
合計ジャッジ時間 2,887 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

ll n,x,a[1d5],r;
{
	rd(n,x,a(n));
	sort(a,a+n);
	rep(i,n)r+=upper_bound(a,a+n,x-a[i])-lower_bound(a,a+n,x-a[i]);
	wt(r);
}
0