Submission #745902

#TimeUsernameProblemLanguageResultExecution timeMemory
745902vjudge1Fancy Fence (CEOI20_fancyfence)C++17
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; #define int long long const int mod=1000000007; int32_t main() { int s; cin>>s; int h[s]; int w[s]; int wossz = 0; for (int i=0; i<s; i++) cin >> h[i]; int hossz = h[0]; for(int i=0; i<s; i++){ cin>>w[i]; wossz += w[i]; } cout << (((((hossz*(hossz+1)/2)%mod) * wossz)%mod)*(wossz+1)/2)%mod<<"\n"; 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...