| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1358403 | ffeyyaae_ | Fancy Fence (CEOI20_fancyfence) | C++20 | 0 ms | 344 KiB |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5+5;
const int mod = 1e9+7;
int n;
int h[N], w[N];
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> n;
for(int i=0;i<n;i++) cin >> h[i];
int sum=0;
for(int i=0;i<n;i++)
{
cin >> w[i];
sum = (sum+w[i])%mod;
}
int x = ((h[0]*(h[0]+1))/2)%mod;
int y = ((sum*(sum+1))/2)%mod;
cout << x*y%mod << "\n";
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
