結果
| 問題 |
No.723 2つの数の和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-04 22:54:12 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 273 bytes |
| コンパイル時間 | 110 ms |
| コンパイル使用メモリ | 29,312 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-19 17:58:18 |
| 合計ジャッジ時間 | 2,477 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 5 RE * 9 |
ソースコード
#include <stdio.h>
int main(void)
{
int n,x,a[100001],t[100001]={0},s=0,i;
scanf("%d%d",&n,&x);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
t[a[i]]++;
}
for(i=0;i<n;i++)if(x-a[i]>0)s+=t[x-a[i]];
printf("%d",s);
return 0;
}