2017-09-17 13:28:04 writer:pprp 签到题:1008 Chinese Zodiac #include <iostream> #include <string> #include <cstdio> #include <algorithm> #include <cmath> using namespace std; ] = {"rat", "ox", "tiger"…
Apple Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 982    Accepted Submission(s): 323 Problem Description Apple is Taotao's favourite fruit. In his backyard, there are three apple trees with…
Brute Force Sorting Time Limit: 1 Sec  Memory Limit: 128 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=6215 Description Beerus needs to sort an array of N integers. Algorithms are not Beerus's strength. Destruction is what he excels. He can destr…
题目链接  Qingdao Problem C AC自动机还不会,暂时暴力水过. #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i(a); i <= (b); ++i) #define dec(i, a, b) for (int i(a); i >= (b); --i) const int N = 1e5 + 10; string s[N]; int T; int n; int…
HDU 6206 Apple 题意: 给出四个点的坐标(每个点的坐标值小于等于1,000,000,000,000),问最后一个点是否在前三个点组成的三角形的外接圆内,是输出Accept,否输出Rejected 解题思路: 题意很好理解,就是判断一个点是否在一个圆内,或者说一个点到圆心的距离是否大于半径,关键是大整数和精度问题,题解中给出了java的解法. 设x0,y0为圆心,有圆心到三个顶点的距离相等,列出如下两个式子: (x1-x0)*(x1-x0)+(y1-y0)*(y1-y0) = (x2…
A : Apple 题意:给出三个点,以及另一个点,求最后一个点是否在三个点的外接圆里面,如果在或者在边界上,输出“Rejected”,否则输出"Accepted" 思路:先求一个外接圆,得到圆心和半径,再判一下,注意精度问题,用JAVA import java.math.BigDecimal; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner i…
2017-09-17 17:12:11 writer:pprp 找规律,质数只有是两个相邻的立方数的差才能形成,公式就是3 * n * (n + 1) +1, 判断读入的数是不是满足 这次依然只是做了两道签到题,其他题做了,但是因为没有想到好的算法,所以没有通过,唯一值得高兴的是这两个都是我自己做的 #include <iostream> #include <cstdio> #include <cmath> using namespace std; typedef lo…
The Dominator of Strings Time Limit: 3000/3000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0 Problem Description Here you have a set of strings. A dominator is a string of the set dom…
I Count Two Three Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 782    Accepted Submission(s): 406 Problem Description I will show you the most popular board game in the Shanghai Ingress Resis…
Barricade Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 997    Accepted Submission(s): 306 Problem Description The empire is under attack again. The general of empire is planning to defend his…