結果
問題 |
No.723 2つの数の和
|
ユーザー |
|
提出日時 | 2018-08-31 06:13:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 478 bytes |
コンパイル時間 | 1,715 ms |
コンパイル使用メモリ | 160,812 KB |
実行使用メモリ | 13,764 KB |
最終ジャッジ日時 | 2024-09-13 20:40:41 |
合計ジャッジ時間 | 4,950 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 21 |
ソースコード
#include<bits/stdc++.h> #define print(x) std::cout << x << std::endl using namespace std; typedef vector<int> VI; typedef vector<string> VS; //container util #define SORT(c) sort((c).begin(),(c).end()) //repetition #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) int main(void){ int N,X; cin >> N >> X; VI a(N,0); REP(i,N) cin >> a[i]; int ans = 0; REP(i,N){ REP(j,N){ if(a[i]+a[j] == X) ans++; } } print(ans); return 0; }