摘要: #include<bits/stdc++.h> using namespace std; long long p[2000], sz, Ans, n, k; long long q[10000];//储存生成的index数 long long fac[15];//阶乘 int size; void 阅读全文
posted @ 2024-04-07 13:04 nameko 阅读(5) 评论(0) 推荐(0)
摘要: 1. 判定 (染色法) #include<bits/stdc++.h> using namespace std; const int N = 100010, M = 200010; int n, m; int g[N], cnt, color[N]; struct node{ int nxt,to; 阅读全文
posted @ 2023-11-14 20:20 nameko 阅读(26) 评论(0) 推荐(0)
摘要: 1.求最大值最小 while (l <= r){ mid = (l + r) >> 1; if (check(mid)) ans = mid, r = mid - 1; else l = mid + 1; } 例题 洛谷p3853 路标设置 code#include<bits/stdc++.h> u 阅读全文
posted @ 2023-08-12 10:05 nameko 阅读(25) 评论(0) 推荐(0)