Problem 2140 Forever 0.5 Accept: 371 Submit: 1307 Special Judge Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description Given an integer N, your task is to judge whether there exist N points in the plane such that satisfy the following cond…
 Problem 2140 Forever 0.5 Accept: 36    Submit: 113    Special JudgeTime Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description Given an integer N, your task is to judge whether there exist N points in the plane such that satisfy the followi…
Forever 0.5 Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Description Given an integer N, your task is to judge whether there exist N points in the plane such that satisfy the following conditions: 1. The…
Description   Given an integer N, your task is to judge whether there exist N points in the plane such that satisfy the following conditions: 1. The distance between any two points is no greater than 1.0. 2. The distance between any point and the ori…
主要就是将圆离散化,剩下的都好办 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; #define add 0.005 ],y[]; int main() { int t,n; scanf("%d",&t); x[] = y[] = ; x[] = ,y[] = ; x[] = ] = sqrt(0.…
题目:http://acm.fzu.edu.cn/problem.php?pid=2140 题意: 题目大意:给出n,要求找出n个点,满足: 1)任意两点间的距离不超过1: 2)每个点与(0,0)点的距离不超过1: 3)有n对点之间的距离刚好为1: 4)n个点组成的多边形面积大于0.5: 5)n个点组成的多边形面积小于0.75: 思路:只要有4个点以上就是,构造时先找出四个点,再在半径为1的圆上找点就行. 很巧妙的一道题目呀.... #include <iostream> #include &…
题目是这样的: FZU Problem 2230 象棋翻翻棋(暗棋)中双方在4*8的格子中交战,有时候最后会只剩下帅和将.根据暗棋的规则,棋子只能上下左右移动,且相同的级别下,主动移动到地方棋子方将吃掉对方的棋子.将和帅为同一级别.然而胜负在只剩下帅和将的时候已定. Input 第一行T,表示T组数据. 每组数据共有四行字符串,每行字符串共八个字符 '#'表示空格 '*'表示红方帅 '.'表示黑方将 此时红方先走 每组输入之间没有空行. Output 每组数据输出一行.若为红方赢输出Red wi…
防守阵地 I Time Limit:3000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice FZU 2168 Description 部队中共有N个士兵,每个士兵有各自的能力指数Xi,在一次演练中,指挥部确定了M个需要防守的地点,按重要程度从低到高排序,依次以数字1到M标注每个地点的重要程度,指挥部将选择M个士兵依次进入指定地点进行防守任务,能力指数为X的士兵防守重要程度为Y…
这道题是有规律的博弈题目,,, 所以我们只需要找出规律来就ok了 牛人用sg函数暴力找规律,菜鸟手工模拟以求规律...[牢骚] if(m>=2) { if(n<=m) {first第一口就可以吃掉所有的.所以first必赢,} else {first无法一口吃掉所有的,所以second成了主动的了,如果first第一口吃掉k1个,那么明智的second只要吃掉k2个就可以了(n-k1-k2是偶数,也包括 0的),使得 剩下的数字是分成两个数字数目相等的堆,以后的工作便是first做什么,那么s…
已知有n个单位的水,问有几种方式把这些水喝完,每天至少喝1个单位的水,而且每天喝的水的单位为整数.看上去挺复杂要跑循环,但其实上,列举几种情况之后就会发现是找规律的题了= =都是2的n-1次方,而且这题输出二进制数就行了......那就更简单了,直接输出1,然后后面跟n-1个0就行了╮(╯_╰)╭ 下面AC代码 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm>…