結果

問題 No.2275 →↑↓
ユーザー MarioYCMarioYC
提出日時 2023-04-21 21:45:41
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 1,989 ms
コンパイル使用メモリ 200,132 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-06 15:14:47
合計ジャッジ時間 3,550 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

const int mod = 998244353;

int main(){
    int N;
    cin >> N;
    int a[N];
    for(int i = 0;i < N;++i)
        cin >> a[i];
    ll ans = 1;
    for(int i = 0;i + 1 < N;++i){
        ans = ans * min(a[i], a[i + 1]) % mod;
    }
    cout << ans << endl;
    return 0;
}
0