結果
| 問題 |
No.1510 Simple Integral
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-14 23:44:53 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 381 bytes |
| コンパイル時間 | 832 ms |
| コンパイル使用メモリ | 68,388 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-10-02 05:57:50 |
| 合計ジャッジ時間 | 6,336 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 RE * 31 |
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
7 | main()
| ^~~~
ソースコード
#include<iostream>
#include<atcoder/modint>
using namespace std;
using mint=atcoder::modint998244353;
int N;
mint A[100];
main()
{
cin>>N;
for(int i=0;i<N;i++)
{
int a;cin>>a;
A[i]=a;
}
mint ans=0;
for(int i=0;i<N;i++)
{
mint now=A[i];
for(int j=0;j<N;j++)if(i!=j)
{
now*=A[i]*A[i]-A[j]*A[j];
}
ans+=1/now;
}
if(N%2==0)ans=-ans;
cout<<ans.val()<<endl;
}