FOJ Problem 2273 Triangles】的更多相关文章

Problem 2273 Triangles Accept: 201    Submit: 661Time Limit: 1000 mSec    Memory Limit : 262144 KB Problem Description This is a simple problem. Given two triangles A and B, you should determine they are intersect, contain or disjoint. (Public edge o…
Problem Description This is a simple problem. Given two triangles A and B, you should determine they are intersect, contain or disjoint. (Public edge or point are treated as intersect.)  Input First line contains an integer T (1 ≤ T ≤ 10), represents…
 Problem 1759 Super A^B mod C Accept: 1368    Submit: 4639Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,C<=1000000000,1<=B<=10^1000000).  Input Th…
 Problem 1016 无归之室 Accept: 926    Submit: 7502Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description 金字塔中有一个房间名叫“无归之室”.房间地面完全由相同的矩形瓷砖覆盖.房间里布满无数的机关和陷阱,这正是其名字的由来.考古队花了几年时间研究对策,最后他们想出了一个方案.一台遥控的机器人将被送入房间,解除所有机关,然后返回.为了不触动机关,机器人必须走在瓷砖的中心区域…
Problem 1015 土地划分 Accept: 823    Submit: 1956Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description 在Dukeswood这块土地上生活着一个富有的农庄主和他的几个孩子.在他临终时,他想把他的土地分给他的孩子.他有许多农场,每个农场都是一块矩形土地.他在农场地图上划上一些直线将矩形分成若干块.当他划直线时,他总是从矩形边界上的某一点划到另一个矩形边界上的点,这条线的结束…
Problem 2107 Hua Rong Dao Accept: 503    Submit: 1054Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description Cao Cao was hunted down by thousands of enemy soldiers when he escaped from Hua Rong Dao. Assuming Hua Rong Dao is a narrow aisl…
 Problem 2282 Wand Accept: 432    Submit: 1537Time Limit: 1000 mSec    Memory Limit : 262144 KB Problem Description N wizards are attending a meeting. Everyone has his own magic wand. N magic wands was put in a line, numbered from 1 to n(Wand_i owned…
Problem D Game Accept: 145    Submit: 844Time Limit: 1000 mSec    Memory Limit : 262144 KB Problem Description Alice and Bob is playing a game. Each of them has a number. Alice’s number is A, and Bob’s number is B. Each turn, one player can do one of…
                                                                                                Problem 2283 Tic-Tac-Toe Accept: 60    Submit: 92Time Limit: 1000 mSec    Memory Limit : 262144 KB Problem Description Kim likes to play Tic-Tac-Toe. Give…
                                                                                                                                                                                                                               Problem 2257 Saya的小熊饼干 Acce…
                                                                                                                                                           Problem 2261 浪里个浪 Accept: 40    Submit: 106Time Limit: 1500 mSec    Memory Limit : 32768 KB Pro…
                                                                                                                                                                       Problem 2253 Salty Fish Accept: 35    Submit: 121Time Limit: 1000 mSec    Memory Li…
                                                                                                                                                                                    Problem 2254 英语考试 Accept: 36    Submit: 73Time Limit: 1000 mSec    Mem…
                                                                                                                                                                           Problem 2256 迷宫 Accept: 25    Submit: 52Time Limit: 1500 mSec    Memory Limit :…
                                                                                        Problem 2260 Card Game Accept: 37    Submit: 117Time Limit: 3000 mSec    Memory Limit : 32768 KB Problem Description 有如下取牌游戏: 1. 桌面上有n张卡牌从左到右排成一行,每张卡牌上有一个数字: 2. 游…
Problem 2271 X Accept: 55    Submit: 200Time Limit: 1500 mSec    Memory Limit : 32768 KB Problem Description X is a fully prosperous country, especially known for its complicated transportation networks. But recently, for the sake of better controlli…
平面上给你n(不超过2000)个点,问你能构成多少个面积在[A,B]之间的Rt三角形. 枚举每个点作为直角顶点,对其他点极角排序,同方向的按长度排序,然后依次枚举每个向量,与其对应的另一条直角边是单调的,可以用一个pointer做出来,然后可以得出那些同方向的向量的区间(这个代码好像有点问题,可能会退化,最好确定了一个LL之后,对一个方向的不要重复算RR.这里如果也改成二分就比较好,复杂度不会退化).然后通过二分可以得到A使得面积在[A,B]间的有哪些(其实这个因为也是单调的,好像也没必要二分,…
 Problem 2273 Triangles Accept: 109    Submit: 360 Time Limit: 1000 mSec    Memory Limit : 262144 KB  Problem Description This is a simple problem. Given two triangles A and B, you should determine they are intersect, contain or disjoint. (Public edg…
Petrozavodsk Summer-2016. Warsaw U Contest, XVI Open Cup Onsite. Problem A. Gambling Problem B. Colourings Problem C. Counter-manifestation Problem D. Championships 持续删除度数小于d的点 找出最大联通块 Problem E. Neon Problem F. Robots Problem G. Equation Problem H.…
Problem 2020 组合 Accept: 714    Submit: 1724Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description 给出组合数C(n,m), 表示从n个元素中选出m个元素的方案数.例如C(5,2) = 10, C(4,2) = 6.可是当n,m比较大的时候,C(n,m)很大!于是xiaobo希望你输出 C(n,m) mod p的值!  Input 输入数据第一行是一个正整数T,表示数据组…
Problem 2082 过路费 Accept: 382    Submit: 1279 Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description 有n座城市,由n-1条路相连通,使得随意两座城市之间可达.每条路有过路费,要交过路费才干通过.每条路的过路费常常会更新,现问你,当前情况下,从城市a到城市b最少要花多少过路费. Input 有多组例子,每组例子第一行输入两个正整数n,m(2 <= n<=50000,1&…
题目链接: http://acm.fzu.edu.cn/problem.php?pid=2238 题目大意: 已知等差数列A(0)的首项a和公差d,求出数列A(0)前n项和,得到新数列A(1);以此类推,最终求A(m)的第i项mod1000000007 题目思路: [动态规划] 不难推出c[i][j]=c[i-1][j]+c[i][j-1] 但是i太大不能直接递推,m<=1000不能矩阵快速幂. 通过推导可以求出c[i][j]=a*C(n+m-1,n-1)+d*C(n+m-1,n-2) 求模时除…
Problem 2111 Min Number Accept: 1025    Submit: 2022Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description Now you are given one non-negative integer n in 10-base notation, it will only contain digits ('0'-'9'). You are allowed to choos…
http://acm.fzu.edu.cn/problem.php?pid=2270 [题意] 给定6到10个点,从中选出6个不同的点组成两个三角形,使其中一个三角形可以通过另一个三角形平移和旋转得到.问有多少种不同的三角形选法? [思路] 全等 排除对称 [Accepted] #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<cmath>…
If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. {20,48,52}, {24,45,51}, {30,40,50} For which value of p  1000, is the number of solutions maximised? 题目大意: 如果p是一个直角三角形…
If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are exactly three solutions for p = 120. {20,48,52}, {24,45,51}, {30,40,50} For which value of p ≤ 1000, is the number of solutions maximised? #include <iostre…
Problem 2082 过路费    Problem Description 有n座城市,由n-1条路相连通,使得任意两座城市之间可达.每条路有过路费,要交过路费才能通过.每条路的过路费经常会更新,现问你,当前情况下,从城市a到城市b最少要花多少过路费.  Input 有多组样例,每组样例第一行输入两个正整数n,m(2 <= n<=50000,1<=m <= 50000),接下来n-1行,每行3个正整数a b c,(1 <= a,b <= n , a != b , 1…
http://acm.fzu.edu.cn/problem.php?pid=2179 Problem 2179 chriswho Accept: 57    Submit: 136 Time Limit: 10000 mSec    Memory Limit : 327680 KB  Problem Description Chriswho很喜欢数字,特别喜欢一种数字,它能整除它的每一位数字(如果该位是0当做能整除),比如说126这个数字他就很喜欢,因为126%1=126%2=126%6=0.为…
http://acm.fzu.edu.cn/problem.php?pid=2182 Problem 2182 水题 Accept: 188    Submit: 277Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description 胖哥自从当上公务员,赢取白富美,走向人生巅峰后,已经懒散到不想出题了,不仅如此,他连题目都懒得看了,现在他只会根据题目第一个单词的长度判定这个题目的难度 如果题目的第一个单词太长(长度大于3…
Problem H. Hiking in the Hills 题目连接: http://codeforces.com/gym/100531/attachments Description Helen is hiking with her friends in a highland. Their plan is to hike from their camp A to a beautiful showplace B. Unfortunately, Helen started feeling diz…