結果
問題 | No.2275 →↑↓ |
ユーザー |
|
提出日時 | 2023-04-21 21:39:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 23 ms / 2,000 ms |
コード長 | 319 bytes |
コンパイル時間 | 1,735 ms |
コンパイル使用メモリ | 194,316 KB |
最終ジャッジ日時 | 2025-02-12 11:14:48 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include<bits/stdc++.h>using namespace std;const int mod=998244353;int main(){ios::sync_with_stdio(false);cin.tie(nullptr);int N;cin>>N;vector<int>A(N);for(int &i:A)cin>>i;long long ans=1;int iri=1;for(int i=0;i<N;i++){ans=ans*min(iri,A[i])%mod;iri=A[i];}cout<<ans<<'\n';}