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 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 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…
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 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…
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…
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…