ACM
2015
hdu 1086 A - You can Solve a Geometry Problem too (线段的规范相交&&非规范相交)
A - You can Solve a Geometry Problem too
**Time Limit:**1000MS **Memory Limit:**32768KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
Many geometry(几何)problems were designed in the ACM/ICPC. And now, I also prepare a geometry problem for this final exam. According to the experience of many ACMers, geometry problems are always much trouble, but this problem is very easy, after all we are now attending an exam, not a contest :) Give you N (1<=N<=100) segments(线段), please output the number of all intersections(交点). You should count repeatedly if M (M>2) segments intersect at the same point.
hdoj 2036 (计算几何,叉积求面积)
改革春风吹满地 # **Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 24179 Accepted Submission(s): 12504 **
Problem Description
" 改革春风吹满地, 不会AC没关系; 实在不行回老家, 还有一亩三分地。 谢谢!(乐队奏乐)"
codeforces #329 div 2 B. Anton and Lines(几何)
B. Anton and Lines
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
The teacher gave Anton a large geometry homework, but he didn’t do it (as usual) as he participated in a regular round on Codeforces. In the task he was given a set of n lines defined by the equations y = k__i*x + b__i. It was necessary to determine whether there is at least one point of intersection of two of these lines, that lays strictly inside the strip between _x_1 < _x_2. In other words, is it true that there are1 ≤ i < j ≤ n and x’, y’, such that:
codeforces #329 div 2 A. 2Char (暴力)
·700 words·2 mins
A. 2Char
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Andrew often reads articles in his favorite magazine 2Char. The main feature of these articles is that each of them uses at most two distinct letters. Andrew decided to send an article to the magazine, but as he hasn’t written any article, he just decided to take a random one from magazine 26Char. However, before sending it to the magazine 2Char, he needs to adapt the text to the format of the journal. To do so, he removes some words from the chosen article, in such a way that the remaining text can be written using no more than two distinct letters.
hdu 1394 Minimum Inversion Number (树状数组 逆序对)
# 题目链接
题意:
这题是问一个长度为n的循环数组中,逆序对最少的个数。。。
我们可以先用树状数组求出初始的数列的逆序对。。。
然后其他的可以通过递推得到。。。。
hdu 1754 I Hate It (线段树)
I Hate It # **Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 53991 Accepted Submission(s): 21180 **
Problem Description
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。
codeforces 589 B - Layer Cake
·698 words·2 mins
B - Layer Cake
**Time Limit:**6000MS **Memory Limit:**524288KB 64bit IO Format:%I64d & %I64u
Submit Status Practice CodeForces 589B
Description
Dasha decided to bake a big and tasty layer cake. In order to do that she went shopping and bought n rectangular cake layers. The length and the width of the i-th cake layer were a__i and b__i respectively, while the height of each cake layer was equal to one.
From a cooking book Dasha learned that a cake must have a form of a rectangular parallelepiped constructed from cake layers of the same sizes.
zoj 3634 Bounty hunter(dp,已经想明白)
M - Bounty hunter
**Time Limit:**5000MS **Memory Limit:**65536KB 64bit IO Format:%lld & %llu
Submit Status
Description
Bounty hunter is a hero who always moves along cities to earn money by his power. One day he decides to N cities one by one
At the beginning ,Bounty hunter has X money and Y points of Attack force. At day 1, he will goes to city 1, then city 2 at day 2, city 3 at day 3, … At last ,he goes to city N at day N and leaves it at day N+1. In each city, he can increase his attack force by money and earn some money by accepting a task. In the city i, it costs him ai money to increase one point of attack force. And he can gets bi*yi money after finishing the task in city i while yi is his attack force after his increasing at city i.
codeforces 589 I - Lottery(水)
I - Lottery
**Time Limit:**2000MS **Memory Limit:**524288KB 64bit IO Format:%I64d & %I64u
Submit Status Practice CodeForces 589I
Description
Today Berland holds a lottery with a prize – a huge sum of money! There are k persons, who attend the lottery. Each of them will receive a unique integer from 1 to k.
The organizers bought n balls to organize the lottery, each of them is painted some color, the colors are numbered from 1 to k. A ball of color c corresponds to the participant with the same number. The organizers will randomly choose one ball – and the winner will be the person whose color will be chosen!
POJ 2253 - Frogger (floyd)
A - Frogger
**Time Limit:**1000MS **Memory Limit:**65536KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists’ sunscreen, he wants to avoid swimming and instead reach her by jumping. Unfortunately Fiona’s stone is out of his jump range. Therefore Freddy considers to use other stones as intermediate stops and reach her by a sequence of several small jumps. To execute a given sequence of jumps, a frog’s jump range obviously must be at least as long as the longest jump occuring in the sequence. The frog distance (humans also call it minimax distance) between two stones therefore is defined as the minimum necessary jump range over all possible paths between the two stones.