| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1289437 | LIA | Fancy Fence (CEOI20_fancyfence) | C++17 | 1 ms | 572 KiB |
//
// Created by liasa on 10/11/2025.
//
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<ll>
const ll mod = 1e9 + 7;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
ll n;
cin >> n;
vll h(n), w(n);
ll H = 0, W = 0;
for (ll i = 0; i < n; ++i)
cin >> h[i];
for (ll i = 0; i < n; ++i)
cin >> w[i];
for (ll i = 0; i < n; ++i) {
H = max(H, h[i]);
W += w[i];
}
H++, W++;
ll ans = H * (H - 1) / 2;
ans *= W * (W - 1) / 2;
ans %= mod;
ans--;
cout << ans;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
