結果
| 問題 | No.3613 Legendary Bread Maker |
| コンテスト | |
| ユーザー |
mocchi
|
| 提出日時 | 2026-08-06 14:49:27 |
| 言語 | C++23(gnu拡張gcc16) (gcc 16.1.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 2,000 ms |
| + 491µs | |
| コード長 | 596 bytes |
| 記録 | |
| コンパイル時間 | 4,676 ms |
| コンパイル使用メモリ | 350,288 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-06 14:49:38 |
| 合計ジャッジ時間 | 3,896 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| サンプル | 0 % | AC * 3 |
| 小課題1 | 10 % | AC * 5 |
| 小課題2 | 40 % | AC * 13 |
| 小課題3 | 50 % | AC * 23 |
| 合計 | 2 * 100% = 200 点 |
ソースコード
#include <cassert>
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
constexpr int inf = 2e9;
/*
#include <atcoder/all>
using namespace atcoder;
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/math/common_factor_rt.hpp>
namespace mp = boost::multiprecision;
*/
using ll = long long;
int main()
{
int N;
cin >> N;
vector A(N,0);
rep(i,N) cin >> A[i];
ll ans = 0;
ll now_size = A[0];
for (int i = 1; i < N; i++)
{
ans += now_size * A[i];
now_size += A[i];
}
cout << ans << endl;
}
mocchi