首页 > TAG信息列表 > gon

MathProblem 42 Drunken walk problem #1

A drunk is on one point of an n-gon, such that n is an even number. The drunk moves along the perimeter of the n-gon. Each steps takes him to an adjacent point, and every step is chosen at random. What is the expected number of steps before he arrives at

百鸡百钱:实现一百块买一百只鸡,公鸡1只5块钱,母鸡1只3块钱,小鸡3只一块钱

百鸡百钱:实现一百块买一百只鸡,公鸡1只5块钱,母鸡1只3块钱,小鸡3只一块钱 public class HomeWork080502 { public static void main(String[] args) { /* 百鸡百钱:实现一百块买一百只鸡,公鸡1只5块钱,母鸡1只3块钱,小鸡3只一块钱 提示:使用for循环嵌套 成立的条件:价格总额为

Codeforces 1354C2 - Not So Simple Polygon Embedding (几何)

题面 Time limit per test: 2 seconds Memory limit per test: 256 megabytes Description You are given a regular polygon with 2⋅n vertices (it's convex and has equal sides and equal angles) and all its sides have length 1. Let's name it as 2n-gon. You

Project Euler 68: Magic 5-gon ring

考虑下面这个神奇的三解形环,六个环中填了一至六六个数字,其中每一排相加都等于九: 按顺时针方向并且从最小的外部节点所在的一排开始(这里是4, 3, 2),每一个结果都是唯一的。比如,上面的图对应的结果是{4,3,2; 6,2,1; 5,1,3}。有八种可能的方式来完成上面这个三角形环,对应四个不同的