結果
問題 | No.1336 Union on Blackboard |
ユーザー |
![]() |
提出日時 | 2021-02-22 22:01:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 2,000 ms |
コード長 | 373 bytes |
コンパイル時間 | 551 ms |
コンパイル使用メモリ | 67,268 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-21 17:38:35 |
合計ジャッジ時間 | 1,653 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 31 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ int t; cin>>t; for(int i=0;i<t;i++){ int n; long long ret=0; cin>>n; for(int j=0;j<n;j++){ long long aj; cin>>aj; ret=ret*aj+ret+aj; ret%=1000000007LL; } cout<<ret<<endl; } return 0; }