Submission #745754

#TimeUsernameProblemLanguageResultExecution timeMemory
745754vjudge1Fancy Fence (CEOI20_fancyfence)C++14
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; #define int long long const int MOD = 1e9 +7; signed main() { int n; cin >> n; vector<int> h(n), w(n); int cnt = 0; for(int i = 0; i < n; i++){ cin >> h[i]; } for(int i = 0; i < n; i++){ cin >> w[i]; cnt = (cnt + w[i]) % MOD; } cout << (cnt * (cnt + 1) / 2 * h[0] * (h[0] + 1) / 2) % MOD << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...