
hiho
JeraKrs
本人目前就职于百度商业研发部,有需要内推的朋友简历可发我邮箱 jerakrs@qq.com
展开
-
hihoCoder 1225 向日葵(凸包)
题目链接:hihoCoder 1225 向日葵枚举每条线段称为凸包边界的概率。注意一对点中有1个在线段左边*0.5,0个在线段左边*0,2个都在线段左边*1。最后答案要除4,因为枚举的两个点也要算概率。#include #include #include #include #include #include using namespace std;typed原创 2015-08-31 23:44:29 · 947 阅读 · 0 评论 -
hihoCoder 1259 A Math Problem(数位dp)
题目链接:hihoCoder 1259 A Math Problem解题思路公式推导完为f(2n) = 3 * f(n), f(2n+1) = 3 * f(n) + 1,即为i的2进制作为3进制计算贡献。代码#include <cstdio>#include <cstring>#include <cmath>#include <algorithm>using namespace std;ty原创 2015-11-16 15:48:18 · 1749 阅读 · 1 评论 -
hihoCoder 1255 Mysterious Antiques in Sackler Museum(水)
题目连接:hihoCoder 1255 Mysterious Antiques in Sackler Museum代码#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int maxn = 10;int X[maxn], Y[maxn];bool solve(int* x, int*原创 2015-11-16 15:43:18 · 1086 阅读 · 0 评论 -
hihoCoder 1258 Osu! Master(水)
题目链接:hihoCoder 1258 Osu! Master代码#include <cstdio>#include <cstring>#include <algorithm>using namespace std;int main () { int n, c; char order[5]; while (scanf("%d", &n) == 1) { i原创 2015-11-16 15:45:51 · 725 阅读 · 0 评论 -
hihoCoder 1249 Xiongnu's Land(二分)
题目链接:hihoCoder 1249 Xiongnu’s Land代码#include <cstdio>#include <cstring>#include <algorithm>using namespace std;typedef long long ll;const int maxn = 10005;int N, R, L[maxn], T[maxn], W[maxn], H[max原创 2015-11-16 15:38:57 · 1389 阅读 · 0 评论 -
hihoCoder 1251 Today Is a Rainy Day(暴力)
题目连接:hihoCoder 1251 Today Is a Rainy Day解题思路用一个6位6进制表示每个数对应的转换,用广搜预处理代价。代码#include <cstdio>#include <cstring>#include <queue>#include <algorithm>using namespace std;const int maxn = 50005;const in原创 2015-11-16 15:41:28 · 1687 阅读 · 1 评论 -
hihoCoder 1236 Scores(bitset+分块)
题目链接:hihoCoder 1236 Scores解题思路将5维分开考虑,对于每一维,将n分成sqrt(n)长度为一块,用bitset维护,S[i]表示0~i这些中包含的元素id。对于每次查询,用二分找到对应为值,处理出对应的二进制位。然后5维结果取且。代码#include <cstdio>#include <cstring>#include <cmath>#include <bitset>原创 2015-10-07 12:20:50 · 1059 阅读 · 0 评论 -
hihoCoder 1233 Boxes(bfs)
题目链接:hihoCoder 1233 Boxes解题思路确定n,bfs预处理出所有可达状态。代码#include <cstdio>#include <cstring>#include <vector>#include <queue>#include <algorithm>using namespace std;const int maxn = 10;const int maxs = 1原创 2015-10-07 12:15:23 · 608 阅读 · 0 评论 -
hihoCoder 1231 Border Length(几何)
题目链接:hihoCoder 1231 Border Length解题思路处理处所有交点,按照交点和存在的点分段,如果是圆,则每一段均为弧,如果是多边形的边,则每一段为线段。每段取中间点,判断是否在多边形或者圆中。代码#include <cstdio>#include <cstring>#include <cmath>#include <vector>#include <complex>#原创 2015-10-07 12:07:59 · 812 阅读 · 0 评论 -
hihoCoder 1227 The Cats' Feeding Spots(水)
题目链接:hihoCoder 1227 The Cats’ Feeding Spots代码#include <cstdio>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const int maxn = 105;const int inf = 0x3f3f3f3f;int M, N;do原创 2015-10-07 12:02:44 · 692 阅读 · 0 评论 -
hihoCoder 1228 Mission Impossible 6(模拟)
题目链接:hihoCoder 1228 Mission Impossible 6解题思路纯模拟,因为限制了字符串的长度,所以时间上可以接受。代码#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int maxn = 1e4 + 5;struct Stack { int n;原创 2015-10-07 12:05:09 · 642 阅读 · 0 评论 -
hihoCoder 1234 Fractal(水)
题目链接:hihoCoder 1234 Fractal代码#include <cstdio>#include <cstring>#include <algorithm>using namespace std;int main () { int cas; scanf("%d", &cas); while (cas--) { double x, l = 0,原创 2015-10-07 12:16:41 · 775 阅读 · 0 评论 -
hihoCoder 1232 Couple Trees(LCA)
题目链接:hihoCoder 1232 Couple Trees解题思路用倍增求出每个节点的LCA值,f[u][i]f[u][i]表示u节点的第2i2^i个父亲节点。然后将其排序,用作二分。每次两个节点向上移动,因为节点编号小的一定层数低,所以可以判断哪一个节点移动。代码#include <cstdio>#include <cstring>#include <algorithm>using na原创 2015-10-07 12:12:32 · 897 阅读 · 1 评论 -
hihoCoder 1257 Snake Carpet(构造)
题目链接:hihoCoder 1257 Snake Carpet代码#include <cstdio>#include <cstring>#include <vector>#include <algorithm>using namespace std;typedef pair<int,int> pii;char ans[5][100] = { "1 1\n1 1", "1 3\n1 1\n1原创 2015-11-16 15:44:41 · 849 阅读 · 0 评论