// File: 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
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x1e8(%rbp)
movq %rdi, -0x18(%rbp)
movl 0x2da44(%rip), %eax     # 0x7a290
addl $0x1, %eax
movl %eax, 0x2da3b(%rip)     # 0x7a290
testb $0x1, 0xb9f6b8(%rip)    # 0xbebf14
je 0x4c860
jmp 0x4c87f
leaq 0xe8d2(%rip), %rdi      # 0x5b139
leaq 0xe8d3(%rip), %rsi      # 0x5b141
movl $0x135, %edx            # imm = 0x135
leaq 0xea57(%rip), %rcx      # 0x5b2d1
callq 0x31a0
movq -0x1e8(%rbp), %rdi
callq 0x59a0
cmpq $0x0, %rax
jne 0x4c89b
fldz
fstpt -0x10(%rbp)
jmp 0x4d2d8
movq -0x1e8(%rbp), %rdi
callq 0xe060
movq -0x1e8(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0xe090
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x176e0
movq -0x1e8(%rbp), %rdi
callq 0xe060
movq -0x1e8(%rbp), %rdi
movq %rax, -0x40(%rbp)
callq 0xe090
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x177b0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x177f0
movq -0x1e8(%rbp), %rdi
callq 0xe090
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x177f0
movq -0x1e8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x17720
movq -0x1e8(%rbp), %rsi
movq %rax, -0x60(%rbp)
leaq 0xb9f667(%rip), %rdi    # 0xbebfb0
callq 0x4e520
cmpq $0x0, %rax
je 0x4c971
movq -0x1e8(%rbp), %rsi
leaq 0xb9f64e(%rip), %rdi    # 0xbebfb0
callq 0x4e580
fldt (%rax)
fstpt -0x10(%rbp)
jmp 0x4d2d8
movq -0x1e8(%rbp), %rdi
callq 0x59a0
movl %eax, -0x64(%rbp)
movl $0x0, -0x68(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0x4ca68
movq -0x1e8(%rbp), %rdi
movslq -0x68(%rbp), %rsi
callq 0x178f0
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x1e9(%rbp)
jl 0x4c9d2
movq -0x1e8(%rbp), %rdi
movslq -0x68(%rbp), %rsi
callq 0x178f0
cmpl $0xc350, (%rax)         # imm = 0xC350
setl %al
movb %al, -0x1e9(%rbp)
movb -0x1e9(%rbp), %al
testb $0x1, %al
jne 0x4c9de
jmp 0x4c9e0
jmp 0x4c9ff
leaq 0xe842(%rip), %rdi      # 0x5b229
leaq 0xe753(%rip), %rsi      # 0x5b141
movl $0x141, %edx            # imm = 0x141
leaq 0xe8d7(%rip), %rcx      # 0x5b2d1
callq 0x31a0
movq -0x1e8(%rbp), %rdi
movl -0x68(%rbp), %eax
movl %eax, -0x1f4(%rbp)
movslq -0x68(%rbp), %rsi
callq 0x178f0
movl -0x1f4(%rbp), %edx
movq -0x1e8(%rbp), %rdi
movslq (%rax), %rcx
leaq 0x6a9c61(%rip), %rax    # 0x6f6690
movl %edx, (%rax,%rcx,4)
movl 0x2d858(%rip), %eax     # 0x7a290
movl %eax, -0x1f0(%rbp)
movslq -0x68(%rbp), %rsi
callq 0x178f0
movl -0x1f0(%rbp), %edx
movslq (%rax), %rcx
leaq 0x6da979(%rip), %rax    # 0x7273d0
movl %edx, (%rax,%rcx,4)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x4c987
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x70(%rbp)
movl -0x70(%rbp), %eax
cmpl 0x648181(%rip), %eax    # 0x694c00
jge 0x4cce1
movslq -0x6c(%rbp), %rax
leaq 0xa18a80(%rip), %rdi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x17980
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x1f8(%rbp)
movslq -0x70(%rbp), %rax
leaq 0x8f3ad9(%rip), %rdi    # 0x940590
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x59a0
movq %rax, %rcx
movl -0x1f8(%rbp), %eax
cmpl %ecx, %eax
jge 0x4cb65
movslq -0x70(%rbp), %rax
leaq 0x8f3ab1(%rip), %rdi    # 0x940590
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x74(%rbp), %rsi
callq 0x178f0
movslq (%rax), %rcx
leaq 0x6da8d7(%rip), %rax    # 0x7273d0
movl (%rax,%rcx,4), %eax
cmpl 0x2d78e(%rip), %eax     # 0x7a290
jne 0x4cb55
movslq -0x6c(%rbp), %rcx
leaq 0xa18a01(%rip), %rax    # 0xa65510
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x200(%rbp)
movslq -0x70(%rbp), %rax
leaq 0x8f3a68(%rip), %rdi    # 0x940590
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x74(%rbp), %rsi
callq 0x178f0
movq -0x200(%rbp), %rdi
movslq (%rax), %rax
leaq 0x6a9b47(%rip), %rsi    # 0x6f6690
shlq $0x2, %rax
addq %rax, %rsi
callq 0xdff0
jmp 0x4cb57
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x4caa3
movslq -0x6c(%rbp), %rax
leaq 0xa189a0(%rip), %rdi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x59a0
cmpq $0x0, %rax
jbe 0x4ccd1
movl $0x0, -0x78(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x204(%rbp)
movslq -0x6c(%rbp), %rax
leaq 0xa1896f(%rip), %rdi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x59a0
movq %rax, %rcx
movl -0x204(%rbp), %eax
cmpl %ecx, %eax
jge 0x4ccc8
cmpl $0x0, -0x78(%rbp)
jle 0x4cc37
movslq -0x6c(%rbp), %rax
leaq 0xa18941(%rip), %rdi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x78(%rbp), %rsi
callq 0x178f0
movl (%rax), %eax
movl %eax, -0x208(%rbp)
movslq -0x6c(%rbp), %rax
leaq 0xa1891e(%rip), %rdi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rdi
movl -0x78(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x178f0
movq %rax, %rcx
movl -0x208(%rbp), %eax
cmpl (%rcx), %eax
jle 0x4cc16
jmp 0x4cc35
leaq 0xe62b(%rip), %rdi      # 0x5b248
leaq 0xe51d(%rip), %rsi      # 0x5b141
movl $0x14f, %edx            # imm = 0x14F
leaq 0xe6a1(%rip), %rcx      # 0x5b2d1
callq 0x31a0
jmp 0x4cc37
movslq -0x6c(%rbp), %rax
leaq 0xa188ce(%rip), %rdi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x78(%rbp), %rsi
callq 0x178f0
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x209(%rbp)
jl 0x4cc8b
movslq -0x6c(%rbp), %rax
leaq 0xa188a3(%rip), %rdi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x78(%rbp), %rsi
callq 0x178f0
movl (%rax), %eax
cmpl -0x64(%rbp), %eax
setl %al
movb %al, -0x209(%rbp)
movb -0x209(%rbp), %al
testb $0x1, %al
jne 0x4cc97
jmp 0x4cc99
jmp 0x4ccb8
leaq 0xe5c2(%rip), %rdi      # 0x5b262
leaq 0xe49a(%rip), %rsi      # 0x5b141
movl $0x150, %edx            # imm = 0x150
leaq 0xe61e(%rip), %rcx      # 0x5b2d1
callq 0x31a0
jmp 0x4ccba
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x4cb8d
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x4ccd3
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x4ca76
movslq -0x6c(%rbp), %rax
leaq 0xa18824(%rip), %rsi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rsi
leaq 0xa18816(%rip), %rdi    # 0xa65510
callq 0x4e3a0
movslq -0x6c(%rbp), %rax
leaq 0xa18806(%rip), %rsi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rsi
leaq 0xa187f8(%rip), %rdi    # 0xa65510
callq 0x4e3e0
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
leaq 0xa187e4(%rip), %rcx    # 0xa65510
subq %rcx, %rax
movl $0x18, %ecx
cqto
idivq %rcx
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
cmpl 0x647ebb(%rip), %eax    # 0x694c00
jg 0x4cd49
jmp 0x4cd68
leaq 0xe534(%rip), %rdi      # 0x5b284
leaq 0xe3ea(%rip), %rsi      # 0x5b141
movl $0x158, %edx            # imm = 0x158
leaq 0xe56e(%rip), %rcx      # 0x5b2d1
callq 0x31a0
movl $0x1, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x4cdea
movslq -0x84(%rbp), %rax
leaq 0xa18785(%rip), %rdi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rdi
movl -0x84(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0xa1876c(%rip), %rsi    # 0xa65510
imulq $0x18, %rax, %rax
addq %rax, %rsi
callq 0x4e420
testb $0x1, %al
jne 0x4cdb6
jmp 0x4cdb8
jmp 0x4cdd7
leaq 0xe4cd(%rip), %rdi      # 0x5b28c
leaq 0xe37b(%rip), %rsi      # 0x5b141
movl $0x15a, %edx            # imm = 0x15A
leaq 0xe4ff(%rip), %rcx      # 0x5b2d1
callq 0x31a0
jmp 0x4cdd9
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x4cd72
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0x4ce2a
movslq -0x88(%rbp), %rax
leaq 0x7ce803(%rip), %rdi    # 0x81b610
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x17980
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x4cdf4
movl $0x0, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x4cef7
movslq -0x8c(%rbp), %rcx
leaq 0xa186bf(%rip), %rax    # 0xa65510
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0xe060
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
callq 0xe090
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xe0c0
testb $0x1, %al
jne 0x4ce9e
jmp 0x4cee1
leaq -0xa0(%rbp), %rdi
callq 0xe100
movl (%rax), %eax
movl %eax, -0xac(%rbp)
movslq -0xac(%rbp), %rax
leaq 0x7ce750(%rip), %rdi    # 0x81b610
imulq $0x18, %rax, %rax
addq %rax, %rdi
leaq -0x8c(%rbp), %rsi
callq 0xdff0
leaq -0xa0(%rbp), %rdi
callq 0xe120
jmp 0x4ce85
jmp 0x4cee3
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x4ce34
movslq -0x64(%rbp), %rax
movq %rax, -0x220(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x4e660
movq -0x220(%rbp), %rsi
movq -0x218(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x4e680
jmp 0x4cf31
leaq -0xc9(%rbp), %rdi
callq 0x4e6f0
movslq -0x64(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x4e710
movq -0x230(%rbp), %rsi
movq -0x228(%rbp), %rdx
leaq -0xf8(%rbp), %rdi
callq 0x4e730
jmp 0x4cf77
leaq -0xf9(%rbp), %rdi
callq 0x4e7a0
movl $0x0, -0x100(%rbp)
movl -0x100(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0x4d0ef
movslq -0x100(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x4e7c0
movq %rax, %rdi
movslq -0x6c(%rbp), %rsi
callq 0x4e7e0
jmp 0x4cfbd
movslq -0x100(%rbp), %rcx
leaq 0x7ce645(%rip), %rax    # 0x81b610
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
callq 0xe060
movq %rax, -0x110(%rbp)
movq -0x108(%rbp), %rdi
callq 0xe090
movq %rax, -0x118(%rbp)
leaq -0x110(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xe0c0
testb $0x1, %al
jne 0x4d01b
jmp 0x4d0c2
leaq -0x110(%rbp), %rdi
callq 0xe100
movl (%rax), %eax
movl %eax, -0x11c(%rbp)
movslq -0x100(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x4e7c0
movq %rax, %rdi
movslq -0x11c(%rbp), %rsi
callq 0x4e870
fld1
fchs
fstpt (%rax)
leaq -0x110(%rbp), %rdi
callq 0xe120
jmp 0x4cfff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0xc9(%rbp), %rdi
callq 0x4e6f0
jmp 0x4d2e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0xf9(%rbp), %rdi
callq 0x4e7a0
jmp 0x4d2ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x4d2be
movslq -0x100(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x4e870
fld1
fchs
fstpt (%rax)
movl -0x100(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x100(%rbp)
jmp 0x4cf8d
movslq -0x6c(%rbp), %rax
movq %rax, -0x240(%rbp)
leaq -0x139(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x4e710
movq -0x240(%rbp), %rsi
movq -0x238(%rbp), %rdx
leaq -0x138(%rbp), %rdi
callq 0x4e730
jmp 0x4d129
leaq -0x139(%rbp), %rdi
callq 0x4e7a0
movl $0x0, -0x140(%rbp)
movl -0x140(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x4d197
movslq -0x140(%rbp), %rsi
leaq -0x138(%rbp), %rdi
callq 0x4e870
fld1
fchs
fstpt (%rax)
movl -0x140(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x140(%rbp)
jmp 0x4d13f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x139(%rbp), %rdi
callq 0x4e7a0
jmp 0x4d2be
leaq -0x1b0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
leaq -0x138(%rbp), %rcx
callq 0x4e890
jmp 0x4d1ba
leaq -0x1c8(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x4ed10
movq -0x258(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x4ed30
fstpt -0x24c(%rbp)
jmp 0x4d1e8
movq -0x1e8(%rbp), %rsi
fldt -0x24c(%rbp)
fchs
fstpt -0x1e0(%rbp)
fldt -0x1e0(%rbp)
fstpt -0x26c(%rbp)
leaq 0xb9eda0(%rip), %rdi    # 0xbebfb0
callq 0x4e580
movq %rax, -0x260(%rbp)
jmp 0x4d21e
movq -0x260(%rbp), %rax
fldt -0x26c(%rbp)
fstpt (%rax)
fldt -0x1e0(%rbp)
fstpt -0x10(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x4f190
leaq -0x1b0(%rbp), %rdi
callq 0x4f1f0
leaq -0x138(%rbp), %rdi
callq 0x4f190
leaq -0xf8(%rbp), %rdi
callq 0x4f190
leaq -0xc8(%rbp), %rdi
callq 0x4f230
jmp 0x4d2d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x4d2b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x4f190
leaq -0x1b0(%rbp), %rdi
callq 0x4f1f0
leaq -0x138(%rbp), %rdi
callq 0x4f190
leaq -0xf8(%rbp), %rdi
callq 0x4f190
leaq -0xc8(%rbp), %rdi
callq 0x4f230
jmp 0x4d2e4
fldt -0x10(%rbp)
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq -0xd8(%rbp), %rdi
callq 0x3480