6354.Everything Has Changed 就是计算圆弧的周长,总周长=大圆周长+相交(相切)部分的小圆的弧长-覆盖掉的大圆的弧长. 相交部分小圆的弧长直接求出来对应的角就可以,余弦公式,然后反余弦得到角,由弧长公式=βr就可以了,大圆的就求大圆弧长对应的角就可以了. cosα=(/Oo/^2+r^2-R^2)/2*/Oo/*r /Oo/为两圆心角的距离. 贴一下队友博客,懒得写了... 6354计算几何 就这样,溜了.…
题意:源点处有个圆,然后给你m个圆(保证互不相交.内含),如果源点圆和这些原相交了,就剪掉相交的部分,问你最后周长(最外面那部分的长度). 思路:分类讨论,只有内切和相交会变化周长,然后乱搞就行了.题目好像不用讨论给的圆包含源点圆的情况(0?),那么只剩内含(不变).相切(增加小圆周长).相离(不变).相交(余弦定理求一下).余弦定理都快忘了,本来打算构建rt三角形233.学到一招pi = acos(-1.0). 代码: #include<cstdio> #include<set>…
6336.Problem E. Matrix from Arrays 不想解释了,直接官方题解: 队友写了博客,我是水的他的代码 ------>HDU 6336 子矩阵求和 至于为什么是4倍的,因为这个矩阵是左上半边有数,所以开4倍才能保证求的矩阵区域里面有数,就是图上的红色阴影部分,蓝色为待求解矩阵. 其他的就是容斥原理用一下,其他的就没什么了. 代码: //1005-6336-矩阵求和-二维前缀和+容斥-预处理O(1)查询输出 #include<iostream> #include&…
Stupid Tower Defense Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 151    Accepted Submission(s): 32 Problem Description    FSF is addicted to a stupid tower defense game. The goal of towe…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5375 题面: Gray code Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 626    Accepted Submission(s): 369 Problem Description The reflected binary cod…
CSGO Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 127    Accepted Submission(s): 20 Problem Description Senior Pan is crazy about CSGO and she is so skilled. She can kill every enemy she sp…
/* HDU 6033 - Add More Zero [ 简单公式 ] | 2017 Multi-University Training Contest 1 题意: 问 2^n-1 有几位 分析: 位数直接 log10 ,减一可忽略 */ #include <bits/stdc++.h> int t, m; int main() { t = 0; while (~scanf("%d", &m)) { int ans = m*log10(2); printf(&qu…
Area of Mushroom Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2390    Accepted Submission(s): 578 Problem Description Teacher Mai has a kingdom with the infinite area. He has n students guard…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4930 Fighting the Landlords Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 312    Accepted Submission(s): 100 Problem Description Fighting the…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4864 Task Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1035    Accepted Submission(s): 245 Problem Description Today the company has m tasks to…
主题链接:http://acm.hdu.edu.cn/showproblem.php?pid=4915 Parenthese sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 172    Accepted Submission(s): 69 Problem Description bobo found an anc…
FFF at Valentine Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1060    Accepted Submission(s): 506 Problem Description At Valentine's eve, Shylock and Lucar were enjoying their time as any oth…
Dying Light Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 513    Accepted Submission(s): 122 Problem Description LsF is visiting a local amusement park with his friends, and a mirror room su…
Ch’s gift Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1354    Accepted Submission(s): 496 Problem Description Mr. Cui is working off-campus and he misses his girl friend very much. After a w…
Big binary tree Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 597    Accepted Submission(s): 207 Problem Description You are given a complete binary tree with n nodes. The root node is numbere…
Colorful Tree Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1539    Accepted Submission(s): 616 Sample Input 3 1 2 1 1 2 2 3 6 1 2 1 3 2 1 1 2 1 3 2 4 2 5 3 6 Sample Output Case #1: 6 Case #…
Function Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 652    Accepted Submission(s): 267 Sample Input 3 2 1 0 2 0 1 3 4 2 0 1 0 2 3 1 Sample Output Case #1: 4 Case #2: 4 Source 2017 Multi-U…
Balala Power! Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2668    Accepted Submission(s): 562 Problem Description Sample Input 1 a 2 aa bb 3 a ba abc Sample Output Case #1: 25 Case #2: 132…
KazaQ's Socks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 338    Accepted Submission(s): 212 Sample Input 3 7 3 6 4 9 Sample Output Case #1: 3 Case #2: 1 Case #3: 2 Source 2017 Multi-Unive…
Add More Zero Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 398    Accepted Submission(s): 283 Sample Input 1 64   Sample Output Case #1: 0 Case #2: 19   Source 2017 Multi-University Trainin…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6319 Problem A. Ascending Rating Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 5943    Accepted Submission(s): 2004 Problem Description Before…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6300 Triangle Partition Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 2964    Accepted Submission(s): 1474Special Judge Problem Description Chia…
题目链接:http://acm.hdu.edu.cn/showproblem.php? pid=4902 Nice boat Time Limit: 30000/15000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 235    Accepted Submission(s): 116 Problem Description There is an old country…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4925 Apple Tree Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 188    Accepted Submission(s): 129 Problem Description I've bought an orchard an…
Balala Power! Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 4124    Accepted Submission(s): 1004 Problem Description Talented Mr.Tang has n strings consisting of only lower case characters.…
CRB and Queries Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 533    Accepted Submission(s): 125 Problem DescriptionThere are N boys in CodeLand.Boy i has his coding skill Ai.CRB wants to k…
Yu-Gi-Oh! Time Limit: 2000ms Memory Limit: 65536KB This problem will be judged on HDU. Original ID: 538364-bit integer IO format: %I64d      Java class name: Main   "Yu-Gi-Oh!", also known as "Dueling Monsters", is a popular trading ca…
The path Time Limit: 2000ms Memory Limit: 65536KB This problem will be judged on HDU. Original ID: 538564-bit integer IO format: %I64d      Java class name: Main Special Judge   You have a connected directed graph.Let d(x) be the length of the shorte…
tree Time Limit: 8000ms Memory Limit: 262144KB This problem will be judged on HDU. Original ID: 539064-bit integer IO format: %I64d      Java class name: Main   Given a rooted tree(node 1 is the root) with n nodes. The ithnode has a positive value vi…
Boring Class Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 900    Accepted Submission(s): 247 Problem Description Mr. Zstu and Mr. Hdu are taking a boring class , Mr. Zstu comes up with a prob…