結果

問題 No.2513 Power Eraser
ユーザー 👑 amentorimaruamentorimaru
提出日時 2023-06-13 23:03:46
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 356 bytes
コンパイル時間 2,776 ms
コンパイル使用メモリ 131,484 KB
実行使用メモリ 8,032 KB
最終ジャッジ日時 2023-10-20 20:50:47
合計ジャッジ時間 14,077 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 25 ms
4,348 KB
testcase_05 AC 4 ms
4,348 KB
testcase_06 AC 43 ms
4,348 KB
testcase_07 AC 13 ms
4,348 KB
testcase_08 AC 37 ms
4,348 KB
testcase_09 AC 57 ms
4,348 KB
testcase_10 AC 32 ms
4,348 KB
testcase_11 AC 4 ms
4,348 KB
testcase_12 AC 20 ms
4,348 KB
testcase_13 AC 3,456 ms
4,348 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
7_evil_case_1.txt -- -
7_evil_case_2.txt -- -
7_evil_case_3.txt -- -
7_evil_case_4.txt -- -
7_evil_case_5.txt -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include <atcoder/all>
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for(int i=0;i<n;i++)
	cin>>a[i];
  atcoder::modint998244353 ans = 1;
  for(int i=n-1;i>=0;i--){
    for (int j=0; j<i;j++) {
      ans *= a[i] - a[j];
    }
  }
  if ((n / 2) % 2) {
    ans *= -1;
  }
  cout << ans.val();
  return 0;
}
0