結果
| 問題 |
No.881 sin(x)/xの和
|
| ユーザー |
masa_ahe
|
| 提出日時 | 2019-09-13 21:28:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 878 bytes |
| コンパイル時間 | 636 ms |
| コンパイル使用メモリ | 80,208 KB |
| 実行使用メモリ | 17,352 KB |
| 最終ジャッジ日時 | 2024-07-04 03:58:37 |
| 合計ジャッジ時間 | 7,353 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 22 |
ソースコード
#include<iostream>
#include<vector>
#include<map>
#include<string>
#include<cstring>
#include<bitset>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<numeric>
#include<set>
#include<math.h>
using namespace std;
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
#define rep(i,x) for(int i=0;i<x;i++)
#define re(i,x,y) for(int i=x;i<y;i++)
long long INF=1e9;
const long long mod=2019;
#define ll long long
double sinc(double x){
if(x!=0){
return sin(x)/x;
}
else{
return 1;
}
}
int main(){
cin.tie(0); ios::sync_with_stdio(false);
double n; cin>>n;
vector<double>x(n),a(n);
rep(i,n){
cin>>x[i]>>a[i];
}
double sum=0;
rep(i,n){
re(j,-1000000,1000000){
sum+=(a[i])*sinc(x[i]+j);
}
}
printf("%.16f\n",sum);
return 0;
}
masa_ahe