03 2022 档案

1937. OverCooked! 2 -- constructive algorithms,divide and conquer
摘要:1 #include <bits/stdc++.h> 2 //分块法 3 using namespace std; 4 5 template <class T>/*模板,表示给一个未排序的数组排序后对应的下标*/ 6 vector<int> make_index(const vector<T>& a 阅读全文
posted @ 2022-03-29 15:07 OopsOops 阅读(25) 评论(0) 推荐(0) 编辑
1967. 秃了,也变强了 -- dp,dfs and similar
摘要:1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 const int N = (1 << 8) + 1; 6 7 int n, m; 8 9 double a[N][N], dp[9][N][N]; 10 //二维数组的子矩阵和 11 d 阅读全文
posted @ 2022-03-29 09:17 OopsOops 阅读(28) 评论(0) 推荐(0) 编辑
1838. 老顽童锻炼计划 -- constructive algorithms,enumeration
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 using LL = long long; 4 #define eb(n) emplace_back(n) 5 vector<LL> ans; 6 inline LL trans(LL n) { 7 阅读全文
posted @ 2022-03-27 17:58 OopsOops 阅读(33) 评论(0) 推荐(0) 编辑
1932. 歪比巴卜 -- bitmasks,implementation
摘要:#include <bits/stdc++.h> using namespace std; using LL = long long; int a[1005]; int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) sca 阅读全文
posted @ 2022-03-27 12:32 OopsOops 阅读(79) 评论(0) 推荐(0) 编辑
1839. 课程集合 - Hash
摘要:差点点跑满了。。这他妈常数真的大 网上python解法一个都过不了 1 #include <bits/stdc++.h> 2 using namespace std; 3 using LL = long long; 4 map<LL, int> mp; 5 const LL comb[10][3] 阅读全文
posted @ 2022-03-24 23:57 OopsOops 阅读(30) 评论(0) 推荐(0) 编辑
1943. 数学难题 - math,enumeration
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 using LL = long long; 4 const LL P = 998244353; 5 int main(){ 6 int T; 7 cin>>T; 8 while(T--){ 9 L 阅读全文
posted @ 2022-03-24 15:54 OopsOops 阅读(37) 评论(0) 推荐(0) 编辑
1853. gangpener 买零食 - dp
摘要:1 #include<iostream> 2 #include<string> 3 #include<cstring> 4 #include<algorithm> 5 #include<cmath> 6 7 using namespace std; 8 9 int main() 10 { 11 in 阅读全文
posted @ 2022-03-24 14:17 OopsOops 阅读(14) 评论(0) 推荐(0) 编辑
1868. 一下子Accepted不了吧 - 并查集
摘要:#pragma GCC optimize("-Ofast","-funroll-all-loops") #include<bits/stdc++.h> //#define int long long using namespace std; const int N=1e6+10; int n,f[N 阅读全文
posted @ 2022-03-24 00:51 OopsOops 阅读(30) 评论(0) 推荐(0) 编辑
1854. hwf的三角形 - math
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 using LL = long long; 4 int main() 5 { 6 int T,n; 7 scanf("%d",&T); 8 while(T--) 9 { 10 scanf("%d" 阅读全文
posted @ 2022-03-23 23:49 OopsOops 阅读(17) 评论(0) 推荐(0) 编辑
1914. 不稳定折跃门 -- dp,dfs and similiar
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 using LL = long long; 4 const int N = 1e7 + 9; 5 int a[100]; 6 bool vis[N]; 7 int n, x; 8 int res 阅读全文
posted @ 2022-03-20 16:23 OopsOops 阅读(74) 评论(0) 推荐(0) 编辑
1928. 灵能矩阵 -- dp,bitmask
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 using LL = long long; 4 int mp[505][505], ans[505][505]; 5 bool dp[505][505]; 6 int n, m; 7 int ma 阅读全文
posted @ 2022-03-20 12:48 OopsOops 阅读(99) 评论(0) 推荐(0) 编辑
1916. HYX的膜法学习笔记 -- 并查集
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 #define p a[i].val 4 struct node{ 5 int val; 6 int cnt = 0; 7 }fa[100005]; 8 9 int vis[100005]; 10 阅读全文
posted @ 2022-03-18 09:18 OopsOops 阅读(29) 评论(0) 推荐(0) 编辑
1922. bugaosuni59的SSR---概率dp
摘要:1 #include <bits/stdc++.h> 2 using namespace std; 3 4 double a[100005], b[100005]; 5 double power(double a, int n) { 6 double res = 1.0; 7 for (; n; n 阅读全文
posted @ 2022-03-17 23:45 OopsOops 阅读(25) 评论(0) 推荐(0) 编辑

 
点击右上角即可分享
微信分享提示