Submission #906414

# Submission time Handle Problem Language Result Execution time Memory
906414 2024-01-14T08:43:50 Z Ludissey Fancy Fence (CEOI20_fancyfence) C++14
0 / 100
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
 
int n,m;
int mod=1e9+7;
int clc(int x) { return (((x*(x+1))%mod)/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;
        width%=mod;
    }
    cout << (clc(width)*clc(H))%mod << "\n";
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -