結果
| 問題 | No.1096 Range Sums |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-08-20 21:51:35 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 7 ms / 2,000 ms |
| + 287µs | |
| コード長 | 1,024 bytes |
| 記録 | |
| コンパイル時間 | 2,088 ms |
| コンパイル使用メモリ | 329,184 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-14 06:37:53 |
| 合計ジャッジ時間 | 3,181 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include<bits/stdc++.h>
/*
--> Programmed by katamori1310 <--
???
Chillin with Blue Archive
*/
#define int long long
#define ull unsigned long long
#define fi first
#define se second
#define aris ""
using namespace std;
const int MAXN = 100000;
const int MOD = 1e9 + 7;
const int MAXP = 1e6;
const int INF = 1e18;
const int MODE = MOD - 2;
/*
I love Aris and Kei at the same time
? ? ? Pampakapam ? ? ?
*/
inline void kei(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
int n;
int a[2 * MAXN + 5];
int pfs[2 * MAXN + 5];
void solve(){
cin >> n;
int res = 0;
for(int i = 1; i <= n; ++i) {
int a;
cin >> a;
res += a * i * (n - i + 1);
}
cout << res << "\n";
}
signed main(){
if(fopen(aris".inp", "r")){
freopen(aris".inp", "r", stdin);
freopen(aris".out", "w", stdout);
}
kei();
int T;
// cin >> T;
T = 1;
while(T--){
solve();
}
return 0;
}
// ???
vjudge1