Submission #2227

#TimeUsernameProblemLanguageResultExecution timeMemory
2227ksmin1114지우개 (GA4_eraser)C++98
0 / 100
1000 ms1592 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("%d",&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("%d",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...