제출 #1125692

#제출 시각아이디문제언어결과실행 시간메모리
1125692EfeBabagilFancy Fence (CEOI20_fancyfence)C++20
15 / 100
59 ms1864 KiB
#include <bits/stdc++.h> #include <stdio.h> using namespace std; #define int long long int mod=1e9+7; int32_t main() { int n; cin>>n; vector<pair<int,int>> fences(n); int h=0; for(int i=0;i<n;i++) { cin>>fences[i].first; h=fences[i].first; } int sum=0; for(int i=0;i<n;i++) { cin>>fences[i].second; sum=(sum+fences[i].second)%mod; } int row, col; row=(((h+1)*h)/2)%mod; col=(((sum+1)*sum)/2)%mod; cout<<(row*col)%mod; 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...