关闭
当前搜索:

E. Stack Sorting Codeforces(全排列与栈辅助排序)

Educational Codeforces Round 35 (Rated for Div. 2) 题目链接:http://codeforces.com/contest/911/problem/E E. Stack Sorting time limit per test 2 seconds memory limit per test 256 megabytes...
阅读(188) 评论(0)

欧拉函数 codeforces 776E - The Holmes Children

The Holmes children are fighting over who amongst them is the cleverest. Mycroft asked Sherlock and Eurus to find value of f(n), where f(1) = 1 and for n ≥ 2, f(n) is the number of distinct ordered positive integer pairs (x, y) that satisfy x + y = n and...
阅读(470) 评论(0)

UVa10375(唯一分解定理)

The binomial coefficient C(m, n) is defined as C(m, n) = m! (m − n)! n! Given four natural numbers p, q, r, and s, compute the the result of dividing C(p, q) by C(r, s). Input Input consists of a sequence of lines. Each line contains four non-negative inte...
阅读(398) 评论(0)

UVa12169(拓展欧几里得)

Once upon a time, there was an NWERC judge with a tendency to create slightly too hard problems. As a result, his problems were never solved. As you can image, this made our judge somewhat frustrated. This year, this frustration has culminated, and he has ...
阅读(407) 评论(0)

HDU 6129 just do it(组合数奇偶性)

Just do it Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1411 Accepted Submission(s): 823 Problem Description There is a nonnegative integer sequence a1...n of length n. HazelFan wants to ...
阅读(388) 评论(0)

HDU 4474 同余模定理+BFS

Yet Another Multiple Problem Time Limit: 40000/20000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 6255 Accepted Submission(s): 1451 Problem Description There are tons of problems about integer multiples. Despite...
阅读(566) 评论(0)

RMRC2016问题 B: Election(概率计算)

问题 B: Election 时间限制: 1 Sec 内存限制: 128 MB 提交: 83 解决: 12 [提交][状态][讨论版] 题目描述 After all the fundraising, campaigning and debating, the election day has finally arrived. Only two candidates remain on the ballot and you work as an aide to one of them. Reports ...
阅读(813) 评论(0)

Codeforces 785D - Anton and School - 2(范德蒙恒等式+逆元)

D. Anton and School - 2 time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output As you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Bracketo...
阅读(604) 评论(0)

poj3281 Dining 网络流匹配问题(拆点建图+Edmond-Karp算法)

Dining Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 19183 Accepted: 8556 Description Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others. Farmer John has cooked fabulous mea...
阅读(842) 评论(0)

poj2947 Widget Factory (高斯消元解模线性方程组)

Widget Factory Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 6261 Accepted: 2207 Description The widget factory produces several different kinds of widgets. Each widget is carefully built by a skilled widgeteer. The time required to build a...
阅读(449) 评论(0)

275. To xor or not to xor(高斯消元求最大亦或值)

275. To xor or not to xor time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard output: standard The sequence of non-negative integers A1, A2, ..., AN is given. You are to find some subsequence Ai1, Ai2, ..., Aik (1 <= i1 < i2 ...
阅读(439) 评论(0)

ACM高斯消元法 亦或方程组求秩 (HDU5833 Zhu and 772002)

#include #include #include #include #define set(a,i) memset(a,i,sizeof(a)) using namespace std; typedef long long ll; const int mod=1e9+7; ll qpow(ll n,ll m){n%=mod;ll ans=1;while(m){if(m%2)...
阅读(780) 评论(0)

ACM暑假训练 中石油oj 3737: 礼物(矩阵快速幂)

矩阵快速幂解决递推题 3737: 礼物 时间限制: 5 Sec 内存限制:512 MB 提交: 46 解决: 12 [提交][状态][讨论版] 题目描述 热情好客的小猴请森林中的朋友们吃饭,他的朋友被编号为 1∼N,每个到来的朋友都会带给他一些礼物:香蕉。其中,第一个朋友会带给他1个香蕉,之后,每一个朋友到来以后,都会带给他之前所有人带来的礼物个数再加他的编号的K次方那么多个。所以,假设 K=2,前几位朋友带来的礼物个数分别是: 1,5,15,37,83,… 假设 K=3,前几位朋友带来的礼物个数...
阅读(344) 评论(0)

第四届图灵杯A题 谷神的赌博游戏

问题 A: 谷神的赌博游戏 时间限制: 1 Sec  内存限制: 16 MB 提交: 412  解决: 110 [提交][状态][讨论版] 题目描述   NEUQ的谷神要和我赌一个游戏:谷神要求我随机在纸上写出整数集合{1,2,3,...,3n+1}(n是整数)的一个排列(即不重复的随机写出从1到3n+1的所有整数)。并且要求在我写的过程中,从我写的第一个数开始一直加到我...
阅读(458) 评论(2)

SDUT 3895 fireworks 山东第八届ACM大赛C题(组合数学(杨辉三角)+逆元)

题目地址:点击打开链接 fireworks Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Discuss Problem Description Hmz likes to play fireworks, especially when they are put regularly. Now h...
阅读(256) 评论(0)

SDUT 3896 HEX 山东第八届ACM大赛D题(组合数学)

题目提交地址:http://www.sdutacm.org/onlinejudge2/index.php/Home/Index/problemdetail/pid/3896.html HEX Time Limit: 4000MS Memory Limit: 131072KB Submit Statistic Discuss Problem Description...
阅读(281) 评论(0)

codeforces A. The Monster 拓展欧几里得解决等差数列最小公共值

题目地址:http://codeforces.com/contest/787/problem/A A. The Monster time limit per test 1 second memory limit per test 256 megabytes input standard input output stan...
阅读(232) 评论(0)

HDU2709Sumsets整数分解为加数,递推公式

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2709 Sumsets Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2830    Accepted Submission(s)...
阅读(310) 评论(0)

乘法逆元总结(求法及递推式)

乘法逆元 (一)、定义。 对于正整数和,如果有, 那么把这个同余方程中的最小正整数解叫做模的逆元。 个人理解: 在一些题目中,经常因为数据过大,题目要求结果要模除一个数,常见的mod=1e9+7 (素数) 有时候,代码运算过程中会用到除法,而所有数据都已经模除了mod,导致除法可能会失真。 比如在mod=14的情况下,我要求...
阅读(296) 评论(0)

poj2891 Strange Way to Express Integers (中国剩余定理+拓展欧几里得)

Strange Way to Express Integers Time Limit: 1000MS Memory Limit: 131072K Total Submissions: 15855 Accepted: 5242 Description Elina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is describ...
阅读(172) 评论(0)
22条 共2页1 2 下一页 尾页
    个人资料
    • 访问:103698次
    • 积分:3019
    • 等级:
    • 排名:第13770名
    • 原创:197篇
    • 转载:9篇
    • 译文:0篇
    • 评论:33条
    博客专栏
    最新评论