結果
問題 | No.1336 Union on Blackboard |
ユーザー |
![]() |
提出日時 | 2021-01-15 22:33:58 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 787 ms |
コンパイル使用メモリ | 124,800 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 16:29:15 |
合計ジャッジ時間 | 1,720 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 31 |
ソースコード
#include <iostream> #include <unordered_map> int main() { size_t n_case, n_num; int64_t x, tmp; std::cin >> n_case; for (size_t i = 0; i < n_case; i++) { int64_t ans = 1; std::cin >> n_num; for (size_t j = 0; j < n_num; j++) { std::cin >> tmp; ans *= tmp + 1; ans %= 1000000007; } ans--; std::cout << ans << std::endl; } }