欢迎来到就算过了一载春秋的博客

不管过了几载春秋,我还是会偶尔想起。

08 2019 档案

51nod 初学者题库 1级题 python题解
摘要:学python嘻嘻,每题第一个是自己的代码,后面的是看见有些好的代码就顺手保存一波了~侵删 1916 购物 1956费马大定理扩展 1957幼儿园霸王 ******************* ******************** 1959好事成双 ******************** 205 阅读全文

posted @ 2019-08-27 12:41 就算过了一载春秋 阅读(1770) 评论(0) 推荐(0)

Manthan, Codefest 19 (open for everyone, rated, Div. 1 + Div. 2)
摘要:https://codeforces.com/contest/1208 没打rating A、XORinacci f[0]=a, f[1]=b, f[n]=f[n-1]^f[n-2], 求f[n] 可以发现,3个一周期 也就是a, b, a^b, a^b^b=a, a^a^b=b, ... 1 #i 阅读全文

posted @ 2019-08-26 22:48 就算过了一载春秋 阅读(270) 评论(0) 推荐(0)

Educational Codeforces Round 71 (Rated for Div. 2)
摘要:https://codeforces.com/contest/1207 这次没打rating A、There Are Two Types Of Burgers 数据规模不大,暴力即可 1 #include<iostream> 2 #include<sstream> 3 #include<fstrea 阅读全文

posted @ 2019-08-23 21:15 就算过了一载春秋 阅读(129) 评论(0) 推荐(0)

Codeforces Round #581 (Div. 2)(A、B、D)
摘要:http://codeforces.com/contest/1204 第二次rating,时间好晚啊,做了两道就挂机了(还以为会掉很多分,没想到只掉了7分) A、BowWow and the Timetable 每辆火车发车的时刻是4k,k>=0,给出时刻s的二进制表示求s前发车的火车数,找最高位1 阅读全文

posted @ 2019-08-21 19:17 就算过了一载春秋 阅读(258) 评论(0) 推荐(0)

[kuangbin带你飞]专题三 Dancing Links
摘要:https://vjudge.net/contest/65998#overview https://blog.csdn.net/whereisherofrom/article/details/79188290 https://www.cnblogs.com/jh818012/p/3252154.ht 阅读全文

posted @ 2019-08-21 13:59 就算过了一载春秋 阅读(278) 评论(0) 推荐(0)

Codeforces Round #580 (Div. 2)(A、B、C)
摘要:http://codeforces.com/contest/1206 第一次rating,之前几次都是赛后写题。时间实在有点晚,打完差不多24点了,一觉醒来判后A了3道,却掉了59分,不是很懂计分规则。 主要是B题WA了4发太伤了。 A、Choose Two Numbers 给定两个数组,各选其中一 阅读全文

posted @ 2019-08-19 10:33 就算过了一载春秋 阅读(196) 评论(0) 推荐(0)

2019 年百度之星&#183;程序设计大赛 - 初赛一
摘要:http://bestcoder.hdu.edu.cn/contests/contest_show.php?cid=861 没想到6点就开始了,七点多才开始打,A了1001和1005后就挂机了。。 太菜了我 1001、Polynomial 签到题。分子分母都趋近于无穷大,又都是多项式,用洛必达就好了 阅读全文

posted @ 2019-08-17 21:52 就算过了一载春秋 阅读(253) 评论(0) 推荐(0)

[kuangbin专题] KMP
摘要:https://vjudge.net/contest/278481 A - Oulipo 可重叠匹配,KMP裸题 1 #include<iostream> 2 #include<stdio.h> 3 #include<cstring> 4 using namespace std; 5 const i 阅读全文

posted @ 2019-08-15 14:26 就算过了一载春秋 阅读(170) 评论(0) 推荐(0)

Codeforces Round #578 (Div. 2)(A、B、C、D、E)
摘要:A、Hotelier 简单模拟 1 #include<iostream> 2 #include<sstream> 3 #include<fstream> 4 #include<algorithm> 5 #include<cstring> 6 #include<iomanip> 7 #include< 阅读全文

posted @ 2019-08-13 21:57 就算过了一载春秋 阅读(156) 评论(0) 推荐(0)

二维前缀和、差分习题集
摘要:https://blog.csdn.net/K_R_forever/article/details/81775899 1、HDU6514 Monitor 先给p个矩形,再给q个矩形,q个矩形中若能被p个矩形所在区域包含则YES,否则NO。转化为二维差分问题。 1 #include<iostream> 阅读全文

posted @ 2019-08-13 00:02 就算过了一载春秋 阅读(346) 评论(0) 推荐(0)

[kuangbin带你飞]专题七 线段树
摘要:https://vjudge.net/contest/66989 A、敌兵布阵 单点修改、区间查询、维护区间和 1 //CSDN:https://blog.csdn.net/qq_40889820 2 #include<iostream> 3 #include<sstream> 4 #include 阅读全文

posted @ 2019-08-11 22:34 就算过了一载春秋 阅读(265) 评论(0) 推荐(0)

Codeforces Round #577 (Div. 2) (A、B、C)
摘要:A、Important Exam 简单贪心即可 1 #include<iostream> 2 #include<sstream> 3 #include<fstream> 4 #include<algorithm> 5 #include<cstring> 6 #include<iomanip> 7 # 阅读全文

posted @ 2019-08-10 23:06 就算过了一载春秋 阅读(182) 评论(0) 推荐(0)

二分习题集
摘要:二分水有点深、 这个蛮不错的:你常写的二分查找,真的是没有bug吗? 1、POJ2456 Aggressive cows (贪心加二分) 在CSDN以前写过这篇博客:https://blog.csdn.net/qq_40889820/article/details/81675301 这里改几发试试水 阅读全文

posted @ 2019-08-09 16:21 就算过了一载春秋 阅读(253) 评论(0) 推荐(0)

后缀数组习题集
摘要:suffix(i):从第i个字符开始的后缀 sa[i]:后缀数组,“排第几的是谁”,即suffix(sa[i])<suffix(sa[i+1]),1<=i<n。 ra[i]:名次数组,“你排第几”,ra[i]表示的是suffix(i)在所有后缀中从小到大排列的“名次” height[i]:suffi 阅读全文

posted @ 2019-08-07 20:01 就算过了一载春秋 阅读(748) 评论(0) 推荐(1)

LeetCode #1 两数之和
摘要:给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。 来源:力扣(LeetCode)链接:https://leetcode-cn.com/probl 阅读全文

posted @ 2019-08-06 22:21 就算过了一载春秋 阅读(296) 评论(0) 推荐(0)

J-Jumbled String(2018NCPC)
摘要:VJ上题目链接:https://vjudge.net/problem/Kattis-jumbledstring 看题目以为是关于字符串匹配的,理解后发现原来是关于计数的? 给定a、b、c、d四个整数,求一个01串,要求该串能找到a个00,b个01,c个10,d个11。(子序列,不必连续) 根据a个0 阅读全文

posted @ 2019-08-06 16:34 就算过了一载春秋 阅读(332) 评论(0) 推荐(0)

树状数组习题集
摘要:1、HDU2689 Sort it 求最少的步数使得序列升序,无重复数据,每步只能交换两个相邻的数。树状数组求逆序对。 1 #include<iostream> 2 #include<sstream> 3 #include<fstream> 4 #include<algorithm> 5 #incl 阅读全文

posted @ 2019-08-05 10:49 就算过了一载春秋 阅读(212) 评论(0) 推荐(0)

Codeforces Round #576 (Div. 2)(A、B、C、D)
摘要:http://codeforces.com/contest/1199 1、City Day 水题,简单循环判断 1 #include<iostream> 2 #include<sstream> 3 #include<fstream> 4 #include<algorithm> 5 #include< 阅读全文

posted @ 2019-08-04 21:27 就算过了一载春秋 阅读(164) 评论(0) 推荐(0)

导航