# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23145 | ainta | Unifying Values (KRIII5_UV) | C++14 | 99 ms | 1232 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/*#include<cstdio>
#include<algorithm>
using namespace std;
int P[110], Mod = 1000000007, n, w[60], Comb[5110][110], C[110][110];
int D[51][5010], sum;
int main(){
int i, j, k;
for(i=0;i<=5101;i++){
Comb[i][0]=1;
for(j=1;j<=100&&j<=i;j++){
Comb[i][j]=(Comb[i-1][j-1]+Comb[i-1][j])%Mod;
}
}
for(i=1;i<=100;i++){
int s = 0;
for(j=1;j<i;j++){
s = (s + 1ll * P[j]*(i-j))%Mod;
}
P[i] = (i - s + Mod)%Mod;
}
C[0][0] = 1;
for(i=0;i<100;i++){
for(j=0;j<=100;j++){
for(k=0;k+j<=100;k++){
C[j+k][i+1] = (C[j+k][i+1] + 1ll * C[j][i] * P[k])%Mod;
}
}
}
scanf("%d",&n);
for(i=1;i<=n;i++)scanf("%d",&w[i]);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |