最近做题养成了一个不太好的习惯,习惯性的先去看discuss有没有坑,越是惧怕错误越可能出错,之后的锻炼,出错再去check discuss吧 简单的BFS #include <iostream> #include <algorithm> #include <queue> #include <str ...
分类:
其他好文 时间:
2021-04-21 12:34:23
阅读次数:
0
题目大意 给一个二叉树的中序遍历和前序遍历,求其镜像后的层序遍历 类似于 L2-006 树的遍历 (25 分) 建树 镜像就在dfs的时候先输出右子树 再 左子树 #include<bits/stdc++.h> using namespace std; struct node { int l,r; ...
分类:
其他好文 时间:
2021-04-21 12:12:05
阅读次数:
0
在配置好OpenGL开发库的环境下,在main.cpp文件中运行如下代码,从而学习。 配置方法:https://www.cnblogs.com/cchHers/p/14674397.html #include "GLShaderManager.h" //着色器管理器(shader manager)类 ...
分类:
其他好文 时间:
2021-04-21 11:55:44
阅读次数:
0
输出小于输入值的所有正偶数。 1、while语句 #include <stdio.h> int main(void) { int i = 2, j; puts("please input an integer."); printf("j = "); scanf("%d", &j); while ( ...
分类:
编程语言 时间:
2021-04-20 15:40:50
阅读次数:
0
爆搜,按照题意来搜。。。 太难写了,当模拟写的,代码分成了很多块,长度比较难看。。。 #include<bits/stdc++.h> using namespace std; #define ll long long #define fastio ios::sync_with_stdio(false ...
分类:
其他好文 时间:
2021-04-20 15:37:24
阅读次数:
0
所谓并查集就是将编号为1~n的n个对象划分为不相交集合,在每个集合中,选择其中的某个元素代表所在集合在这个集合中,并查集的操作有初始化,合并,查找。 #include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_std ...
分类:
其他好文 时间:
2021-04-20 15:31:02
阅读次数:
0
Android平台OpenGL ES/Assimp/OpenCV/GLM集成说明 本文代码见: https://github.com/jiangxincode/OpenGLDemo 集成Assimp 下载Assimp 5.0.1版本:https://codeload.github.com/assim ...
分类:
移动开发 时间:
2021-04-20 15:30:14
阅读次数:
0
我对模拟退火的初步理解,还没深入了解过。这里只是用模拟退火求函数极值。 题目:https://vjudge.net/problem/HDU-2899 #include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_std ...
分类:
编程语言 时间:
2021-04-20 15:29:36
阅读次数:
0
#基数排序 也是采用分桶的思想,但是加入了按位比较的思想(可以理解为每位进行一次计数排序) 思路: 计算数列中最大位数 按位数循环处理每位的排序 代码实现: #include<iterator> #include<iostream> #include<vector> using namespace ...
分类:
编程语言 时间:
2021-04-20 15:17:05
阅读次数:
0
一、bit_xor 1、头文件 #include <functional> 2、模板 template <class T> struct bit_xor; template <class T = void> struct bit_xor; 3、返回两个参数按位XOR的结果(公共成员函数) 4、使用 ...
分类:
其他好文 时间:
2021-04-20 15:10:43
阅读次数:
0