結果
| 問題 |
No.2275 →↑↓
|
| コンテスト | |
| ユーザー |
as277575
|
| 提出日時 | 2023-04-21 21:44:19 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 492 bytes |
| コンパイル時間 | 1,102 ms |
| コンパイル使用メモリ | 107,100 KB |
| 最終ジャッジ日時 | 2025-02-12 11:20:16 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <set>
using namespace::std;
int main() {
ios::sync_with_stdio(false);
const long long m = 998244353;
long long n, a, b, r = 1;
cin >> n >> b;
for (int i = 1; i < n; ++i) {
cin >> a;
r *= min(b, a);
r %= m;
b = a;
}
cout << r << endl;
return 0;
}
as277575