# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
444993 | 2021-07-16T07:53:19 Z | fuad27 | Fancy Fence (CEOI20_fancyfence) | C++14 | 1000 ms | 204 KB |
#include<bits/stdc++.h> using namespace std; #define int long long #define mod 1000000007 int M(int a, int b) { a%=mod; b%=mod; int sum = 0; for(int i = 0;i<b;i++) { sum+=a; sum%=mod; } return sum; } int32_t main () { int n, m; cin >> n; int sumW = 0; for(int i = 0;i<n;i++) { int h; cin >> h; m = h; m%=mod; } for(int i = 0;i<n;i++) { int w; cin >> w; sumW += w%mod; sumW%=mod; } cout<<M(M(sumW%mod, (sumW+1)%mod), M(m%mod, (m+1)%mod))/4<<"\n"; }
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 | 1 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1085 ms | 204 KB | Time limit exceeded |
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 | - |