結果
問題 |
No.1081 和の和
|
ユーザー |
👑 |
提出日時 | 2021-11-09 20:05:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 340 bytes |
コンパイル時間 | 596 ms |
コンパイル使用メモリ | 68,736 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-19 00:21:31 |
合計ジャッジ時間 | 1,235 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 |
ソースコード
#include <iostream> #include <vector> using namespace std; #define MOD 1000000007 int main(){ int n;cin>>n; vector<int> A(n); for(int i = 0; n > i; i++){ cin>>A[i]; } for(int i = n-1; 0 < i; i--){ for(int j = 0; i > j; j++){ A[j]=(A[j]+A[j+1])%MOD; } } cout << A[0] << endl; }