#include #include #include using namespace std; bool is_kadomatsu(int a, int b, int c){ if(a==b || b==c || c==a) return false; if(ac) return true; if(a>b && b a(n); for(int i=0; i> a[i]; sort(a.begin(), a.end()); for(int i=0; i<(1< b(n); int x = 0, y = 1; for(int j=0; j>j)&1){ b[x] = a[j]; x += 2; }else{ b[y] = a[j]; y += 2; } } bool ok = true; for(int j=2; j