随笔分类 -  计蒜客

摘要:计蒜客 https://nanti.jisuanke.com/t/31721 题意:有肉,鱼,巧克力三种食物,有几种禁忌,对于连续的三个食物,1.这三个食物不能都相同;2.若三种食物都有的情况,巧克力不能在中间;3.如果两边是巧克力,中间不能是肉或鱼,求方案数 题解:听其他队说用杜教BM 就可以过 阅读全文
posted @ 2018-09-15 20:15 jadelemon 阅读(669) 评论(0) 推荐(0)
摘要:https://www.jisuanke.com/contest/1409/challenges 题目描述 Alice and Bob are playing a simple game. They line up a row of n identical coins, all with the h 阅读全文
posted @ 2018-08-22 10:29 jadelemon 阅读(305) 评论(0) 推荐(0)
摘要:https://www.jisuanke.com/contest/1409/challenges 题目描述 Consider a triangle of integers, denoted by T. The value at (r, c) is denoted by Tr,c , where 1 阅读全文
posted @ 2018-08-22 10:01 jadelemon 阅读(180) 评论(0) 推荐(0)
摘要:打开连接 皮克定理 以及 斜边的整点数为gcd(n,m)+1 皮克定理是指一个计算点阵中顶点在格点上的多边形面积公式,该公式可以表示为2S=2a+b-2,其中a表示多边形内部的点数,b表示多边形边界上的点数,S表示多边形的面积。 代码如下: from math import * n,m,p=list 阅读全文
posted @ 2018-04-26 13:49 jadelemon 阅读(542) 评论(0) 推荐(0)