Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <set>
- using namespace std;
- const int jednako=(1<<16)-1;
- bool bio[252][1<<16];
- int n, cost[5], mask[252];
- string s[4];
- set <pair <int,int> > s[252];
- pair <int,int> p;
- void f(int cnt, int maska, int next, int rj, int x, int y)
- {
- if (maska==jednako || x==3 && y==3) {
- s[cnt].insert(p=make_pair(rj,next));
- return;
- }
- for (int i=0;i<4;i++) {
- for (int j=0;j<4-i;j++) {
- }
- }
- }
- int main()
- {
- cin >> n;
- for (int i=1;i<5;i++) cin >> cost[i];
- for (int i=0;i<4;i++) {
- cin >> s[i];
- }
- for (int i=0;i<n;i++) {
- for (int j=0;j<4;j++) {
- if (s[j][i]=='*') mask[i/4]|=(1<<((i/4)*4+j));
- }
- }
- for (int i=0;i<=n/4;i++) {
- f(i,mask[i],mask[i+1],0,0,0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement