Submission #444973

#TimeUsernameProblemLanguageResultExecution timeMemory
444973fuad27Fancy Fence (CEOI20_fancyfence)C++14
0 / 100
1 ms204 KiB
#include<bits/stdc++.h> using namespace std; #define mod 1000000007 int main () { long long n, a = 0; cin >> n; long long sumW = 0, r = 0; for(int i = 0;i<n;i++) { long long W; cin >> W; a = W; } for(int i = 0;i<n;i++) { long long p; cin >> p; sumW += p; sumW%=mod; } a%=mod; sumW%=mod; a*=(a+1); a%=mod; sumW*=(sumW+1); sumW%=mod; cout<<(a/2)*(sumW/2)<<endl; }

Compilation message (stderr)

fancyfence.cpp: In function 'int main()':
fancyfence.cpp:7:22: warning: unused variable 'r' [-Wunused-variable]
    7 |  long long sumW = 0, r = 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...