文章列表

筛选

priority_queue优先队列,简单介绍

摘要:STL优先队列:priority_queueSTL中的优先队列也是一种队列(queue),但平时我们使用的队列不同的在于我们可以自定义其中数据的优先级, 让优先级高的排在队列前面,可以理解为一个时刻都……

并查集-模板(自用)

摘要:并查集模板题目--对应题目为洛谷的并查集模板(搜一下就可以了)#include<iostream> #define hh ios::sync_with_stdio(false),cin.tie(0)……

问题 1106: 奖学金[C++描述]

摘要:#include <bits/stdc++.h> using namespace std;   struct stu {     int id;       //学生的学号     int……

求四位吸血鬼数字

摘要:吸血鬼数字是指位数为偶数的数字,可以由一对数字相乘而得到,而这对数字各包含乘积的一半位数的数字,其中从最初的数字中选取的数字可以任意排序。如1260 = 21 * 60  1827 = 21 * 87……

1951 求平方和

摘要:#include<stdio.h>#include<math.h>int main(){int a,b,c=0;scanf("%d%d",&a,&b);c=pow(a,2)+pow(b,2);prin……