| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 945103 | Reverberate | Fancy Fence (CEOI20_fancyfence) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define INF 1e18
#define DEBUG 0
#define MOD 1e9 + 6
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, W = 0, H = 0; cin >> n;
for(int i = 0; i < n; i++){
int h; cin >> h;
H = h;
}
for(int i = 0; i < n; i++){
int w; cin >> w;
W += w;
}
int temp = (((H%MOD)*((H%MOD)+1))%MOD)/2;
int temp2 = (((W%MOD)*((W%MOD)+1))%MOD)/2;
int temp3 = (temp*temp2)%MOD;
cout << temp3;
}
