結果
| 問題 | No.723 2つの数の和 |
| コンテスト | |
| ユーザー |
🍮かんプリン
|
| 提出日時 | 2019-02-10 15:29:11 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 370 bytes |
| 記録 | |
| コンパイル時間 | 831 ms |
| コンパイル使用メモリ | 175,148 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-09 12:09:38 |
| 合計ジャッジ時間 | 2,694 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 9 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
#define ll long long int
int a[100001];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll x;
ll n,c=0,p,m=0;
cin >> n >> x;
for (int i=0;i<n;i++) { cin>>p; a[p]++; m=m<p?p:m;}
for (int i=0;i<=m;i++) {
if (x-i<=m&&x>=m) c+=a[x-i]*a[i];
}
cout << c << endl;
return 0;
}
🍮かんプリン