#include <iostream>
#include <cstdio>
#include <cstring>
#include <queue>
using namespace std;
#define inf 0x3f3f3...
#include<iostream>
#include<cstdlib>
#include<cstdio>
#include<vector>
using namespace std;
vector<int> path...
public class Code02_TrieTree {
private Node root;
public Code02_TrieTree() {
this.root = new Node();
}
...
#include <bits/stdc++.h>
using namespace std;
int main()
{
int L, M;
while(cin>>L>>M)
{
int l, r, ...
#include<iostream>
using namespace std;
typedef struct node {
char data;
struct node* lchild, * rchild;
}node, * Tree;
void...
#include<bits/stdc++.h>
using namespace std;
string str;
int len, num[30];
int bfs() {
priority_queue<int, vector<int>, ...
// 快速幂经典题
#include <bits/stdc++.h>
using namespace std;
//定义模
#define MOD 233333;
//快速幂算法:
//其实就是二分思想,把幂减半后,减少计算时间
//n为偶数,a^n=a^...
1. 数据结构是研究计算机的操作对象的逻辑结构和物理结构以及在结构上定义的操作,逻辑结构包括线性结构和非线性结构,物理结构包括顺序结构、链式结构、索引结构和散列结构。
2. 时间复杂度:时间复杂度是指执行算法所需的计算工作量,所以将算法中基本操作的运行次数作为时间复杂度的度量,比如循环的...
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;
//getPrime就是统计质因子个数的。
void getPrime(vector&l...
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,x,k,count;
while(cin>>n){
count = 0;
ma...
#include <bits/stdc++.h>
using namespace std;
struct T
{
string name;
string time;
string run;
}t[10000];
bool compare(T t1, T t...
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
getline(cin, s);
string target[8]...
#include<bits/stdc++.h>
using namespace std;
char s[100];
int main() {
while (gets(s)) {
...
#include<iostream>
#include<string>
#define N 4000
using namespace std;
int conversion(int d[],int data[],int n,int x,int y)...
#include <iostream>
using namespace std;
void ShowCm(int m) {
if (m > 0) {
ShowCm(m - 1);
for (int i = 0, temp = 1; i < m + 1; i...
1.最坏情况下 insert sort, quick sort ,merge sort 的复杂度分别是多少?
A. O(n*n),O(nlogn),O(n*n)
B. O(n*n),O(n*n),O(nlogn)
C. O(n*n)...
不得不说,唐迟老师总结的英语阅读技巧真的很强大。
闲来无事,最近把阅读技巧课重新看了一遍,有了一些新的感悟,所以顺手总结出一份阅读技巧的思维导图笔记。
我发现之前学习时常犯的一个毛病:太过于钻入到知识的细节,忽略了整体框架。
遇到一个不会的知识点,就一心想要把它搞明白...
福建工程学院
为进一步做好学科及研究生培养工作,经福建工程学院计算机科学与数学学院党政联席会议研究,我院拟对2024年“计算机技术”专业硕士研究生招生考试初试科目进行如下调整:
原“数据结构和C语言程序设计”更改为“4...
解决死锁的4种基本方法
预防死锁
避免死锁
检测死锁
解除死锁
预防死锁
通过设置一些限制条件,去破坏产生死锁的必要条件
1)互斥条件:指进程对所分配到的资源进行排它性使用,即在一段时间内某资源只...
把之前pat做过的部分题再练习一下:
1.电话账单
电话账单
2.银行排队
银行排队
3.求平均值
求平均值
4.家产
家产
5.弹出序列
弹出序列
...
图专题2(PAT):
1.第一次接触
第一次接触
2.最大集团
最大集团
3.拓扑顺序
拓扑顺序
4.旅行商问题
旅行商问题
5.顶点着色
顶点着色
...
图专题1(PAT):
1.紧急情况
紧急情况
2.旅行计划
旅行计划
3.团伙头目
团伙头目
4.条条大路通罗马
条条大路通罗马
5.在线地图
在线地图
...
树专题2(PAT):
1.后序遍历
后序遍历
2.AVL树的根
AVl树的根
3.判断完全 AVL 树
判断完全 AVL 树
4.判断红黑树
判断红黑树
5.等...
1.打印K字
打印K字
2.游游的字符串构造
游游的字符串构造
3.日期排序
日期排序
4.回文日期
回文日期
5.K进制数
K进制数
...
char e;
int f;
}data;
首先最长的数据类型占 4 字节,所以是以 4 对齐。然后 a 占 1 字节,b 接在 a 后面占 1 字节,c 接在 b 后面占 1 字节,d 接在 c 后面占 1 字节,此时满 4 字节了,e 再来就要另起一行。f 想...