写在前面:函数模板是通用的函数描述,也就是说,它们使用泛型来定义函数,其中的泛型可用具体的类型(如int或double)替换。通过将类型作为参数传递给模板,可使编译器生成该类型的函数。由于模板允许以泛型(而不是具体类型)的方式编写程序,因此有时也被称为通用编程。由于类型是用参数表示的,因此模板特性有 ...
分类:
编程语言 时间:
2020-11-07 16:46:28
阅读次数:
20
8.1 PAT dfs+dijkstra 重做 // PAT 1018 #include<stdio.h> #include<vector> #include<map> #include<algorithm> using namespace std; const int N = 600; const ...
分类:
其他好文 时间:
2020-11-07 16:44:48
阅读次数:
17
#include<iostream> #include<cstdio> #include<set> #define MAXSIZE 51 using namespace std; set<int> s[MAXSIZE];/*建立set数组,自动除去重复的并且升序排好,然后利用count函数即可,知识 ...
分类:
其他好文 时间:
2020-11-07 16:42:41
阅读次数:
18
说明: 简单总结一下深度优先算法和广度优先算法在Unity中最直观和最多见的使用。这里我所举的例子是应用到Unity中3D 人物的全部骨骼关键的遍历,推广开就是能够对全部物体的层级关系进行简单的遍历。。。算法 数据结构中的树的遍历在Unity中最直观的表现就是对某物体的全部子物体的遍历关系。数据结构 ...
分类:
编程语言 时间:
2020-11-07 16:23:59
阅读次数:
28
首先 热烈庆祝“CSP-S 2020全国开放赛前冲刺模拟训练题2”圆满结束!!! 感谢大毒瘤颗粒囊的题目。题目还是很不错的,部分分设置的不合理,各种神仙随便 AK ,蒟蒻只能爆零。 Problem A 不会,下一个。 暴搜代码如下: #include<bits/stdc++.h> using nam ...
分类:
其他好文 时间:
2020-11-06 02:32:55
阅读次数:
20
using System.Runtime.InteropServices; #region/// <summary> /// 取exe文件绝对路径 /// </summary> /// <param name="hModule"></param> /// <param name="lpFileNam ...
强联通分量及缩点 #include<bits/stdc++.h> #define re register #define v e[i].to using namespace std; const int lzw=1e4+3; int n,m,head[lzw],tot,h[lzw],cnt,dfn[ ...
分类:
其他好文 时间:
2020-11-06 01:55:25
阅读次数:
17
` #include <string.h> #include <iconv.h> #include using namespace std; int code_convert(char *from_charset, char *to_charset, char *inbuf,int inlen, c ...
分类:
编程语言 时间:
2020-11-06 01:53:34
阅读次数:
28
链接 : http://codeforces.com/problemset/problem/1443/C 标签 : binary search greedy sorting *1400 二分答案 AC代码 #include <bits/stdc++.h> using namespace std; # ...
分类:
其他好文 时间:
2020-11-06 01:18:03
阅读次数:
19
最短路 SPFA #include <bits/stdc++.h> using namespace std; #define N 10001 #define M 500001 struct node{ int to,w,next; }edge[M]; int cut=0; int head[N]; ...
分类:
编程语言 时间:
2020-11-04 18:47:58
阅读次数:
18