結果
| 問題 |
No.723 2つの数の和
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2020-02-10 18:55:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 299 bytes |
| コンパイル時間 | 429 ms |
| コンパイル使用メモリ | 63,616 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-01 06:28:36 |
| 合計ジャッジ時間 | 2,961 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 4 WA * 8 RE * 10 |
ソースコード
#include <iostream>
using namespace std;
long long nya[100001];
int main(){
int n,x;cin>>n>>x;
for(int i = 0; n > i; i++){
int z;cin>>z;
nya[z]++;
}
long long ans = 0;
for(int i = 0; x/2 >= i; i++){
ans += nya[i]*nya[x-i];
}
cout << ans << endl;
}