結果

問題 No.2275 →↑↓
ユーザー えいるえいる
提出日時 2023-04-21 21:25:38
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 88 ms / 2,000 ms
コード長 1,072 bytes
コンパイル時間 3,974 ms
コンパイル使用メモリ 223,392 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 07:34:51
合計ジャッジ時間 5,572 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 70 ms
5,376 KB
testcase_07 AC 53 ms
5,376 KB
testcase_08 AC 86 ms
5,376 KB
testcase_09 AC 86 ms
5,376 KB
testcase_10 AC 87 ms
5,376 KB
testcase_11 AC 88 ms
5,376 KB
testcase_12 AC 85 ms
5,376 KB
testcase_13 AC 86 ms
5,376 KB
testcase_14 AC 86 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vl=vector<long long>;
using vvl=vector<vector<long long>>;
using vvvl=vector<vector<vector<long long>>>;
using pl=pair<long long,long long>;
using vpl=vector<pair<long long,long long>>;
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#include <atcoder/all>
using namespace atcoder;

long long modpow(long long a, long long n, long long mo){long long res=1;while(n>0){if(n&1){res=res*a%mo;}a=a*a%mo;n>>=1;}return res;}
long long Pow(long long a, long long n){long long res=1;while(n>0){if(n&1){res=res*a;}a=a*a;n>>=1;}return res;}

const ll MOD=998244353;
const ll INF=(1ll<<60);

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