結果
| 問題 | No.8084 ゲームブックにトライ! |
| コンテスト | |
| ユーザー |
1_no_se
|
| 提出日時 | 2021-03-30 00:43:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 539 bytes |
| コンパイル時間 | 645 ms |
| コンパイル使用メモリ | 65,824 KB |
| 実行使用メモリ | 13,644 KB |
| 最終ジャッジ日時 | 2024-11-29 19:56:22 |
| 合計ジャッジ時間 | 30,416 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 TLE * 19 |
ソースコード
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#pragma GCC target ("avx2")
#include <iostream>
typedef long long ll;
using namespace std;
int N, A[100000];
ll res;
int main() {
scanf("%d", &N);
for (int i = 0; i < N; i++) {
scanf("%d", &A[i]);
if (A[i] >= 998244353)A[i] -= 998244353;
}
for (int i = 0; i < N; i++){
res += (ll)A[i] * (N - 1);
}
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if (A[i] + A[j] >= 998244353)res -= 998244353ll;
}
}
printf("%lld\n", res);
}
1_no_se