結果
| 問題 |
No.723 2つの数の和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-19 17:06:28 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 302 bytes |
| コンパイル時間 | 181 ms |
| コンパイル使用メモリ | 29,056 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-17 14:55:31 |
| 合計ジャッジ時間 | 1,050 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 4 |
ソースコード
#include <stdio.h>
int main(void)
{
long n,x,a[100000],t[100000]={0},s=0,i;
scanf("%ld%ld",&n,&x);
for(i=0;i<n;i++){
scanf("%ld",&a[i]);
t[a[i]-1]++;
}
for(i=0;i<n;i++)if(x-a[i]-1>=0&&100000>x-a[i]-1)s+=t[x-a[i]-1];
printf("%ld",s);
return 0;
}