- 博客(186)
- 收藏
- 关注
原创 三维仿射变换-简略版
三维仿射变换(3D Affine Transformation)是三维空间中通过线性变换(旋转、缩放、剪切)和平移组合实现的几何变换,
2025-03-19 18:21:31
586
原创 相机标定原理
为了确定空间物体表面某点的三维几何位置与其在图像中对应点之间的相互关系,需建立相机成像的几何模型,几何模型参数即为相机参数,求解相机参数的过程就是相机标定。坐标系**世界坐标系:**现实世界坐标系,该坐标系作为基准坐标系可以描述相机位置以及空间中任意物体的位置,该基准坐标点的确立通常由机械决定,用(Xw,Yw,Zw)表示世界坐标值。**相机坐标系。
2024-11-16 22:52:15
772
原创 2021 RoboCom 世界机器人开发者大赛-本科组(初赛)7-2 芬兰木棋
//关于map vector 的stl 第一次知道这种用法,长知识了
2022-06-20 11:19:10
744
1
原创 L2-001 紧急救援 (25 分)(优化版dijkstra+路径存储)
#include <bits/stdc++.h>using namespace std;const int N=11111;int n,m,s,d;typedef pair<int,int>PII;int a[N],res[N];int h[N],ne[N],e[N],w[N],idx;int dist[N];bool st[N];int path[N],way[N],du[N]; // path 记录位置点,way 记录道路条数,du记录该点权值 void a.
2022-04-20 14:27:23
394
原创 1455: [蓝桥杯2019初赛]迷宫(bfs+路径存储)
代码:#include <iostream>#include <algorithm>#include <cstring>#include <queue>using namespace std;#define x first#define y secondtypedef pair<int,int> PII;const int N=55;char g[N][N];string f[N][N];int dist[N][N];i.
2022-04-04 17:02:38
613
原创 1140:验证子串(字符串查找函数)
1140:验证子串时间限制: 1000 ms 内存限制: 65536 KB提交数: 30032 通过数: 14372【题目描述】输入两个字符串,验证其中一个串是否为另一个串的子串。【输入】输入两个字符串, 每个字符串占一行,长度不超过200且不含空格。【输出】若第一个串s1是第二个串s2的子串,则输出(s1) is substring of (s2)否则,若第二个串s2是第一个串s1的子串,输出(s2) is substring of (s1)否则,输出 No s
2022-02-28 22:04:01
791
原创 最短路算法模板
最短路算法模板以下模板全部依据 此模板题 给出,一定要理解模板,具体题目请具体分析,不要死搬硬套另外,图论(最短路问题只是图论的一小部分)中一般有如下约定:•nnn 表示顶点数,mmm 表示边数•V/v(vertex)V/v(vertex)V/v(vertex) 表示顶点,E/e(edge)E/e(edge)E/e(edge) 表示边•uuu 表示起点(也叫源点),vvv 表示终点(也叫汇点),www 表示边权最短路算法模板目录•Dijkstra算法(包括朴素版和堆优化版)•Bellman-
2022-02-21 10:04:10
159
原创 补码(牛客)
链接:https://ac.nowcoder.com/acm/contest/27740/F来源:牛客网#include <bits/stdc++.h>using namespace std;int main(){ int t; cin>>t; while(t--) { int x; cin>>x; for(int i=31;i>=0;i--) cout<<(x>>i&1); puts("").
2022-02-14 23:58:02
283
原创 小沙的痛苦(思维题)
链接:https://ac.nowcoder.com/acm/contest/27740/G来源:牛客网正确代码:#include <bits/stdc++.h>using namespace std;const int N=1e6+10;int a[N];int n,p;int main(){ scanf("%d%d",&n,&p); for(int i=0;i<n;i++) { scanf("%d",&a[i]); a[i]=a
2022-02-14 22:29:16
269
原创 (牛客)BFS
最开始的错误代码:(提交的编译器说是段错误,咱也不懂,呜呜呜呜)#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>#include<iostream>#include<queue>#include<map>#include<vector>using namespace std;//typedef long l.
2021-09-20 15:14:10
151
原创 C. Registration system(map)
C. Registration systemtime limit per test5 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputA new e-mail service “Berlandesk” is going to be opened in Berland in the near future. The site administration wants to launch t
2021-09-11 11:59:10
163
原创 最短路算法模板
最短路算法模板以下模板全部依据 此模板题 给出,一定要理解模板,具体题目请具体分析,不要死搬硬套另外,图论(最短路问题只是图论的一小部分)中一般有如下约定:•nnn 表示顶点数,mmm 表示边数•V/v(vertex)V/v(vertex)V/v(vertex) 表示顶点,E/e(edge)E/e(edge)E/e(edge) 表示边•uuu 表示起点(也叫源点),vvv 表示终点(也叫汇点),www 表示边权最短路算法模板目录•Dijkstra算法(包括朴素版和堆优化版)•Bellman-
2021-08-14 10:45:18
173
原创 B. Moamen and k-subarrays(codeforce+二分查找)
B. Moamen and k-subarraystime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMoamen has an array of n distinct integers. He wants to sort that array in non-decreasing order by doing the following opera
2021-08-14 08:40:18
233
原创 A. Theatre Square(codefore)
A. Theatre Squaretime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTheatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city’s anniv
2021-08-13 15:51:19
332
原创 J - Borg Maze(最小生成树+bfs)
这里写目录标题最小数二级目录三级目录最小数二级目录三级目录项目Value电脑$1600手机$12导管$1Column 1Column 2centered 文本居中right-aligned 文本居右
2021-08-13 10:14:07
174
原创 最小生成树算法模板
最小生成树算法模板以下模板全部依据 此模板题 给出,一定要理解模板,具体题目请具体分析,不要死搬硬套另外,图论(最短路问题只是图论的一小部分)中一般有如下约定:•nnn 表示顶点数,mmm 表示边数•V/v(vertex)V/v(vertex)V/v(vertex) 表示顶点,E/e(edge)E/e(edge)E/e(edge) 表示边•uuu 表示起点(也叫源点),vvv 表示终点(也叫汇点),www 表示边权最小生成树算法模板目录•Prim算法(包括朴素版和堆优化版)•Kruskal算
2021-08-12 10:35:57
132
原创 N - Is There A Second Way Left?(最小生成树,kruskal)
Nasa, being the most talented programmer of his time, can’t think things to be so simple. Recently allhis neighbors have decided to connect themselves over a network (actually all of them want to sharea broadband internet connection ????). But he wants t
2021-08-11 18:42:12
152
原创 O - ACM Contest and Blackout(最小生成树,kruskal)
In order to prepare the “The First National ACM School Contest” (in 20??) the major of the citydecided to provide all the schools with a reliable source of power. (The major is really afraid ofblackoutsJ). So, in order to do that, power station “Future”
2021-08-11 15:54:33
165
原创 H - Arctic Network(最小生成树)
The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every outpost will have a radio transceiver and some outposts w
2021-08-11 14:29:19
163
原创 E - Highways(最小生成树)
The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a number of highways connecting some of the most important tow
2021-08-11 09:11:04
148
原创 G - Building a Space Station(最小生成树)
You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the task.The space station is made up with a number of units, called cells
2021-08-10 15:42:17
145
原创 L - Jungle Roads(最小生成树)
#include <iostream>#include <cstring>#include <algorithm>using namespace std;const int N=200,MAX=0x3f3f3f3f;int n;int from,to,w;int dist[N],map[N][N];bool biao[N];int prim()//算法部分模板 { memset(dist,0x3f,sizeof(dist)); memset(bi.
2021-08-10 11:31:08
147
原创 M - 畅通工程再续(最小生成树)
相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现任意2个小岛之间有路通即可。其中桥的价格为 100元/米。Input输入包括多组数据。输入首先包括一个整数T(T &l
2021-08-10 11:25:19
104
原创 I - Constructing Roads(最小生成树)
There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only if there is a road between A and B, or there exists a villag
2021-08-09 17:59:38
111
原创 K - 还是畅通工程(最小生成树)
某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,每行给出一对正整数,分别是两个村庄的编号,以及此两村庄间的距离。为简单起见,村庄从1到N编号。当N为0时,输入结束,该用例不被处
2021-08-09 16:04:43
152
原创 K - Rochambeau(并查集,枚举)
N children are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three groups (it is possible that some group is empty). You don’t know who is the judge, or how the children are grouped. Th
2021-08-09 10:13:14
131
原创 G - Navigation Nightmare(并查集)
Farmer John’s pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1…N. A series of M (1 <= M < 40,000) vertical and horizontal roads each of varying lengths (1 <= length <= 1000) connect the farms. A map of thes
2021-08-07 18:46:11
110
原创 D - Supermarket(并查集+贪心)
A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the sale begins. Each product takes precisely one unit of tim
2021-08-06 15:37:57
315
原创 B - Is It A Tree?
A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties.There is exactly one node, called the root, to which no directe
2021-08-05 14:35:56
167
原创 S - Corporative Network(并查集)
A very big corporation is developing its corporative network. In the beginning each of the N enterprisesof the corporation, numerated from 1 to N, organized its own computing and telecommunication center.Soon, for amelioration of the services, the corpor
2021-08-05 09:52:18
100
原创 J - Wormholes(bellman判断负权)
In the year 2163, wormholes were discovered. A wormhole is a subspace tunnel through space and timeconnecting two star systems. Wormholes have a few peculiar properties:• Wormholes are one-way only.• The time it takes to travel through a wormhole is neg
2021-08-02 18:05:50
116
原创 C - Currency Exchange(图论,最短路,bellman判断正负权)
Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can be several points specializing in the same pair of curr
2021-08-02 17:56:01
202
原创 I - Two Paths
You are given a undirected graph with n nodes (numbered from 1 to n) and m edges. Alice and Bob are now trying to play a game.Both of them will take different route from 1 to n (not necessary simple).Alice always moves first and she is so clever that tak
2021-08-02 17:41:58
123
原创 F - Roadblocks(次短路)
B. Alphabetical Stringstime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputA string s of length n (1≤n≤26) is called alphabetical if it can be obtained using the following algorithm:first, write an em
2021-07-30 18:50:39
249
1
原创 D - Six Degrees of Cowvin Bacon(最小路径)
The cows have been making movies lately, so they are ready to play a variant of the famous game “Six Degrees of Kevin Bacon”.The game works like this: each cow is considered to be zero degrees of separation (degrees) away from herself. If two distinct cow
2021-07-30 14:47:22
178
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人