Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #include <iostream>
  2. #include <set>
  3. using namespace std;
  4.  
  5. const int jednako=(1<<16)-1;
  6. bool bio[252][1<<16];
  7. int n, cost[5], mask[252];
  8. string s[4];
  9. set <pair <int,int> > s[252];
  10. pair <int,int> p;
  11.  
  12. void f(int cnt, int maska, int next, int rj, int x, int y)
  13. {
  14. if (maska==jednako || x==3 && y==3) {
  15. s[cnt].insert(p=make_pair(rj,next));
  16. return;
  17. }
  18.  
  19. for (int i=0;i<4;i++) {
  20. for (int j=0;j<4-i;j++) {
  21.  
  22. }
  23. }
  24. }
  25.  
  26. int main()
  27. {
  28. cin >> n;
  29. for (int i=1;i<5;i++) cin >> cost[i];
  30.  
  31. for (int i=0;i<4;i++) {
  32. cin >> s[i];
  33. }
  34.  
  35. for (int i=0;i<n;i++) {
  36. for (int j=0;j<4;j++) {
  37. if (s[j][i]=='*') mask[i/4]|=(1<<((i/4)*4+j));
  38. }
  39. }
  40.  
  41. for (int i=0;i<=n/4;i++) {
  42. f(i,mask[i],mask[i+1],0,0,0);
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement