![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
Last0rder
最后之作
展开
-
康托 Codeforces Round #285 (Div. 2) D. Misha and Permutations Summation
然后Rank和为(p1[i]+p2[i])*(n-1)! + ... + (p1[n]+p2[n])*0! = p3[1]*(n-1)! + ... + p3[n]*0! ,但是得出的表达式可能不是规整的形式,这是我们需要检测一边,从后往前扫,如果p3[i] >= (n-i+1), 说明第 i 项已经超过 (n-i+1)*(n-i), 那么就应进位到(n-i+1)!, 即p3[i-1]+=1,原创 2015-01-18 00:40:03 · 857 阅读 · 0 评论 -
Codeforces Round #284 (Div. 2) C. Crazy Town
C. Crazy Towntime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputCrazy Town is a plane on which there are n infinite line原创 2015-01-21 12:11:56 · 1054 阅读 · 0 评论 -
Codeforces Round #233 (Div. 1) A. Cards
A. Cardstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputUser ainta loves to play with cards. He has a cards containin原创 2015-01-21 19:52:57 · 1163 阅读 · 0 评论 -
csu1563: Lexicography以及找出多重集的第k个串的讲解
Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 162 Solved: 52[Submit][Status][Web Board]DescriptionAn anagram of a string is any string that can be formed using the same letters as the原创 2015-04-07 14:19:29 · 852 阅读 · 0 评论 -
codeforces 553 A Kyoya and Colored Balls
这个题,比赛的时候一直在往dp的方向想,但是总有一个组合数学的部分没办法求,纯粹组合数学撸,也想不到办法……其实,很显然。。从后往前推,把第k种颜色放在最后一个,剩下的k球,还有C(剩余的位置,k球的总数目-1)种放法然后讨论第k-1种。。。推下去就好了但是当时没想到……这里要求组合数,由于比较大,用乘法逆元。。。当然直接套lucas也是可以的。。。。 ti原创 2015-06-25 09:53:19 · 1448 阅读 · 0 评论 -
codeforces 546 D
time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo soldiers are playing a game. At the beginning first of them原创 2015-05-23 10:58:25 · 841 阅读 · 0 评论 -
CodeForce 424C Magic Formulas
这个题就是求出给的公式的结果。只要知道异或运算满足交换律跟结合律就行了,之后就是化简公式。#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include原创 2015-07-30 10:31:15 · 743 阅读 · 0 评论