- 博客(6)
- 收藏
- 关注
原创 7-2 PTA 重排链表
PTA 重排链表我用的是动态链表的方式存储数据其中注意一点有一个空节点的问题建了两个map分别是从头开始一个是从尾开始其中一点 需要注意 由于是“-1”为起始点 故 第二个表的数据地址应在next处#include<iostream>#include<map>#include<string>#include<algorithm>#include<cstdio>using namespace std; struct SKT
2021-10-15 16:54:13 634
原创 校园图书馆模拟器极其简陋版
写程序的日记花了十多个小时完成老师布置的任务(应该算吧=D)还有些小问题仍待解决。这里算是自己的一个小的努力的纪念碑吧bug:学生能还老师借的书(笑死)还书还是有点小bug??没有检查出大问题吧?(笑)代码如下:#include<iostream>#include<cstdio>#include<string>#include<algorithm>#include<fstream>#include<sstrea
2021-06-04 17:39:44 204
原创 2021-04-29
D - 棋盘问题(解题日记)简单的dfs```cpp#include<iostream>#include<cstdio>#include<cmath>#include<algorithm>#include<string.h>using namespace std;int x[1001] = { 0 };int y[1001] = { 0 };char M[1001][1001];int n, k, ans = 0;vo
2021-04-29 20:03:29 63
原创 F - Where is the Marble?
F - Where is the Marble?lower_bound( )函数查找元素.#include<iostream>#include<string.h>#include<algorithm>using namespace std;int btn[100001];bool cmp(int x, int b){ return x < b;}int main(){ int N, M, T = 0; while (cin >>
2021-04-16 21:04:07 83
原创 2021-04-12
C - The Next PermutationSTL next_permutation()的运用,先预判是否为最大值,即可。#include<iostream>#include<string.h>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;int a[10001];int main(){ int T; cin >>
2021-04-12 22:49:32 41
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人