結果
| 問題 | No.1096 Range Sums |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-10-23 21:59:52 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 2,000 ms |
| + 130µs | |
| コード長 | 546 bytes |
| 記録 | |
| コンパイル時間 | 2,192 ms |
| コンパイル使用メモリ | 328,624 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-15 20:32:45 |
| 合計ジャッジ時間 | 3,232 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
#define Task "bai1"
#define ll long long
#define ull unsigned long long
#define F first
#define S second
using namespace std;
const ll maxn = 2e5 + 5;
const ll MOD = 1e9 + 5;
ll n, x, ans;
int main()
{
ios_base::sync_with_stdio(0);
cout.tie(0);cin.tie(0);
if (fopen(Task".inp","r"))
{
freopen(Task".inp","r",stdin);
freopen(Task".out","w",stdout);
}
cin >> n;
for (int i = 1; i <= n; ++i)
{
cin >> x;
ans += x * i * (n - i + 1);
}
cout << ans;
}
vjudge1