04 2021 档案

摘要:邻接矩阵表示的图: 油田 dfs #include<bits/stdc++.h> using namespace std; const int maxn=104; char G[maxn][maxn]; int n,m; int ans=0; int x[8]={0,0,-1,1,1,1,-1,-1 阅读全文
posted @ 2021-04-28 20:55 DuJunlong 阅读(14) 评论(0) 推荐(0) 编辑
摘要:auto的使用 阅读全文
posted @ 2021-04-25 17:25 DuJunlong 阅读(15) 评论(0) 推荐(0) 编辑
摘要:操作 top() push() pop() size() empty() swap() 清空队列可通过swap 也可通过赋值清空。 优先队列优先级有greater< int >, less< int > 访问元素只能一个一个地访问头 (while) 不能访问尾元素 非常受限制,建议:如果不是在插入时 阅读全文
posted @ 2021-04-25 16:38 DuJunlong 阅读(11) 评论(0) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; #define ll long long #define inf 0x3f3f3f3f #define eps 1e-10 #define bug(a) cout<<"# "<<a<<endl; #define 阅读全文
posted @ 2021-04-25 15:35 DuJunlong 阅读(4) 评论(0) 推荐(0) 编辑
摘要:queue的操作就以下: FIFO:先进先出: push() 把一个元素压到队尾 pop() 把队首元素弹出 front() 访问队首元素 back() 访问队尾元素 size() 返回队列元素个数 empty() 返回队列是否为空,空返回1 #include<bits/stdc++.h> #def 阅读全文
posted @ 2021-04-25 14:15 DuJunlong 阅读(8) 评论(0) 推荐(0) 编辑
摘要:可读空格: cin.get(); cin.getline(); gets(); getline(); 前三istring流 最后一个string流 #include<bits/stdc++.h> using namespace std; #define ll long long #define in 阅读全文
posted @ 2021-04-24 22:02 DuJunlong 阅读(18) 评论(0) 推荐(0) 编辑
摘要:以下代码配合该大佬博客食用 #include <iostream> #include<bits/stdc++.h> using namespace std; void test1() { string a; string b("asdf"); string c="adfasdf"; string d 阅读全文
posted @ 2021-04-12 20:27 DuJunlong 阅读(5) 评论(0) 推荐(0) 编辑
摘要:TQL移步大神讲解 POJ1006 AC: #include <iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #define ll long long #define INF 0x3 阅读全文
posted @ 2021-04-06 21:28 DuJunlong 阅读(13) 评论(0) 推荐(0) 编辑
摘要:一、逆元理解 逆元是什么? 逆元就是扩大了概念的倒数。 定义:如果 ax≡1(mod M),就称x为在模M下 a的 逆元! 简单地说,如果一个数x满足 ax%M=1,那么x就称为在模M下 a的 逆元! 为什么说是扩大了概念的倒数呢,可见比起以前的倒数,只加了一个条件,即在后边加了一个 “%M",也可 阅读全文
posted @ 2021-04-06 21:21 DuJunlong 阅读(205) 评论(0) 推荐(0) 编辑
摘要:一、引言 扩欧在朴素欧几里得定理中扩展得到,主要用于解决什么问题? 1.求两个数的最大公约数(朴素欧也可以解决这个问题) 2.ax+by=gcd(a,b),求解这个线性不定方程的一组特解。 (补充:贝祖定理:裴蜀定理(或贝祖定理)得名于法国数学家艾蒂安·裴蜀,说明了对任何整数a、b和它们的最大公约数 阅读全文
posted @ 2021-04-06 20:50 DuJunlong 阅读(33) 评论(0) 推荐(0) 编辑

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