Submission #745766

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