ログインしてください。
提出 #53355438
ソースコード 拡げる
#include <bits/stdc++.h>
using namespace std;
int main() {
int n; cin >> n;
vector<long long> a(n);
long long ans = 0;
for (int i = 0; i < n; i++) {
cin >> a.at(i);
ans += a.at(i);
}
int count = 0;
for (int i = 0; i < n - 1; i++) {
for (int j = i + 1; j < n; j++) {
if (a.at(i) + a.at(j) >= 100000000) count++;
}
}
ans = ans * (n - 1) - count * 100000000;
cout << ans;
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - Sigma Problem |
| ユーザ | YuTo_QC |
| 言語 | C++ 20 (gcc 12.2) |
| 得点 | 0 |
| コード長 | 463 Byte |
| 結果 | WA |
| 実行時間 | 2207 ms |
| メモリ | 5668 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 0 / 300 | ||||||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt, 01_test_15.txt, 01_test_16.txt, 01_test_17.txt, 01_test_18.txt, 01_test_19.txt, 01_test_20.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_01.txt | AC | 1 ms | 3488 KiB |
| 00_sample_02.txt | AC | 1 ms | 3488 KiB |
| 01_test_01.txt | TLE | 2207 ms | 5596 KiB |
| 01_test_02.txt | TLE | 2207 ms | 5572 KiB |
| 01_test_03.txt | TLE | 2207 ms | 5668 KiB |
| 01_test_04.txt | TLE | 2207 ms | 5556 KiB |
| 01_test_05.txt | TLE | 2207 ms | 5640 KiB |
| 01_test_06.txt | TLE | 2207 ms | 5628 KiB |
| 01_test_07.txt | TLE | 2207 ms | 5600 KiB |
| 01_test_08.txt | TLE | 2207 ms | 5632 KiB |
| 01_test_09.txt | TLE | 2207 ms | 5620 KiB |
| 01_test_10.txt | TLE | 2207 ms | 5540 KiB |
| 01_test_11.txt | TLE | 2207 ms | 5576 KiB |
| 01_test_12.txt | TLE | 2207 ms | 5568 KiB |
| 01_test_13.txt | TLE | 2207 ms | 5592 KiB |
| 01_test_14.txt | WA | 537 ms | 3484 KiB |
| 01_test_15.txt | TLE | 2207 ms | 5592 KiB |
| 01_test_16.txt | TLE | 2207 ms | 4908 KiB |
| 01_test_17.txt | AC | 1 ms | 3540 KiB |
| 01_test_18.txt | AC | 1 ms | 3472 KiB |
| 01_test_19.txt | TLE | 2207 ms | 5640 KiB |
| 01_test_20.txt | TLE | 2207 ms | 5632 KiB |