自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 问答 (5)
  • 收藏
  • 关注

原创 汇编语言学习(二)

前言:这个章节用来记录一些基本的汇编语言程序设计 1.宏汇编语言基本语句

2018-09-29 19:49:10 1613

原创 汇编语言学习(一)

前言:这学期新开了汇编语言和微机原理,觉得学的比较吃力呀,觉得是要整理整理学习过的内容啦,一个是复习复习,一个是给将来留一个参考。这学期事情真是巨多,无数的实验。。。。 一、汇编语言语法规则 1、常用伪指令 2、常用运算符 二、80486基本指令集 1、传送性类指令 堆栈操作指令 2、算数运算指令 3、逻辑运算和移位指令 4、转移和调用指令 5、串操作指令 ...

2018-09-29 19:46:32 970

原创 2018年蓝桥杯 日志统计(尺取法)

#include<iostream> #include<vector> #include<algorithm> using namespace std; int n,d,k,ts,id; vector<int> ve[1010]; int ans[1010]; int judge(int x){ int len=ve[x].size(); ...

2018-09-27 20:50:59 2256

原创 NOJ2319 Box(水)

分析:选拔赛最水的一题了,讨论一下就可以。 #include<iostream> using namespace std; typedef long long ll; int a,b,c,w,h; int judge(int w,int h){ //first if(2*a+2*c<=w && b+2*c<=h) return 1; ...

2018-09-26 22:45:58 128

原创 CF1042C Array Product(模拟)

还没写完。。后面补 #include<iostream> #include<algorithm> #define maxn 300010 typedef struct Node{ int x; int id; }node; node a[maxn]; using namespace std; int main(){ int n,l=0,r=0,m=0...

2018-09-24 11:43:24 209

原创 Codeforces Round #509 (Div. 2) C. Coffee Break(set)

#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll n,m,d; cin>>n

2018-09-18 08:48:38 159

原创 51Nod 1276 岛屿的数量(思维)

可以看一下比人的讲解:这里写链接内容 分析:很好的一道思维题。 /* (1)两个特殊的情况,最开头的和结尾的。 (2)如果这个地方是山谷,岛屿个数+1; 如果这个地方是山峰,岛屿个数-1; 如果不是山峰不是山谷,岛屿个数不变。 (3)如果两边都已经淹没,那么这个岛屿是山峰 如果两边没有淹没,那么这个岛屿是山谷 ...

2018-09-16 22:38:12 171

原创 51Nod 1268 和为K的组合 (dfs/01背包)

#include<iostream> #include<cmath> using namespace std; typedef long long ll; const int maxn=1e6; int dp[maxn],a[maxn]; int n,k; ll sum=0; int main(){ std::ios::sync_with_stdio(false);...

2018-09-16 20:26:03 225

原创 51Nod 1013 3的幂的和(快速幂+逆元)

分析: 用费马小定理求解2的逆元,然后快速幂一下就行了。 #include<iostream> #include<cmath> using namespace std; typedef long long ll; const ll Mod=1000000007; int n; ll Pow(ll a,ll b){ ll ans=1; while(b){ ...

2018-09-16 20:15:14 126

原创 51Nod 1138 连续整数的和(数学)

分析:这里写链接内容 #include<iostream> #include<algorithm> #include<cmath> using namespace std; typedef long long ll; int n,x; bool flag=false; int main(){ ios::sync_with_stdio(false); ...

2018-09-16 19:45:33 154

原创 51Nod 1133 不重叠的线段(贪心)

水题,贪心,这种时间分配的题目只要按照结束的先后排序,然后扫一遍就可以了。 #include<iostream> #include<algorithm> using namespace std; typedef long long ll; int n; typedef struct Node{ int s,e; }node; node a[10010]; bool...

2018-09-16 16:59:03 189

原创 51Nod 1119 机器人走方格 V2(组合数,逆元求解)

分析: 开始一直WA,看了半天看不出来,现在还是想不通 ans=ans*jc(n)%Mod; ans=ans*Pow(jc(m),Mod-2)%Mod; ans=ans*Pow(jc(n-m),Mod-2)%Mod; 和 ans*=jc(n)%Mod; ans*=Pow(jc(m),Mod-2)%Mod; ans*=Pow(jc(n-m),Mod-2)%Mod...

2018-09-16 16:26:21 183

原创 51Nod 1095 Anigram单词(map)

#include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #include<map> using namespace std; typedef long long ll; ll T,n; map<string,int> mp1,mp2; ...

2018-09-16 14:57:22 162

原创 51Nod 1050 循环数组最大子段和(dp+思维)

O(N*N),肯定是TLE。后面调。 #include<iostream> #include<algorithm> #define inf 0x3f3f3f3f #define maxn 600010 typedef long long ll; using namespace std; ll a[maxn],sum[maxn]; ll n,t=0; int main(){...

2018-09-16 10:58:33 126

原创 51Nod 1042 数字0-9的数量(数位dp)

参考自:这里写链接内容 #include <iostream> #include<algorithm> #include<cmath> #define maxn 1e5+10 typedef long long ll; using namespace std; ll ans[10]; //保存小于n,数字i出现的次数 void solve(l...

2018-09-16 10:01:04 154

原创 51Nod 1010 只包含因子2 3 5的数(打表+二分)

分析: 打表+二分 #include <iostream> #include<algorithm> #include<cmath> #define maxn 1e18+99 typedef long long ll; using namespace std; ll T,x,l,r,mid,cnt; ll a[50010]; void init(){ ...

2018-09-15 22:02:36 175

原创 51Nod 1007 正整数分组(01背包)

#include <iostream> #include<cmath> #define maxn 100010 typedef long long ll; using namespace std; int a[maxn],dp[maxn]; //背包问题 //当背包容量为N的时候最大容量(不装满) ll n,sum; int main(){ std::ios::sy...

2018-09-15 20:42:31 108

原创 Educational Codeforces Round 50 (Rated for Div. 2) D. Vasya and Arrays(前缀和,思维)

题意:给出两个数组,可以合并两个数组中连续的部分,最后让两个数组完全一样,问合并后的数组的长度最长是多少。 分析:前缀和,然后模拟一下。 #include <iostream> #define maxn 400010 typedef long long ll; using namespace std; ll len1,len2,cnt=0; ll A[maxn],B[maxn]; ...

2018-09-15 16:35:53 113

原创 Educational Codeforces Round 50 (Rated for Div. 2) B - Diagonal Walking v.2(模拟)

#include <iostream> typedef long long ll; using namespace std; int main(int argc, const char * argv[]) { std::ios::sync_with_stdio(false); ll q,n,m,k; cin>>q; while(q--){ ...

2018-09-15 16:01:37 131

原创 Codeforces Round #508 (Div. 2) C. Gambling(优先队列,博弈)

题意: 就是两个人各自有一个列表,两人轮流进行操作。每次操作有两个选择: 一个是从自己的列表中选取一个数,然后加到自己的分数上,最后总列表中删除这个元素。 另一个是删除对方一个元素。 要求差值最大 分析: 选取自己队列中最大的元素,和对方最大的元素比较,自己的大就加,否则就删别人的元素。 #include<bits/stdc++.h> using namespace st...

2018-09-09 20:54:01 238

原创 Codeforces Round #507 (Div. 2) B - Shashlik Cooking(模拟)

分析:这个模拟写的不好,,但终于过了。 #include<bits/stdc++.h> #define maxn 100010 using namespace std; int main(){ std::ios::sync_with_stdio(false); int n,k; cin>>n>>k; int ans=2*k+1...

2018-09-09 16:47:54 216

原创 Manthan, Codefest 18 (rated, Div. 1 + Div. 2) D. Valid BFS?(BFS)

题意: 给出n-1对相连点的编号,分析广搜能否产生给定的序列。 分析: 先把每个点相连的点按照给定的顺序排序,然后广搜一下,看能否按照指定的顺序放进队列。 #include<bits/stdc++.h> #define maxn 300010 using namespace std; int n; bool flag; int a[maxn]; vector<int&gt...

2018-09-04 18:20:01 138

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除