# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19740 | jihoon | 동전 (kriii4_E) | C++98 | 165 ms | 263228 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>
#define je 1000000007;
long long bae[256][512][256];
int main(){
int n,coverage=1,cal;
scanf("%d",&n);
bae[0][0][0]=1;
for(int i=0;i<n;i++){
for(int j=0;j<=511;j++){
for(int k=0;k<=i;k++){
bae[i+1][j][0]+=bae[i][j][k];
bae[i+1][j][0]%=je;
cal=j;
cal^=k;cal^=k+1;
bae[i+1][cal][k+1]+=bae[i][j][k];
bae[i+1][cal][k+1]%=je;
}
}
}
for(int j=1;j<=n;j++){
bae[n][0][0]+=bae[n][0][j];
bae[n][0][0]%=je;
}
printf("%d",bae[n][0][0]);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |