摘要: 写的东西不一定都讲了。 F - Night of Full Moon 暴力模拟即可。 好像大家不会算复杂度。 D - 约瑟夫问题 oiwiki https://oi-wiki.org/misc/josephus/ 其中大家需要理解记住对数做法中的复杂度的计算。 H - 燃烧权杖 搜索能过。 这差不多 阅读全文
posted @ 2024-01-30 09:53 lyhy 阅读(53) 评论(0) 推荐(0) 编辑
摘要: Task4 //VEctor.hpp#include<bits/stdc++.h> using namespace std; template<typename T> class Vector{ private: int length; T * base; public: Vector(const 阅读全文
posted @ 2022-12-06 20:28 lyhy 阅读(17) 评论(0) 推荐(0) 编辑
摘要: task4 // pets.hpp#include <iostream> using namespace std; class MachinePets{ private: string nickname; public: MachinePets(const string s) : nickname{ 阅读全文
posted @ 2022-11-29 08:43 lyhy 阅读(18) 评论(0) 推荐(0) 编辑
摘要: task5 //vectorInt.hpp #pragma once #include<iostream> using namespace std; class vectorInt{ public : vectorInt(int len) : size{len}{ cout << "construc 阅读全文
posted @ 2022-11-02 19:03 lyhy 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 五、群论入门 群的定义 可以理解为: $群G(S, ) = 集合(S)+ 运算()$ 群的4个条件: 在运算$*$作用下: 1.封闭性 2.存在单位元 3.逆元存在 4.$*$ 运算满足结合律 子群与陪集 子群 如果 $H$ 为 $G $ 的一个子集,且($H$, $$)满足一个群,则($H$, $ 阅读全文
posted @ 2022-10-20 14:35 lyhy 阅读(306) 评论(0) 推荐(0) 编辑
摘要: task5 //Info.hpp#include<iostream> #include<math.h> #include<string> using namespace std; class Info{ public: Info (string a, string b, string c, int 阅读全文
posted @ 2022-10-19 22:22 lyhy 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 实验结论 task 4 Complex.hpp #include<iostream> #include<math.h> using namespace std; class Complex{ public: Complex (double x = 0, double y = 0) : real{x} 阅读全文
posted @ 2022-10-12 19:02 lyhy 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 四、组合数学 Prufer序列 long long fa[N], prufer[N], d[N]; long long n, m, ans; void get_Prufer(){ long long p = 1, tot = 0; for(long long i = 1; i <= n - 1; i 阅读全文
posted @ 2022-09-29 21:08 lyhy 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 三、多项式 拉格朗日线型插值 x[i] = i; (i = 1 ~ n) long long ask(long long k){ int n = nn; pre[0] = k; fac[0] = suf[n + 1] = 1; for(int j = 1; j <= n; j ++) pre[j] 阅读全文
posted @ 2022-09-29 21:03 lyhy 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 二、线性代数 矩阵模板 namespace Matrix{ struct matrix{ int hang, lie; vector <vector<int >> num; matrix(int x = 0, int y = 0){ hang = x; lie = y; num.resize(x + 阅读全文
posted @ 2022-09-29 21:01 lyhy 阅读(4) 评论(0) 推荐(0) 编辑