Submission #2595

#TimeUsernameProblemLanguageResultExecution timeMemory
2595pull601지우개 (GA4_eraser)C11
0 / 100
8 ms1476 KiB
#include<stdio.h> int d[100001]; int main() { long long num=0; int n,m,i,j,k,max=0; scanf("%d",&n); for(i=1;i<=n;i++){ printf("%d",&m); if(max<m) max=m; d[m]+=1; } for(i=1;i<=max;i++){ if(d[i]==0) continue; for(j=i+1;j<=max;j++){ if(d[j]==0) continue; for(k=j+1;k<=max;){ if(d[k]==0) continue; num=num+i*j*k*d[i]*d[j]*d[k]; } } }printf("%d",num%1000000007); 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...