1 #define HAVE_STRUCT_TIMESPEC 2 #include<bits/stdc++.h> 3 using namespace std; 4 const int N = 5e5 + 7; 5 const long long mod=1e9+7; 6 long long fac[ ...
分类:
其他好文 时间:
2020-02-25 21:50:34
阅读次数:
89
In the Kingdom of AtCoder, only banknotes are used as currency. There are10100+110^{100}+110100+1 kinds of banknotes, with the values of 1,10,102,103, ...
分类:
其他好文 时间:
2020-02-17 23:48:20
阅读次数:
67
人生第一场 AtCoder,纪念一下 话说年后的 AtCoder 比赛怎么这么少啊(大雾 AtCoder Beginner Contest 154 题解 A Remaining Balls We have A balls with the string S written on each of th ...
分类:
其他好文 时间:
2020-02-09 22:16:59
阅读次数:
127
二维状压写成一维状压,省略加上第i条边这一维 1 #define HAVE_STRUCT_TIMESPEC 2 #include<bits/stdc++.h> 3 using namespace std; 4 vector<pair<int,int> >v[57]; 5 long long dp[1 ...
分类:
其他好文 时间:
2020-01-29 19:30:56
阅读次数:
77
题目链接 https://atcoder.jp/contests/abc153/tasks/abc153_f 题意 : 在坐标轴上有一些怪兽,每个怪兽有对应的生命值hi,你可以对他们进行炮击,你的每次炮击可以队该点前后D范围内的怪兽造成A的伤害,问最少要炮击多少次。 我的最初的想法是先排序,扫到最左 ...
分类:
其他好文 时间:
2020-01-27 17:37:05
阅读次数:
123
应该也可以用线段树/树状数组区间更新怪兽的生命值来做 1 #define HAVE_STRUCT_TIMESPEC 2 #include<bits/stdc++.h> 3 using namespace std; 4 long long pre[200007]; 5 int main(){ 6 io ...
分类:
其他好文 时间:
2020-01-27 17:31:04
阅读次数:
62
完全背包,价值取题意代价的最小值 1 #define HAVE_STRUCT_TIMESPEC 2 #include<bits/stdc++.h> 3 using namespace std; 4 int a[10007],b[10007],f[10007]; 5 int main(){ 6 ios ...
分类:
其他好文 时间:
2020-01-27 17:20:05
阅读次数:
70
BFS可以求得最短路,DFS会找到从当前点到图中叶子结点的路径。 1 #define HAVE_STRUCT_TIMESPEC 2 #include<bits/stdc++.h> 3 using namespace std; 4 int n,m,ans; 5 char s[25][25]; 6 bo ...
分类:
其他好文 时间:
2020-01-13 22:00:44
阅读次数:
109
连打了三天的比赛,有点困。 这次比赛有点坑人,不过还是加分了。虽然比赛时我第五题没有对,但是我还是会讲六题的题解。 A题目 B题目 AB题太水了,就不多讲了。 C题目 C题也比较水,但是比赛时没发现如果一题不对就不算WA的次数(结果WA了),这里要注意一下。 好了,除了这个应该没其他的难处了, 代码 ...
分类:
其他好文 时间:
2020-01-13 21:35:26
阅读次数:
139