結果
問題 |
No.2275 →↑↓
|
ユーザー |
|
提出日時 | 2023-04-22 01:34:47 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 84 ms / 2,000 ms |
コード長 | 332 bytes |
コンパイル時間 | 579 ms |
コンパイル使用メモリ | 67,216 KB |
最終ジャッジ日時 | 2025-02-12 12:48:47 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include <iostream> using namespace std; using ll = long long; ll const m = 998244353; int main () { int N; cin >> N; ll pre; cin >> pre; ll ans = 1; for (int i = 1; i < N; i ++) { ll a; cin >> a; ans *= min(a, pre); ans %= m; pre = a; } cout << ans << endl; }