## 2024HBCPC：E Breakfast II

##### 输入样例1
32 20 2
14 15
2 2
4 8
8 4
6 2
2 8
7 7

##### 输出样例1
16.4759861592

##### 输入样例2
32 20 2
32 20
2 2
4 8
8 4
6 2
2 8
7 7

##### 输出样例2
5.9907047849


##### 实现代码
#pragma GCC optimize(3, "Ofast", "inline")
#include<bits/stdc++.h>
#define int long long
#define x first
#define y second
#define debug(x) cerr << #x" = " << x << '\n';
using namespace std;void solve()
{int n, m, k, b, e;cin >> n >> m >> k >> b >> e;vector<pair<int, int>> D(4);for (int i = 0; i < 4; i++) cin >> D[i].x >> D[i].y;struct node{int x, y;double a, b, c, ab, ac, bc, abc;};vector<node> s(k + 10);auto get= [](int x1, int y1, int x2, int y2){double dx = x1 - x2;double dy = y1 - y2;return sqrt(dx * dx + dy * dy);};double at = get(D[0].x, D[0].y, D[3].x, D[3].y);double bt = get(D[1].x, D[1].y, D[3].x, D[3].y);double ct = get(D[2].x, D[2].y, D[3].x, D[3].y);double ab = get(D[0].x, D[0].y, D[1].x, D[1].y);double ac = get(D[0].x, D[0].y, D[2].x, D[2].y);double bc = get(D[1].x, D[1].y, D[2].x, D[2].y);for (int i = 1; i <= k; i++){cin >> s[i].x >> s[i].y;double a = get(s[i].x, s[i].y, D[0].x, D[0].y);double b = get(s[i].x, s[i].y, D[1].x, D[1].y);double c = get(s[i].x, s[i].y, D[2].x, D[2].y);s[i].a = a + at;s[i].b = b + bt;s[i].c = c + ct;s[i].ab = a + ab + bt;s[i].ab = min(s[i].ab, b + ab + at);s[i].ac = a + ac + ct;s[i].ac = min(s[i].ac, c + ac + at);s[i].bc = b + bc + ct;s[i].bc = min(s[i].bc, c + bc + bt);s[i].abc = a + ab + bc + ct;s[i].abc = min(s[i].abc, a + ac + bc + bt);s[i].abc = min(s[i].abc, b + ab + ac + ct);s[i].abc = min(s[i].abc, b + bc + ac + at);s[i].abc = min(s[i].abc, c + ac + ab + bt);s[i].abc = min(s[i].abc, c + bc + ab + at);}int mx = (n + b - 1) / b;mx = max(mx, (m + e - 1) / e);vector<vector<double>> dp(k + 10, vector<double>(mx + 10, 1e18));for (int i = 0; i <= k; i++) dp[i][0] = 0;for (int i = 1; i <= k; i++){for (int j = 0; j <= mx; j++){dp[i][j] = dp[i - 1][j];if (j >= 1) dp[i][j] = min(dp[i][j], dp[i - 1][j - 1] + min(s[i].a, min(s[i].b, s[i].c)));if (j >= 2) dp[i][j] = min(dp[i][j], dp[i - 1][j - 2] + min(s[i].ab, min(s[i].ac, s[i].bc)));if (j >= 3) dp[i][j] = min(dp[i][j], dp[i - 1][j - 3] + s[i].abc);}}cout << fixed << setprecision(10) << dp[k][mx] << '\n';
}signed main()
{// freopen("Sample.in", "r", stdin);ios::sync_with_stdio(false);cin.tie(nullptr);int T = 1;// cin >> T;while (T--) solve();return 0;
}


### Mac连接虚拟机(Linux系统)

1.确定虚拟机的IP地址 ifconfig //终端命令&#xff0c;查询ip地址 sudo apt install net-tools 安装完成后再次执行 ifconfig&#xff1a; 2.安装SSH&#xff08;加密远程登录协议&#xff09; (1).安装OpenSSH服务器软件包&#xff1a; sudo apt-get install openssh-ser…

### 【CTF Web】CTFShow web5 Writeup（SQL注入+PHP+位运算）

web5 1 阿呆被老板狂骂一通&#xff0c;决定改掉自己大意的毛病&#xff0c;痛下杀手&#xff0c;修补漏洞。 解法 注意到&#xff1a; <!-- flag in id 1000 -->拦截很多种字符&#xff0c;连 select 也不给用了。 if(preg_match("/\|\"|or|\||\-|\\\|\/|\…