Submission #746000

#TimeUsernameProblemLanguageResultExecution timeMemory
746000vjudge1Fancy Fence (CEOI20_fancyfence)C++14
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; int main(){ long long h, w; long long wsum = 0; long long n; cin >> n; for(int i = 0; i < n; i++){ cin >> h; } for(int i = 0; i < n; i++){ cin >> w; wsum += w; wsum = wsum%1000000007; } long long ans = wsum * (wsum+1); ans = ans%1000000007; ans = h; ans = ans%1000000007; ans= (h+1); ans = ans%1000000007; while(ans % 4 != 0){ ans += 1000000007; } ans /= 4; cout << ans; }
#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...