模板题:https://loj.ac/p/129 知识点:是while不是if 待填坑 code: #include <iostream> #include <cstdio> #include <cstring> using namespace std; const int MAXN = 2e6 + ...
分类:
其他好文 时间:
2020-12-07 12:32:21
阅读次数:
7
1 #include <iostream> 2 using namespace std; 3 int abc(int); 4 int fun1(int); 5 int fun1(int a) 6 { 7 cout << "递归函数1" << endl; 8 if (a == 1) 9 { 10 re ...
分类:
其他好文 时间:
2020-12-07 12:04:33
阅读次数:
4
建造者模式 1. 复杂对象创建,包含多步骤 2. 建造流程相对固定 代码实现:造车 模型: namespace BuilderPattern.Models { public class Engine { public string Name { get; set; } } public class ...
//功能函数 #include <vector> using namespace std; vector<CString> g_vSysFonts; INT CALLBACK NEnumFontNameProc(LOGFONT* plf, TEXTMETRIC* /*ptm*/, INT /*nFo ...
分类:
编程语言 时间:
2020-12-05 10:57:35
阅读次数:
6
ubuntu12.04网络配置之设置静态iPstep:1.输入命令:sudovi/etc/network/interfaces看到如下内容:2、追加以下内容:ifaceeth0inetstaticaddress192.168.1.122netmask255.255.255.0gateway192.168.1.1dns-nameservers202.106.0.203、重启网络服务,输入以下命令:s
分类:
系统相关 时间:
2020-12-05 10:39:14
阅读次数:
10
解决Spring配置文件不显示design和source,namespace问题之前撸代码一直没太关注这个问题,后来发现对于不太熟悉配置文件内容的小伙伴们来说是比较痛苦的,因为每个配置项都需要你记住或者拷贝别人现成配置那么问题来了,今天在写发现我的Spring配置文件不显示design和source,namespace?解决方案:在已经装了spring插件的情况下右键点击你要显示的xml文件会出来
分类:
编程语言 时间:
2020-12-05 10:38:45
阅读次数:
5
题目来源 https://codeforces.ml/contest/1457 A:Prison Break 给一个n*m的矩阵,问这个矩阵上到(a, b)距离最远的距离是多少? 思路分析 找四个角即可。 #include <bits/stdc++.h> using namespace std; i ...
分类:
其他好文 时间:
2020-12-04 11:49:25
阅读次数:
22
一、VirtualBox 网络设置 打开 VirtualBox 的设置,再点击网络,连接方式选桥接网卡。 二、虚拟机设置网络 启动虚拟机,输入下面命令进入网络配置目录: cd /etc/sysconfig/network-scripts/ 查看一下有哪些文件(后面两个是我之前备份的,不用管): ls ...
分类:
其他好文 时间:
2020-12-04 11:44:29
阅读次数:
18
1:首先yuminstallvconfig安装vconfig2:复制需要做vlan的网卡(em2)配置文件给em2.10和em2.20[root@localhost~]#cp/etc/sysconfig/network-scripts/ifcfg-em2etc/sysconfig/network-scripts/ifcfg-em2.10[root@localhost~]#cp/etc/syscon
分类:
其他好文 时间:
2020-12-04 11:20:23
阅读次数:
7
题意: 定义一条路径的权值为路径上所有边的编号直接相连所得到的十进制数字的大小求1到每个点的最短路mod 1e9+7n,m<=100000。 题解: 对于一个点来说,他肯定跑位数最少,其次就是字典序最小,可以把边权拆开,然后跑bfs就会满足位数最少,那么字典序最小,就在bfs的过程中满足,然后利用分 ...
分类:
其他好文 时间:
2020-12-04 11:01:36
阅读次数:
4