結果

問題 No.2275 →↑↓
ユーザー 河城白露河城白露
提出日時 2023-04-28 20:13:18
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 503 bytes
コンパイル時間 662 ms
コンパイル使用メモリ 82,624 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-28 22:23:04
合計ジャッジ時間 2,379 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <set>
#include <map>
#include <vector>
#include <queue>
#define ll long long
#define db double
using namespace std;
const ll M = 998244353;
const ll N = 2e5 + 100;
ll n,a[N];
int main() {
	ll ans = 1;
	scanf("%lld",&n);
	for (ll i = 1;i <= n;i++) {
		scanf("%lld",&a[i]);
	}
	for (ll i = 1;i < n;i++) {
		ans *= min(a[i],a[i + 1]);
		ans %= M;
	}
	printf("%lld",ans);
	return 0;
}
0