Submission #2228

#TimeUsernameProblemLanguageResultExecution timeMemory
2228ksmin1114지우개 (GA4_eraser)C++98
46 / 100
1000 ms1596 KiB
#include<stdio.h> #include<algorithm> using namespace std; int main(){ long long int n,a[100000],v=0; scanf("%lld",&n); int i,j,k; for(i=0;i<n;i++) scanf("%lld",&a[i]); sort(a,a+n); for(i=0;i<n-2;i++){ for(j=i+1;j<n-1;j++){ if(i==j)continue; for(k=j+1;k<n;k++){ if(a[i]!=a[j] && a[j]!=a[k] && a[i]!=a[k]){ v+=a[i]*a[j]*a[k]; } } } } printf("%lld",v%1000000007); }
#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...