# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
445012 | 2021-07-16T08:41:28 Z | fuad27 | Fancy Fence (CEOI20_fancyfence) | C++14 | 1 ms | 204 KB |
#include<bits/stdc++.h> using namespace std; #define mod 1000000007 typedef long long ll; #define int long long ll rec(ll a, ll b) { ll x = 1; if(a%2 == 0) { x*=(a/2)%mod; x*=(a+1); } else { x*=((a+1)/2)%mod; x*=a; } ll y = 1; if(b%2 == 0) { y*=(b/2)%mod; y*=b+1; } else { y*=((b+1)/2)%mod; y*=b; } return (x%mod * y%mod)%mod; } int32_t main () { ll n, m; cin >> n; ll sumW = 0; for(ll i = 0;i<n;i++) { ll h; cin >> h; m = h; } for(ll i = 0;i<n;i++) { ll w; cin >> w; sumW += w; } cout<<rec(sumW, m)<<endl; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |