// File: /workspace/github_cpp_makefile_star2_O2/Laakeri[P]Triangulator/src/setcover.cpp
// Function: SetCover::solveFrac(std::vector<int, std::allocator<int>>)
ld solveFrac(vector<int> univ) {
	git++;
	assert(hasInit);
	if (univ.size() == 0) return {};
	sort(univ.begin(), univ.end());
	univ.erase(unique(univ.begin(), univ.end()), univ.end());
	
	if (fracSol.count(univ)) {
		return fracSol[univ];
	}
	
	int n = univ.size();
	
	for (int i = 0; i < n; i++) {
		assert(univ[i] >= 0 && univ[i] < maxN);
		plc[univ[i]] = i;
		is[univ[i]] = git;
	}
	int m = 0;
	for (int i = 0; i < gm; i++) {
		sets[m].clear();
		for (int j = 0; j < (int)Gsets[i].size(); j++) {
			if (is[Gsets[i][j]] == git) {
				sets[m].push_back(plc[Gsets[i][j]]);
			}
		}
		if (sets[m].size() > 0) {
			for (int j = 0; j < (int)sets[m].size(); j++) {
				if (j > 0) assert(sets[m][j] > sets[m][j-1]);
				assert(sets[m][j] >= 0 && sets[m][j] < n);
			}
			m++;
		}
	}
	sort(sets, sets+m);
	auto last = unique(sets, sets+m);
	m = last - sets;
	assert(m <= gm);
	for (int i = 1; i < m; i++) {
		assert(sets[i] > sets[i-1]);
	}
	for (int i = 0; i < n; i++) {
		where[i].clear();
	}
	for (int i = 0; i < m; i++) {
		for (int x : sets[i]) {
			where[x].push_back(i);
		}
	}
#ifdef USE_GLPK
	glp_prob* lp = glp_create_prob();
	glp_set_obj_dir(lp, GLP_MIN);
	assert(glp_add_rows(lp, n) == 1);
	assert(glp_add_cols(lp, m) == 1);
	for (int i = 0; i < n; i++) {
		glp_set_row_bnds(lp, i+1, GLP_LO, 1, 0);
	}
	for (int i = 0; i < m; i++) {
		glp_set_col_bnds(lp, i+1, GLP_DB, 0, 1);
		glp_set_obj_coef(lp, i+1, 1);
	}
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < (int)where[i].size(); j++) {
			glpTempId[j+1] = where[i][j]+1;
			glpTempVal[j+1] = 1;
		}
		glp_set_mat_row(lp, i+1, (int)where[i].size(), glpTempId, glpTempVal);
	}
	glp_smcp param;
	glp_init_smcp(&param);
	param.msg_lev = GLP_MSG_OFF;
	glp_simplex(lp, &param);
	ld val = glp_get_obj_val(lp);
#else
	vector<vector<ld> > A(n);
	vector<ld> b(n);
	for (int i = 0; i < n; i++) {
		A[i].resize(m);
		for (int x : where[i]) {
			A[i][x] = -1;
		}
		b[i] = -1;
	}
	vector<ld> c(m);
	for (int i = 0; i < m; i++) {
		c[i] = -1;
	}
	LPSolver lps(A, b, c);
	vector<ld> sol;
	ld val = -lps.Solve(sol);
#endif
	fracSol[univ] = val;
	return val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
incl 0x147ef(%rip)           # 0x301c8
cmpb $0x0, 0xb86464(%rip)    # 0xba1e44
je 0x1be90
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
fldz
cmpq %rdi, %rsi
je 0x1be21
fstp %st(0)
callq 0x8dde
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x91de
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8818
leaq 0xb864bc(%rip), %rdi    # 0xba1ee0
movq %rbx, %rsi
callq 0x1c256
testq %rax, %rax
je 0x1ba47
leaq 0xb864a8(%rip), %rdi    # 0xba1ee0
movq %rbx, %rsi
callq 0x1c270
fldt (%rax)
jmp 0x1be21
movq (%rbx), %rax
movq %rbx, 0x20(%rsp)
movq 0x8(%rbx), %r13
subq %rax, %r13
shrq $0x2, %r13
movl 0x14768(%rip), %ecx     # 0x301c8
xorl %edx, %edx
testl %r13d, %r13d
movl $0x0, %esi
cmovgl %r13d, %esi
movq %rsi, 0x18(%rsp)
leaq 0x690b46(%rip), %rbp    # 0x6ac5c0
leaq 0x6c187f(%rip), %rbx    # 0x6dd300
cmpq %rdx, 0x18(%rsp)
je 0x1baa8
movl (%rax,%rdx,4), %esi
cmpq $0xc350, %rsi           # imm = 0xC350
jae 0x1be71
movl %edx, (%rbp,%rsi,4)
movslq (%rax,%rdx,4), %rsi
movl %ecx, (%rbx,%rsi,4)
incq %rdx
jmp 0x1ba81
leaq 0x9ff991(%rip), %r12    # 0xa1b440
xorl %edi, %edi
xorl %r8d, %r8d
movslq 0x62f075(%rip), %rcx    # 0x64ab30
movslq %r8d, %rax
cmpq %rcx, %rdi
jge 0x1bbb2
movl %r8d, 0x14(%rsp)
imulq $0x18, %rax, %rcx
leaq (%r12,%rcx), %r14
movq (%rcx,%r12), %rax
cmpq %rax, 0x8(%rcx,%r12)
je 0x1bae3
movq %rax, 0x8(%r14)
movq %rdi, 0x8(%rsp)
imulq $0x18, %rdi, %r12
leaq 0x8da9cd(%rip), %rax    # 0x8f64c0
addq %rax, %r12
xorl %r15d, %r15d
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jge 0x1bb38
movslq (%rax,%r15,4), %rax
movl (%rbx,%rax,4), %ecx
cmpl 0x146aa(%rip), %ecx     # 0x301c8
jne 0x1bb33
leaq (,%rax,4), %rsi
addq %rbp, %rsi
movq %r14, %rdi
callq 0x6402
incq %r15
jmp 0x1baf9
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
je 0x1bb99
shrq $0x2, %rcx
testl %ecx, %ecx
movl $0x0, %edx
cmovlel %edx, %ecx
xorl %edx, %edx
leaq 0x9ff8e5(%rip), %r12    # 0xa1b440
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %r8d
cmpq %rdx, %rcx
je 0x1bb94
testq %rdx, %rdx
je 0x1bb7d
movl (%rax,%rdx,4), %esi
cmpl -0x4(%rax,%rdx,4), %esi
jg 0x1bb7f
jmp 0x1be52
movl (%rax), %esi
testl %esi, %esi
js 0x1be33
incq %rdx
cmpl %r13d, %esi
jl 0x1bb65
jmp 0x1be33
incl %r8d
jmp 0x1bbaa
leaq 0x9ff8a0(%rip), %r12    # 0xa1b440
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %r8d
incq %rdi
jmp 0x1bab4
imulq $0x18, %rax, %r14
addq %r12, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x1d2e6
movq %r12, %rdi
movq %r14, %rsi
callq 0x1d9d6
subq %r12, %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
movq %rax, %rbp
cmpl %ebp, 0x62ef4d(%rip)    # 0x64ab30
jl 0x1beaf
movslq %ebp, %rbx
xorl %r15d, %r15d
incq %r15
cmpq %rbx, %r15
jge 0x1bc2f
leaq 0x18(%r12), %r14
leaq 0x18(%r12), %rsi
movq %r12, %rdi
callq 0x9fc0
movq %r14, %r12
testb %al, %al
jne 0x1bbef
leaq 0x66c5(%rip), %rdi      # 0x222dc
leaq 0x6573(%rip), %rsi      # 0x22191
leaq 0x66fc(%rip), %rcx      # 0x22321
movl $0x15a, %edx            # imm = 0x15A
callq 0x2150
imulq $0x18, 0x18(%rsp), %rax
xorl %ecx, %ecx
leaq 0x7b5902(%rip), %rbx    # 0x7d1540
cmpq %rcx, %rax
je 0x1bc59
movq (%rcx,%rbx), %rdx
cmpq %rdx, 0x8(%rcx,%rbx)
je 0x1bc53
movq %rdx, 0x8(%rcx,%rbx)
addq $0x18, %rcx
jmp 0x1bc3e
xorl %eax, %eax
leaq 0x90(%rsp), %r15
movl %eax, 0x90(%rsp)
cmpl %ebp, %eax
jge 0x1bcb3
movq %rbp, %r12
cltq
imulq $0x18, %rax, %rax
leaq 0x9ff7c2(%rip), %rcx    # 0xa1b440
movq (%rax,%rcx), %rbp
movq 0x8(%rax,%rcx), %r14
cmpq %r14, %rbp
je 0x1bca5
movslq (%rbp), %rax
imulq $0x18, %rax, %rdi
addq %rbx, %rdi
movq %r15, %rsi
callq 0x6402
addq $0x4, %rbp
jmp 0x1bc87
movl 0x90(%rsp), %eax
incl %eax
movq %r12, %rbp
jmp 0x1bc63
movslq %r13d, %r15
leaq 0x28(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r15, %rsi
callq 0x1c2d6
leaq 0x58(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r15, %rsi
callq 0x1c328
movslq %ebp, %r15
xorl %r12d, %r12d
fld1
fchs
fstpt 0x8(%rsp)
cmpq 0x18(%rsp), %r12
je 0x1bd4d
imulq $0x18, %r12, %r13
movq 0x28(%rsp), %rdi
addq %r13, %rdi
movq %r15, %rsi
callq 0x1c37a
movq (%r13,%rbx), %rax
movq 0x8(%r13,%rbx), %rcx
addq 0x28(%rsp), %r13
cmpq %rcx, %rax
je 0x1bd35
movslq (%rax), %rdx
movq (%r13), %rsi
shlq $0x4, %rdx
fldt 0x8(%rsp)
fstpt (%rsi,%rdx)
addq $0x4, %rax
jmp 0x1bd18
movq 0x58(%rsp), %rax
movq %r12, %rcx
shlq $0x4, %rcx
fldt 0x8(%rsp)
fstpt (%rax,%rcx)
incq %r12
jmp 0x1bcee
leaq 0x40(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movq %r15, %rsi
callq 0x1c328
movq 0x40(%rsp), %rax
xorl %ecx, %ecx
testl %ebp, %ebp
movl $0x0, %edx
cmovgl %ebp, %edx
shlq $0x4, %rdx
movq 0x20(%rsp), %rbx
cmpq %rcx, %rdx
je 0x1bd8e
fldt 0x8(%rsp)
fstpt (%rax,%rcx)
addq $0x10, %rcx
jmp 0x1bd7c
leaq 0x90(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x1c3ae
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0x90(%rsp), %rdi
callq 0x1c5ca
fstpt 0x8(%rsp)
leaq 0xb8610e(%rip), %rdi    # 0xba1ee0
movq %rbx, %rsi
callq 0x1c270
fldt 0x8(%rsp)
fchs
fld %st(0)
fstpt 0x8(%rsp)
fstpt (%rax)
leaq 0x70(%rsp), %rdi
callq 0x1cae4
leaq 0x90(%rsp), %rdi
callq 0x1c7e8
leaq 0x40(%rsp), %rdi
callq 0x1cae4
leaq 0x58(%rsp), %rdi
callq 0x1cae4
leaq 0x28(%rsp), %rdi
callq 0x1c80c
fldt 0x8(%rsp)
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6478(%rip), %rdi      # 0x222b2
leaq 0x6350(%rip), %rsi      # 0x22191
leaq 0x64d9(%rip), %rcx      # 0x22321
movl $0x150, %edx            # imm = 0x150
callq 0x2150
leaq 0x643f(%rip), %rdi      # 0x22298
leaq 0x6331(%rip), %rsi      # 0x22191
leaq 0x64ba(%rip), %rcx      # 0x22321
movl $0x14f, %edx            # imm = 0x14F
callq 0x2150
leaq 0x6401(%rip), %rdi      # 0x22279
leaq 0x6312(%rip), %rsi      # 0x22191
leaq 0x649b(%rip), %rcx      # 0x22321
movl $0x141, %edx            # imm = 0x141
callq 0x2150
leaq 0x62f2(%rip), %rdi      # 0x22189
leaq 0x62f3(%rip), %rsi      # 0x22191
leaq 0x647c(%rip), %rcx      # 0x22321
movl $0x135, %edx            # imm = 0x135
callq 0x2150
leaq 0x641e(%rip), %rdi      # 0x222d4
leaq 0x62d4(%rip), %rsi      # 0x22191
leaq 0x645d(%rip), %rcx      # 0x22321
movl $0x158, %edx            # imm = 0x158
callq 0x2150
movq %rax, %rbx
jmp 0x1bef4
jmp 0x1bf00
movq %rax, %rbx
jmp 0x1bf0d
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x1cae4
leaq 0x90(%rsp), %rdi
callq 0x1c7e8
leaq 0x40(%rsp), %rdi
callq 0x1cae4
jmp 0x1bf03
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x1cae4
leaq 0x28(%rsp), %rdi
callq 0x1c80c
movq %rbx, %rdi
callq 0x2340