#include<bits/stdc++.h>
using namespace std;
#define int long long
int n, w, h;
const int mod = (int)1e9+7;
int qexp(int a, int b) {
a%=mod;
int res=1;
while(b){
if(b&1)res = res*a%mod;
a = a*a%mod;
b>>=1;
}
return res;
}
int C(int n, int k) {
int x = 1, y = 1;
for(int i=0; i<k-1; ++i){
y*=n-i;
x*=k-i;
y%=mod;
x%=mod;
}
return (y*qexp(x,mod-2))% mod;
}
int tri(int intelligence, int yeet){
return (intelligence*(intelligence-1))*(yeet*(yeet-1))/4%mod;
}
int32_t main(){
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
cin>>n;
for(int i=0; i<n; ++i){
cin>>h;
}
for(int i=0; i<n; ++i){
int l;
cin>>l;
w+=l;
}
cout<<tri(w, h);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
312 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
316 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
328 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
292 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
308 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |