Anton and Lines(思维)】的更多相关文章

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 Cod…
B. Anton and Lines Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/593/problem/B Description The teacher gave Anton a large geometry homework, but he didn't do it (as usual) as he participated in a regular round on Codeforc…
B. Anton and Lines   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 = ki·x + bi. It was necess…
LINK 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…
http://acm.hdu.edu.cn/showproblem.php?pid=5124 lines   Problem Description: John has several lines. The lines are covered on the X axis. Let A is a point which is covered by the most lines. John wants to know how many lines cover A.   Input: The firs…
题意是给你n条直线,和x1,x2;问 在x1,x2之间(不包括在x1,x2上) 存不存在任意两条线的交点. 说思路,其实很简单,因为给的直线的条数很多,所以无法暴力求每两条直线的交点,那么就求每条直线与x1,x2的交点, 那么直线1和x1的交点y1与x2的交点y3,直线2与x1的交点y2与x2的交点y4,如果y1>y2,y3>y4,那么画个图就知道肯定不会有交点,反之如果y1>y2,y3<y4,则有交点. 那么求出交点排序,按与x1交点升序排,如果相同的话按与x2交点降序排(此时交…
推迟了15分钟开始,B卡住不会,最后弃疗,rating只涨一分...   水(暴力枚举) A - 2Char /************************************************ * Author :Running_Time * Created Time :2015/11/4 星期三 21:33:17 * File Name :A.cpp ************************************************/ #include <cstd…
Problem UVA1471-Defense Lines Accept: 297  Submit: 2776Time Limit: 9000 mSec Problem Description After the last war devastated your country, you - as the king of the land of Ardenia - decided it was high time to improve the defense of your capital ci…
http://codeforces.com/group/1EzrFFyOc0/contest/734/problem/D 题意:就是给你一个很大的棋盘,给你一个白棋的位置还有n个黑棋的位置,问你黑棋能否一步就吃掉白棋 给你如下规则 1.‘B‘只能对角线移动,而且不能越过其他黑棋. 2.’R‘只能上下左右移动,而且不能越过其他黑棋. 3.‘Q’既能对角线移动又能左右移动,但是不能越过其他黑棋. 这是看了别人的代码,很长,但只是粘贴复制,再改一下一下就行了: #include<iostream>…
C. Alyona and mex Problem Description: Alyona's mother wants to present an array of n non-negative integers to Alyona. The array should be special. Alyona is a capricious girl so after she gets the array, she inspects m of its subarrays. Subarray is…