Submission #906413

#TimeUsernameProblemLanguageResultExecution timeMemory
906413LudisseyFancy Fence (CEOI20_fancyfence)C++14
0 / 100
1 ms600 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int n,m; int clc(int x) { return ((x*(x+1))/2); } signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> n; int H; int width=0; for (int i = 0; i < n; i++) cin >> H; for (int i = 0; i < n; i++) { int x; cin >> x; width+=x; } cout << clc(width)*clc(H) << "\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...