码迷,mamicode.com
首页 >  
搜索关键字:using password: yes    ( 53562个结果
[Lyndon分解] HDU 6761 Minimum Index (2020多校训练)
[Lyndon分解] HDU 6761 Minimum Index (2020多校训练) 题解 待补。 Code #include <iostream> #include <algorithm> #include <cstring> #include <string> #include <cstdi ...
分类:其他好文   时间:2020-07-22 01:46:30    阅读次数:178
PAT(Basic Level) 1006
1 #include<iostream> 2 3 using namespace std; 4 5 int main() 6 { 7 int n; 8 cin>>n; 9 10 if(n<10){ 11 for(int i=1;i<=n;i++) 12 cout<<i; 13 } 14 else i ...
分类:其他好文   时间:2020-07-22 01:39:51    阅读次数:69
PAT-T1027 Larry and Inversions (树状数组)
题意: 每次翻转一段区间,询问翻转区间后整个序列的逆序对数量。 题解: 每次翻转区间,那么翻转区间的答案就是整个序列的原始答案减去这个区间里逆序对的数量加上顺序对的数量。 统计逆序对和顺序对用树状数组做。 #include<bits/stdc++.h> using namespace std; co ...
分类:编程语言   时间:2020-07-21 23:21:03    阅读次数:88
[.NET]阿里云OSS上传下载与生成图片链接
项目中需要添加以下依赖项,在控制台中执行安装依赖项: Install-Package Aliyun.OSS.SDK --适用于.NET版本 Install-Package Aliyun.OSS.SDK.NetCore --适用.NET Core版本 以下是封装的上传下载以及生成图片链接的方法: // ...
分类:Web程序   时间:2020-07-21 23:17:05    阅读次数:97
PAT(Basic Level) 1004
#include<iostream> #include<string> using namespace std; struct student{ string name; string number; int score; }; int main(){ int n; cin>>n; student ...
分类:其他好文   时间:2020-07-21 23:01:26    阅读次数:73
P1484 种树
链接:Miku 链表存图,但是要注意创造出来个0和n+1号坑,这会方便我们后续处理的 贪心的部分就是选择最高的,然后把两边的去掉 等等,我反悔了咋办,我觉得选两边的更好!(这里有一个问题,要不都选,要不都不选,这是可以证明的) 那么我们就把两边和中间拼成一颗巨树,他的价值是两边之和-中间的(这样再选 ...
分类:其他好文   时间:2020-07-21 22:38:45    阅读次数:63
G - How many ways??
HDU - 2157 构造矩阵,用于转移走一步的情况。 若$i$能走到$j$,则$g[j][i]=1$,否则为$0$ 然后一开始只有$A$点累计有一种走法。 所以最后计算矩阵的$k$次方,输出$g[B][A]$即可。 #include<bits/stdc++.h> using namespace s ...
分类:其他好文   时间:2020-07-21 22:30:21    阅读次数:61
中序遍历加后序遍历确定先序遍历
https://www.luogu.com.cn/problem/P1030 1 #define bug(x) cout<<#x<<" is "<<x<<endl 2 #define IO std::ios::sync_with_stdio(0) 3 #include <bits/stdc++.h> ...
分类:其他好文   时间:2020-07-21 21:48:07    阅读次数:55
A 1020 Tree Traversals (25分) 题型: 二叉树的遍历 之 由后序和中序得到层次遍历
二叉树的遍历 题型 此类题做法 1.定义节点 2.构造二叉树{ a.边界条件 b.建立新节点root 存入根节点数据(由后序或先序 c. k 遍历中序,找到相等的值 d. 得出左子树个数(中序的 ) e.返回左子树根节点地址,返回右子树根节点地址,return root; 3.层次遍历{ a.创建队 ...
分类:其他好文   时间:2020-07-21 14:18:40    阅读次数:61
P1484 种树
链接:Miku 对顶堆做法 #include<iostream> #include<cstdio> #include<algorithm> #include<queue> using namespace std; priority_queue <int,vector<int>,greater<int ...
分类:其他好文   时间:2020-07-21 13:58:51    阅读次数:72
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!