結果
| 問題 |
No.723 2つの数の和
|
| コンテスト | |
| ユーザー |
koukonko
|
| 提出日時 | 2018-08-23 23:11:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 440 bytes |
| コンパイル時間 | 679 ms |
| コンパイル使用メモリ | 60,936 KB |
| 実行使用メモリ | 13,952 KB |
| 最終ジャッジ日時 | 2024-12-29 14:58:26 |
| 合計ジャッジ時間 | 45,696 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 TLE * 12 |
ソースコード
#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
typedef long long ll;
#define MIN(x, y) (x < y ? x : y)
#define MAX(x, y) (x > y ? x : y)
using namespace std;
int main(){
int N, X;
cin >> N >> X;
int a[100000];
for(int i = 0; i < N; ++i){
cin >> a[i];
}
int count = 0;
for(int i = 0; i < N; ++i){
for(int j = 0; j < N; ++j){
if(a[i] + a[j] == X){ count++; }
}
}
cout << count << endl;
}
koukonko