結果
| 問題 |
No.754 畳み込みの和
|
| コンテスト | |
| ユーザー |
👑 tatyam
|
| 提出日時 | 2018-12-02 08:54:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 214 bytes |
| コンパイル時間 | 657 ms |
| コンパイル使用メモリ | 67,324 KB |
| 最終ジャッジ日時 | 2025-01-06 17:53:53 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
コンパイルメッセージ
main.cpp:3:21: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
3 | using namespace std;main(){int n,i;scanf("%d",&n);long a[n+1],b[n+1],sum=0,ans=0;R cin>>a[i];R cin>>b[i];R{sum+=a[i];ans=(ans+sum*b[n-i])%1000000007;}cout<<ans<<endl;}
| ^~~~
main.cpp: In function ‘int main()’:
main.cpp:3:41: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
3 | using namespace std;main(){int n,i;scanf("%d",&n);long a[n+1],b[n+1],sum=0,ans=0;R cin>>a[i];R cin>>b[i];R{sum+=a[i];ans=(ans+sum*b[n-i])%1000000007;}cout<<ans<<endl;}
| ~~~~~^~~~~~~~~
ソースコード
#include<iostream>
#define R for(i=0;i<=n;++i)
using namespace std;main(){int n,i;scanf("%d",&n);long a[n+1],b[n+1],sum=0,ans=0;R cin>>a[i];R cin>>b[i];R{sum+=a[i];ans=(ans+sum*b[n-i])%1000000007;}cout<<ans<<endl;}
tatyam