1010.Lead of Wisdom 暴搜。。。我去除了比某一同类装备4个属性都低的装备 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a, b) for (register i ...
分类:
其他好文 时间:
2020-07-23 23:22:33
阅读次数:
184
2020 Multi-University Training Contest 2 The Oculus 题解: 这个题目很简单,就直接枚举就可以了,算法就是哈希。 #include <bits/stdc++.h> #define inf 0x3f3f3f3f using namespace std; ...
分类:
其他好文 时间:
2020-07-23 22:58:44
阅读次数:
97
基数上限为给定的那个数(不懂),需要二分查找?'?'? #include<bits/stdc++.h> typedef long long ll; int n, tag, radix; char num[2][15]; #define val(c) ('0'<=(c)&&(c)<='9'?(c)-' ...
分类:
其他好文 时间:
2020-07-23 22:22:19
阅读次数:
70
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define mem(a) memset(a,0,sizeof(a)) #define sc1(a) scanf("%lld",&a) #define sc2(a, ...
分类:
其他好文 时间:
2020-07-23 16:24:13
阅读次数:
69
https://www.luogu.com.cn/problem/P1478 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, s, a, b; 4 struct apple{ //结构体定义苹果的高度和摘苹果所用的力气 5 int ...
分类:
移动开发 时间:
2020-07-23 15:54:43
阅读次数:
85
https://www.luogu.com.cn/problem/P1223 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n; 4 struct t{ //定义结构体存放等待时间和排队编号 5 int w, no; 6 }; 7 t ...
分类:
其他好文 时间:
2020-07-22 20:56:08
阅读次数:
73
P3919 【模板】可持久化线段树 1(可持久化数组) AC_Code: 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn=1e6+10; 5 const int mo ...
分类:
其他好文 时间:
2020-07-22 20:49:10
阅读次数:
77
做完前四题还有一个半小时... 比赛链接:https://codeforces.com/contest/1382 A. Common Subsequence 题意 给出两个数组,找出二者最短的公共子序列。 题解 最短即长为一。 代码 #include <bits/stdc++.h> using na ...
分类:
其他好文 时间:
2020-07-22 11:10:39
阅读次数:
89
哈密顿绕行世界问题(HDU-2181) 题解:一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。 裸DFS; 代码: #include<bits/stdc++.h> using namespace std; const int m ...
分类:
其他好文 时间:
2020-07-22 02:01:11
阅读次数:
198
题意: 每次翻转一段区间,询问翻转区间后整个序列的逆序对数量。 题解: 每次翻转区间,那么翻转区间的答案就是整个序列的原始答案减去这个区间里逆序对的数量加上顺序对的数量。 统计逆序对和顺序对用树状数组做。 #include<bits/stdc++.h> using namespace std; co ...
分类:
编程语言 时间:
2020-07-21 23:21:03
阅读次数:
88