04 2023 档案

摘要:代码 #include<iostream> #include<vector> #include<cstdio> using namespace std; const int maxn = 100010; vector<int> sequence; int maxL, minR, cnt, k, n, 阅读全文 »
posted @ 2023-04-21 17:35 天黑星更亮 阅读(12) 评论(0) 推荐(0) 编辑
摘要:题目 Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. According to 阅读全文 »
posted @ 2023-04-21 17:31 天黑星更亮 阅读(16) 评论(0) 推荐(0) 编辑
摘要:题目 When a flight arrives, the passengers will go to the Arrivals area to pick up their baggage from a luggage conveyor belt (行李传送带). Now assume that w 阅读全文 »
posted @ 2023-04-21 16:37 天黑星更亮 阅读(15) 评论(0) 推荐(0) 编辑
摘要:代码 #include<iostream> #include<map> #include<algorithm> #include<vector> using namespace std; map<vector<int>,int>mp; vector<int>temp; int main(){ int 阅读全文 »
posted @ 2023-04-21 11:33 天黑星更亮 阅读(11) 评论(0) 推荐(0) 编辑
摘要:题目 哲哲是一位硬核游戏玩家。最近一款名叫《达诺达诺》的新游戏刚刚上市,哲哲自然要快速攻略游戏,守护硬核游戏玩家的一切! 为简化模型,我们不妨假设游戏有 N 个剧情点,通过游戏里不同的操作或选择可以从某个剧情点去往另外一个剧情点。此外,游戏还设置了一些存档,在某个剧情点可以将玩家的游戏进度保存在一个 阅读全文 »
posted @ 2023-04-21 11:32 天黑星更亮 阅读(30) 评论(0) 推荐(0) 编辑
摘要:代码 #include<iostream> #include<vector> #include<algorithm> using namespace std; const int N = 10010; vector<int>v[N]; bool isroot[N]; vector<int> path 阅读全文 »
posted @ 2023-04-21 11:30 天黑星更亮 阅读(31) 评论(0) 推荐(0) 编辑
摘要:代码 #include <bits/stdc++.h> using namespace std; map<int, int> A; int n, minn = INT_MAX, maxn = INT_MIN;//头文件中自定义的宏 int main() { cin >> n; for (int i 阅读全文 »
posted @ 2023-04-21 11:27 天黑星更亮 阅读(73) 评论(0) 推荐(0) 编辑
摘要:代码 #include<iostream> #include<string> #include<algorithm> using namespace std; const int N = 100; string s[N]; int main(){ int n,m; cin >> n >> m; in 阅读全文 »
posted @ 2023-04-21 11:26 天黑星更亮 阅读(32) 评论(0) 推荐(0) 编辑
摘要:题目 彩虹瓶的制作过程(并不)是这样的:先把一大批空瓶铺放在装填场地上,然后按照一定的顺序将每种颜色的小球均匀撒到这批瓶子里。 假设彩虹瓶里要按顺序装 N 种颜色的小球(不妨将顺序就编号为 1 到 N)。现在工厂里有每种颜色的小球各一箱,工人需要一箱一箱地将小球从工厂里搬到装填场地。如果搬来的这箱小 阅读全文 »
posted @ 2023-04-21 11:06 天黑星更亮 阅读(66) 评论(0) 推荐(0) 编辑
摘要:代码 #include<iostream> #include<algorithm> #include<vector> using namespace std; const int N = 100010; vector<int>v[N]; vector<int>path; int ans = 0, i 阅读全文 »
posted @ 2023-04-21 10:32 天黑星更亮 阅读(24) 评论(0) 推荐(0) 编辑
摘要:代码 #include <stdio.h> #include <string.h> //处理的方式和我考虑的一样,但是有一点更为巧妙一点 //它将空格的位置固定在了倒数第三个空格上,这确实更符合常理也更容易输出 int main(){ int n,i,j; int len,flagA,flagB; 阅读全文 »
posted @ 2023-04-21 10:14 天黑星更亮 阅读(56) 评论(0) 推荐(0) 编辑
摘要:题目 “666”是一种网络用语,大概是表示某人很厉害、我们很佩服的意思。最近又衍生出另一个数字“9”,意思是“6翻了”,实在太厉害的意思。如果你以为这就是厉害的最高境界,那就错啦 —— 目前的最高境界是数字“27”,因为这是 3 个 “9”! 本题就请你编写程序,将那些过时的、只会用一连串“6666 阅读全文 »
posted @ 2023-04-21 10:11 天黑星更亮 阅读(56) 评论(0) 推荐(0) 编辑
摘要:link code #include<bits/stdc++.h> using namespace std; const int N = 100010; int a[N]; int tp[N]; long long ans; void merge(int l, int r){ if(l >= r) 阅读全文 »
posted @ 2023-04-07 21:33 天黑星更亮 阅读(13) 评论(0) 推荐(0) 编辑
摘要:link code #include<bits/stdc++.h> using namespace std; typedef long long ll; //注意先除以x后乘以b ll gcd(ll a, ll b){ return b ? gcd(b, a % b) : a; } int main 阅读全文 »
posted @ 2023-04-07 20:17 天黑星更亮 阅读(24) 评论(0) 推荐(0) 编辑
摘要:link code #include<bits/stdc++.h> using namespace std; const int N = 100010; int fa[N], a[N]; int cnt[N]; int find(int x){ if(x != fa[x]) fa[x] = find 阅读全文 »
posted @ 2023-04-07 19:55 天黑星更亮 阅读(22) 评论(0) 推荐(0) 编辑
摘要:link code #include<bits/stdc++.h> using namespace std; const int N = 100010; int a[N],b[N]; int main(){ int n, m; cin >> n >> m; for(int i = 1; i <= n 阅读全文 »
posted @ 2023-04-07 19:29 天黑星更亮 阅读(8) 评论(0) 推荐(0) 编辑
摘要:link code #include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int n; int ans = 1, tpr = 0; vector<pair<int,int>>v; int l, r 阅读全文 »
posted @ 2023-04-07 19:21 天黑星更亮 阅读(13) 评论(0) 推荐(0) 编辑
摘要:link code #include<iostream> #include<unordered_map> using namespace std; int main(){ unordered_map<char, int >mp; string s; cin>> s; for(int i = 0; i 阅读全文 »
posted @ 2023-04-07 17:31 天黑星更亮 阅读(16) 评论(0) 推荐(0) 编辑
摘要:link 代码 #include<iostream> using namespace std; const int N = 100010; int cnt[N]; int main(){ int n, k; cin >> n >> k; long long ans = 0; long long su 阅读全文 »
posted @ 2023-04-07 17:22 天黑星更亮 阅读(12) 评论(0) 推荐(0) 编辑
摘要:link 代码 #include<bits/stdc++.h> using namespace std; const int N = 1010; //如果坏人可以到达终点,并且距离终点的距离小于等于 起点到终点的距离,那么必然会相遇 //所以我们从终点出发找起点,在找到起点之前如果到达坏人所在地方, 阅读全文 »
posted @ 2023-04-07 16:52 天黑星更亮 阅读(19) 评论(0) 推荐(0) 编辑
摘要:原题链接 思路 本题目数据量较弱,所以可以考虑直接用dfs 代码 #include<iostream> using namespace std; int ans; void dfs(int n, int d, int k){ if(k == 0){ if(n == 0) ans++; return; 阅读全文 »
posted @ 2023-04-07 15:59 天黑星更亮 阅读(16) 评论(0) 推荐(0) 编辑
摘要:介绍 本文附录了通过LBPH实现简单人脸识别的源代码,分类效果并不是很好,供个人学习使用。 人脸录入.py import cv2 cap = cv2.VideoCapture(0) flag = 1 num = 0 while (cap.isOpened()): ret_flag, Vshow = 阅读全文 »
posted @ 2023-04-02 16:18 天黑星更亮 阅读(130) 评论(0) 推荐(0) 编辑
摘要:用OpenCv-Python自带的LBPH识别器实现简单人脸识别(上) 引言: 本文开发环境为: Windows10 + phchram + Anaconda5.2 (Python3.6)+ Opencv4.5.5,用opencv-contrib原生的API完成了人脸识别的功能,其可以任意添加人脸I 阅读全文 »
posted @ 2023-04-02 16:12 天黑星更亮 阅读(409) 评论(0) 推荐(0) 编辑
摘要:相邻石子合并问题 代码 #include<bits/stdc++.h> using namespace std; #define rep(i,a,n) for(int i = a; i <= n; i++) const int N = 330; int sum[N]; int a[N]; int f 阅读全文 »
posted @ 2023-04-02 10:25 天黑星更亮 阅读(26) 评论(0) 推荐(0) 编辑
摘要:原题链接 代码 #include<iostream> #include<algorithm> using namespace std; const int N = 100010; const int mod = 1000000007; int a[N],b[N]; //总结: 记得开 long lo 阅读全文 »
posted @ 2023-04-02 10:15 天黑星更亮 阅读(15) 评论(0) 推荐(0) 编辑
摘要:原题链接 解题思路 通过i和j来控制子矩阵的左右边界,通过s和t来控制子矩阵的上下边界, 在子矩阵的和小于k时候,统计子矩阵的个数。 代码 #include<iostream> using namespace std; const int N = 550; int a[N][N]; // i 与 j 阅读全文 »
posted @ 2023-04-02 09:29 天黑星更亮 阅读(18) 评论(0) 推荐(0) 编辑
摘要:原题链接 代码 #include<iostream> using namespace std; const int N = 100010; int a[N],f[N]; int main(){ int n; cin >> n; int ans = 0, j = 1; for(int i = 1; i 阅读全文 »
posted @ 2023-04-02 09:22 天黑星更亮 阅读(10) 评论(0) 推荐(0) 编辑

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