結果

問題 No.723 2つの数の和
ユーザー GB
提出日時 2018-09-02 20:48:16
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 341 bytes
コンパイル時間 574 ms
コンパイル使用メモリ 119,924 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 12:39:27
合計ジャッジ時間 15,142 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>

using namespace std;

int main() {

	int n, x;
	int *array;
	
	cin >> n >> x;
	array = new int[n];
	for (int i = 0;i < n;i++) {
		cin >> array[i];
	}
	int count = 0;
	for (int i = 0;i < n;i++) {
		for (int j = 0;j < n;j++) {
			if (array[i] + array[j] == x)count++;
		}
	}

	cout << count;

	delete[] array;

	return 0;
}
0