Submission #2161

#TimeUsernameProblemLanguageResultExecution timeMemory
2161jwvg0425지우개 (GA4_eraser)C++98
22 / 100
1000 ms2448 KiB
#include<stdio.h> #include<stdlib.h> #include<algorithm> #include<vector> using namespace std; #define MOD 1000000007 int n; long long int a[100000]; long long int v,s[100000]; int main() { int i,j,k; scanf("%d",&n); for(i=0;i<n;i++)scanf("%lld",&a[i]); sort(&a[0],&a[n]); for(i=0;i<n-2;i++) { for(j=i+1;j<n-1;j++) { for(k=j+1;k<n;k++) { v=(v+(a[i]*a[j]*a[k]))%MOD; } } } printf("%lld",v); }
#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...