CodeChef submission 857890 (C) plaintext list. Status: CE, problem DAILY, contest COOK19. By popliumang (popliumang), 2012-02-19 23:59:02.

#include<stdio.h> #include<stdlib.h> #include<conio.h> int fact(int); int main() { int n,x,i,j,*p,*o; int ans1=0; int ans=0; //p = (int*)calloc( n,54*sizeof(int) ); int a[n][54]; int cmprt = (54*n)/6; if(n<=10 && n>=1 && x<=6 && x>=1) { for(i=0;i<n;i++) { for(j =0;j<54;j++) { //printf("hey\n"); if(a[j][i]==0 || a[j][i] == 1) { continue; } else { break; } } } int c =0; o = p; int m =0; for( i =0;i<n;i++) { //p = p+6; for(j =m;j<54;j++) { if(j%6 == 0) { m = m + 6; } if(a[i][j] == 0) { c++; } } } ans1 = fact(c-x)*fact(x); ans = fact(c)/ans1; } //printf("\n"); // printf("\n%d\numang",c); getch(); return 0; } int fact(int b) { int k,i; if(b == 0) { k = 1; } if(b<0) { k = 1; } else { k = 1; for(i =1;i<=b;i++) { k = i*k; } } return (k); }

## Comments

**Please login at the top to post a comment.**