摘要:
今天新了解的打表 #include <iostream> using namespace std; long long dfs(int x) //深搜 { if(x==1) return 1; long long tot=1; //加上自身,所以初始化是 1 for(int i=1;i<=x/2;i 阅读全文
摘要:
#include<iostream> using namespace std; int poww(int a, int b) { int ans = 1, base = a; while (b != 0) { if (b & 1 != 0) ans *= base; base *= base; b 阅读全文
摘要:
#include <bits/stdc++.h> using namespace std; int c[13][13];//杨辉三角 int b[13];//用于排除 int a[13];//输出解答 int n, p; void dfs(int dep, int s) { if (s > p) r 阅读全文
摘要:
最近刷题的确发现动态二维数组是又麻烦又容易出错,针对这一点还是想提出一些改进的,直接赋一个大的值就好了,省去很多不必要的麻烦,如果你将这个值换为2,则会出现访问冲突的情况。 迷宫(洛谷-P1605) #include<iostream> using namespace std; int start_ 阅读全文
摘要:
#include<iostream> #include<cstring> using namespace std; template<typename item> class smallest_heap{ private: item heap[10001]; int len; public: sma 阅读全文