自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 收藏
  • 关注

转载 关于我

我是一名来自福州三中的高二蒟蒻OIer。。。Q:为什么最近开始更博客了?A:颓了这么久,离省选还有一个月,感觉不能颓了(其实高一都颓了一年了),看大家都写了一个自我介绍我也写一下吧也顺便写一点自己的一些计划吧Q:什么时候开始学OI的?A:不知道,可能是初一也可能是初二吧,接触C++算是初一,正式算法竞赛算是初二吧。初一主要在搞一些windows api还有学习如何编写外挂...

2019-03-04 23:08:00 79

转载 简单计数 题解

最近在搞线代,拿了一道以前zzq的模拟题做了一下前置技能:best定理一个有向图的欧拉回路个数等于内向树个数乘上所有(deg[i]-1)!的乘积我们考虑拆开算贡献,考虑经过(u,v),(v,w)的欧拉回路个数,我们把(u,v),(v,w)断开,连上(u,w),如果v是孤立点,特判一下,否则我们发现我们改的矩阵的位置只会是4个,其中3个和v相关,直接删除掉即可,剩...

2019-03-04 21:36:00 128

转载 Arithmetic of Bomb 2 题解

传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6145我们考虑记下状态a+b*c那么考虑一个非括号与'#'的字符,如果是一个数字,那么显然变成a+b*(c*10+d)如果是乘号,那么显然a+(b*c)*0如果是加号,那么是(a+b*c)+1*0如果是减号,那么是(a+b*c)-1*0我们发现a,b,b*c,1的变换是线...

2019-03-02 15:04:00 113

转载 [LOJ#6053]简单的函数 题解

最近在搞min_25筛,就写几道筛法题吧模板题,直接套板子就好了//waz#include <bits/stdc++.h>using namespace std;#define mp make_pair#define pb push_back#define fi first#define se second#define ALL...

2019-02-28 22:46:00 115

转载 min_25筛

第一部分在我之前的随笔里面:https://www.cnblogs.com/AnzheWang/p/10447118.html转载于:https://www.cnblogs.com/AnzheWang/p/10453307.html

2019-02-28 21:32:00 71

转载 [Project Euler 603]Substring sums of prime concatenations 题解

傻逼题,倍增合并,考虑跨过中间部分的答案,算起来细节有点烦,写挂了一小部分调了2个多小时……//waz#include <bits/stdc++.h>using namespace std;#define mp make_pair#define pb push_back#define fi first#define se second...

2019-02-28 16:26:00 101

转载 [Project Euler 521]Smallest prime factor 题解

为什么博客园的LaTex有问题啊。跑了40s左右,跑得还是有点久……//waz#include <bits/stdc++.h>using namespace std;#define mp make_pair#define pb push_back#define fi first#define se second#def...

2019-02-27 21:28:00 138

转载 [Project Euler 520]Simbers 题解

传送门:https://projecteuler.net/problem=520一个假数位dp。矩阵乘法调了一年。。。刚开始以为是个倍增fwt,发现怎么算复杂度都不对。后面发现好像所有奇数和偶数本质是一样的,除了前导0要容斥一下。似乎可以推式子了。枚举$t$个奇数要用,$f_{i,j,k}$表示前i位,有$j$个偶数出现次数为偶数,有$k$个奇数出现次数为奇数考虑...

2019-02-27 16:46:00 65

转载 [Project Euler 517]A real recursion 题解

传送门:https://projecteuler.net/problem=517题意还是很简洁的。刚开始打了一个表,发现没有什么规律,最后仔细盯了一下式子,发现这是将用1和根号n填,直到大于n-根号n的方案数。显然这个东西是一个组合数,考虑枚举填了多少个根号,算一下方案即可。单词复杂度是根号的,跑了大概0.4s。//waz#include <bits/std...

2019-02-27 10:53:00 71

转载 NOIWC2019 & FJWC2019 游记

NOIWC凉了。去年Ag今年Cu。讲课基本没听(听不懂),都在宿舍狗着。44+40+0=84。(我发现有好多84的)t1是一道计数题,推了一个半小时,算出来一个关于组合数和prufer序列计数的式子,组合数的那部分可以多项式操作化掉,但是prufer序列那部分推不出来(水平不行),44分去看T2了。t2是一道造计算机,第一个点和第三个点是送的,第二个点我打了一个表最后...

2019-02-26 22:59:00 147

转载 NOIP2018 游记

我的atcoder做题是不是咕了,最近在读一些文化课,准备会考。noip考得一般。Day1 不说了,300分是平均水平,而低于平均水平的我至今不知道T3为什么wa了两个点,我的做法明明和大家一样qwq……大概90min写完的,中途有个小插曲,就是我T2一打开看想到的居然不是背包,而是直接头铁生成函数,写了个多项式求逆,写完过了样例打算写暴力对拍,才猛然惊觉,n=100,...

2018-11-24 16:24:00 59

转载 AtCoder Grand Contest 015 题解

A - A+...+B Problem可以取到的值一定是一段区间。所以答案即为max-min+1 1 //waz 2 #include <bits/stdc++.h> 3 4 using namespace std; 5 6 #define mp make_pair 7 #define pb push_back 8 #defin...

2018-09-24 20:06:00 82

转载 AtCoder Grand Contest 014 题解

A - Cookie Exchanges直接模拟即可,如果出现循环了那就GG了。 1 //waz 2 #include <bits/stdc++.h> 3 4 using namespace std; 5 6 #define mp make_pair 7 #define pb push_back 8 #define fi fir...

2018-09-21 14:28:00 106

转载 AtCoder Grand Contest 013 题解

A - Sorted Arrays贪心,看看不下降和不上升最长能到哪,直接转移过去即可。 1 //waz 2 #include <bits/stdc++.h> 3 4 using namespace std; 5 6 #define mp make_pair 7 #define pb push_back 8 #define fi...

2018-09-20 08:19:00 131

转载 AtCoder Grand Contest 012 题解

A - AtCoder Group Contest排序一下,贪心取就好了。 1 //waz 2 #include <bits/stdc++.h> 3 4 using namespace std; 5 6 #define mp make_pair 7 #define pb push_back 8 #define fi first...

2018-09-18 22:06:00 124

转载 AtCoder Grand Contest 011 题解

A - Airport Bus贪心,能取就取。 1 //waz 2 #include <bits/stdc++.h> 3 4 using namespace std; 5 6 #define mp make_pair 7 #define pb push_back 8 #define fi first 9 #define se...

2018-09-18 22:01:00 96

转载 AtCoder Grand Contest 010 题解

A - Addition如果奇数的个数是奇数就无解,否则就有解。//waz#include <bits/stdc++.h> using namespace std; #define mp make_pair#define pb push_back#define fi first#define se second#define A...

2018-09-13 22:08:00 91

转载 AtCoder Grand Contest 009 题解

A - Multiple Array倒着算要加多少就好了。//waz#include <bits/stdc++.h> using namespace std; #define mp make_pair#define pb push_back#define fi first#define se second#define ALL(...

2018-09-13 17:41:00 81

转载 NOIP2017 Day2 题解

A - 奶酪直接用并查集维护即可。(本来一个dfs就够了)#include <cstdio>#include <cstring>#include <cstdlib>#include <algorithm>#include <ctime>#include <iostream>#inc...

2018-09-12 23:52:00 87

转载 NOIP2017 Day1 题解

去年水平不行,导致noip滚粗,现在来复习一下,今年要小心了。A - 小凯的疑惑裴蜀定理。//waz#include <bits/stdc++.h>using namespace std;#define mp make_pair#define pb push_back#define fi first#define se seco...

2018-09-12 21:20:00 108

转载 AtCoder Grand Contest 008 题解

A - Simple Calculator模拟+分类讨论即可。//waz#include <bits/stdc++.h> using namespace std; #define mp make_pair#define pb push_back#define fi first#define se second#define AL...

2018-09-12 10:02:00 104

转载 AtCoder Grand Contest 007 题解

A - Shik and Stone直接模拟判断就好了。//waz#include <bits/stdc++.h> using namespace std; #define mp make_pair#define pb push_back#define fi first#define se second#define ALL(x...

2018-09-11 20:08:00 126

转载 Atcoder Grand Contest 006 题解

A - Prefix and Suffix模拟。//waz#include <bits/stdc++.h> using namespace std; #define mp make_pair#define pb push_back#define fi first#define se second#define ALL(x) (x...

2018-09-10 23:29:00 51

转载 Atcoder Grand Contest 005 题解

A - STring用一个栈模拟即可。//waz#include <bits/stdc++.h> using namespace std; #define mp make_pair#define pb push_back#define fi first#define se second#define ALL(x) (x).beg...

2018-09-10 18:30:00 84

转载 Atcoder Grand Contest 004 题解

A - Divide a Cuboid如果一边是偶数,肯定一刀切一半最优,否则看一下切出来的差就是另外两边的乘积。//waz#include <bits/stdc++.h> using namespace std; #define mp make_pair#define pb push_back#define fi first#de...

2018-09-09 22:31:00 100

转载 Atcoder Grand Contest 003 题解

A - Wanna go back home如果有S就必须要有N,反之亦然,如果有E必须要有W,反之亦然。判断一下就好了。//waz#include <bits/stdc++.h>using namespace std;#define mp make_pair#define pb push_back#define fi first#...

2018-09-08 17:04:00 97

转载 Atcoder Grand Contest 002 题解

A - Range Product经过0答案肯定是0,都是正数肯定是正数,都是负数的话就奇负偶正。//waz#include <bits/stdc++.h> using namespace std; #define mp make_pair#define pb push_back#define fi first#define se ...

2018-09-08 13:23:00 85

转载 Atcoder Grand Contest 001 题解

最近在刷AGC,就写一下题解。A - BBQ Easysort完,每相邻两个组成一组,发现这样肯定是最优的。//waz#include <bits/stdc++.h> using namespace std; #define mp make_pair#define pb push_back#define fi first#def...

2018-09-07 20:14:00 158

空空如也

空空如也

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

TA关注的人

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