結果

問題 No.2275 →↑↓
ユーザー HIcoder
提出日時 2023-07-12 07:12:46
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 557 bytes
コンパイル時間 970 ms
コンパイル使用メモリ 98,172 KB
最終ジャッジ日時 2025-02-15 09:55:18
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<set>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<map>
#include<numeric>
#include<queue>
#include<cmath>
using namespace std;
typedef long long ll;
const ll INF=1LL<<60;
typedef pair<int,int> P;
typedef pair<int,P> PP;
const ll MOD=998244353;
const double PI=acos(-1);


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