BestCoder Round #38】的更多相关文章

1001 Four Inages Strategy 题意:给定空间的四个点,判断这四个点是否能形成正方形 思路:判断空间上4个点是否形成一个正方形方法有很多,这里给出一种方法,在p2,p3,p4中枚举两个点作为p1的邻点, 不妨设为pi,pj,然后判断p1pi与p1pj是否相等.互相垂直,然后由向量法,最后一个点坐标应该为pi+pj−p1,判断是否相等就好了. #include <cstdio> using namespace std; struct node { __int64 x, y,…
#include<stdio.h> #include<string.h> #include<math.h> ]; ]; int main() { int sb; scanf("%d", &sb); int u; ; u <= sb; u++) { int n, i; ; scanf("%d", &n); memset(flag, , sizeof(flag)); ; i <= n; i++) { sca…
Harry And Physical Teacher Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 38    Accepted Submission(s): 34 Problem Description As we all know, Harry Porter learns magic at Hogwarts School. How…
1.BestCoder Round #89 2.总结:4个题,只能做A.B,全都靠hack上分.. 01  HDU 5944   水 1.题意:一个字符串,求有多少组字符y,r,x的下标能组成等比数列. 2.总结:有个坑,y,r,x顺序组公比q>1,也可反着来x,r,y顺序组. #include<iostream> #include<cstring> #include<cmath> #include<queue> #include<algorit…
BestCoder Round #90 本次至少暴露出三个知识点爆炸.... A. zz题 按题意copy  Init函数 然后统计就ok B. 博弈 题  不懂  推了半天的SG.....  结果这个题.... C 数据结构题   我写了半个小时分块   然后发现     改的是颜色.... 我的天  炸炸炸 D. 没看懂题目要干啥.....  官方题解要搞死小圆…
BestCoder Round #7 Start Time : 2014-08-31 19:00:00    End Time : 2014-08-31 21:00:00Contest Type : Register Public   Contest Status : Ended Current Server Time : 2014-08-31 21:12:12 Solved Pro.ID Title Ratio(Accepted / Submitted)   1001 Little Pony…
Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 354    Accepted Submission(s): 100 Problem Description ZYB has a tree with N nodes,now he wants you to solve the numbers of nodes distanced no m…
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 175    Accepted Submission(s): 74 Problem Description ZYB has a premutation P,but he only remeber the reverse log of each prefix of the premutat…
题目传送门 /* 设一个b[]来保存每一个a[]的质因数的id,从后往前每一次更新质因数的id, 若没有,默认加0,nlogn复杂度: 我用暴力竟然水过去了:) */ #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <algorithm> using namespace std; ; const int INF = 0x3f3f…
题目传送门 /* 贪心水题:找出出现次数>1的次数和res,如果要减去的比res小,那么总的不同的数字tot不会少: 否则再在tot里减去多余的即为答案 用set容器也可以做,思路一样 */ #include <cstdio> #include <iostream> #include <cstring> #include <string> #include <algorithm> using namespace std; ; const i…