自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

老铁,干了这碗algorithms的博客

每天都被自己菜到

  • 博客(15)
  • 收藏
  • 关注

原创 算法实验课

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/m0_37428263/article/details/80113568ps:开玩笑的,请随意1.格雷码构造问题 (分治法)//分治法/*the sample input:4the sample output:11110111001110111001000101011101...

2018-04-27 21:22:40 583

原创 高斯消元法 (列主元素消元法 LU分解 高斯-赛德尔迭代法)+ 双点割线法 + 最小二乘法 + 拉格朗日插值法

1.列主元素消元法//列主元素消元法#include <iostream>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;typedef pair<double,int>PII;const int maxn=100+5;double...

2018-04-27 21:00:15 1028

原创 Tinkoff Internship Warmup Round 2018 and Codeforces Round #475 (Div. 2) (弱鸡持续更新中) 特别注意a的-k次方取模方法

点击打开链接A. Splits 数学题 思维题#include <iostream>#include<cstdio>using namespace std;int main(){ std::ios::sync_with_stdio(false); cin.tie(0); int n; scanf("%d",&n); c...

2018-04-23 22:57:09 165

原创 Helvetic Coding Contest 2018 online mirror A2. Death Stars (medium) memcmp+思维

点击打开链接//substr是C++函数,主要功能是复制子字符串,要求从指定位置开始,并具有指定的长度#include <bits/stdc++.h>using namespace std;const int maxn=2000+5;string s1[maxn],s2[maxn];int main(){ std::ios::sync_with_stdio(fals...

2018-04-21 23:12:02 171

原创 Helvetic Coding Contest 2018 online mirror (teams allowed, unrated) easy难度

点击打开链接A1:思维题#include <bits/stdc++.h>using namespace std;char s[15][15],s1[15][15];int main(){ int n,cnt1=0; scanf("%d",&n); for(int i=0;i<n;i++) { scanf("%s"...

2018-04-17 19:37:17 163

原创 poj 2413 How many Fibs? 打表+二分查找+大数加和模板

点击打开链接#include<iostream>#include<cstdio>#include<algorithm>using namespace std;const int maxv=600+5;string sum[maxv];//大数加和模板string bigsum(string s1,string s2){ if(s1.le...

2018-04-17 19:12:34 241

原创 NYOJ 题目448 寻找最大数 贪心

点击打开链接//贪心#include <iostream>#include<cstdio>#include<cstring>using namespace std;const int maxn=100+5;char s[maxn];int maze[maxn];int main(){ int T; scanf("%d",&amp...

2018-04-12 17:10:10 173

原创 Codeforces Divide by Zero 2018 and Codeforces Round #474 (Div. 1 + Div. 2, combined) B 贪心

点击打开链接//在a数组上进行k1次操作,在b数组上进行k2次操作 操作必须全部完成#include<bits/stdc++.h>using namespace std;const int maxn=1000+5;typedef long long LL;LL a[maxn],b[maxn];int main(){ int n,k1,k2; scanf("...

2018-04-12 13:33:11 139

原创 Codeforces Educational Codeforces Round 42 (Rated for Div. 2) D Merge Equals 自定义优先队列(C++加速输入输出流)

点击打开链接#include<bits/stdc++.h>using namespace std;typedef long long LL;const int maxn=150000+5;LL a[maxn];struct node{LL x;int y;node(LL x,int y):x(x),y(y) {}friend bool operator<(nod...

2018-04-12 10:55:00 132

原创 Codeforces Educational Codeforces Round 42 (Rated for Div. 2) C. Make a Square 打表+bfs (小心溢出)

点击打开链接丑陋的代码:因为溢出问题被hack,很难受 //打表 bfs #include <bits/stdc++.h> using namespace std; typedef long long LL; const int maxn=1e5; set<LL>s; string n; struct node{...

2018-04-11 20:19:31 106

原创 Codeforces Educational Codeforces Round 42 (Rated for Div. 2) B. Students in Railway Carriage 填放人数

点击打开链接#include<iostream>#include<cstdio>#include<cstring>using namespace std;typedef long long LL;const int maxn=2*1e5+5;char s[maxn];int main(){ int n,a,b; scanf("%d...

2018-04-11 12:58:13 260

原创 Codeforces Educational Codeforces Round 42 (Rated for Div. 2) A - Equator 二分(注意向上取整)

点击打开链接注意向上取整,因为这个问题被别人hack掉#include <iostream>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;typedef long long LL;const int maxn=2*1e5+5;LL sum[ma...

2018-04-11 09:58:18 165

原创 Educational Codeforces Round 41 (Rated for Div. 2) C. Chessboard 暴力

点击打开链接//有四个碎的棋盘,要给小方格上色使得它与四周的小方格颜色不同//共有6种情况#include<iostream>#include<cstdio>#include<algorithm>using namespace std;const int maxn=200+5;char maze[maxn][maxn],field[maxn][ma...

2018-04-09 00:02:28 125

原创 Codeforces Educational Codeforces Round 41 (Rated for Div. 2) D - Pair Of Lines 几何问题

点击打开链接#include<iostream>#include<cstdio>#include<queue>#include<cstring>#include<cmath>using namespace std;const int maxn=1e5+10;const double eps=0.00000001;struc...

2018-04-08 11:49:52 143

原创 Codeforces Educational Codeforces Round 41 (Rated for Div. 2) B. Lecture Sleep

点击打开链接#include <iostream>#include<cstdio>#include<algorithm>using namespace std;typedef long long LL;const int maxn=1e5+5;int a[maxn],t[maxn];int main(){ int n,k; sca...

2018-04-05 10:35:27 475

空空如也

空空如也

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

TA关注的人

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