![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
【OJ题目----------------------】
文章平均质量分 78
Here_jiaxinwei
这个作者很懒,什么都没留下…
展开
-
codeforces 776c Molly's Chemicals 【思维】
C. Molly's Chemicalstime limit per test2.5 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputMolly Hooper has n different kinds o转载 2017-02-26 10:04:51 · 642 阅读 · 0 评论 -
codeforces777c
C. Alyona and Spreadsheettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDuring the lesson small girl Alyona works with one famou原创 2017-03-21 11:59:13 · 216 阅读 · 0 评论 -
PE 题目 NBUT 1226 A Simple Triangle
A Simple TriangleIn this problem you need to make a triangle ,just like the sample out. The element in the ith row and jth columnshould be the product(乘积) of i and j.InputThe first line of inp原创 2017-04-09 10:41:39 · 294 阅读 · 0 评论 -
【矩阵快速幂】 hdu1757 A Simple Math Problem
A Simple Math ProblemTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4384 Accepted Submission(s): 2630Problem DescriptionLele转载 2016-12-22 14:43:30 · 372 阅读 · 0 评论 -
hdu5423 Rikka with Tree
Rikka with TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 885 Accepted Submission(s): 405Problem DescriptionAs we know,转载 2017-04-12 20:53:49 · 263 阅读 · 0 评论 -
FZU1062 NBUT1225
洗牌问题设2n张牌分别标记为1, 2, ..., n, n+1, ..., 2n,初始时这2n张牌按其标号从小到大排列。经一次洗牌后,原来的排列顺序变成n+1, 1, n+2, 2, ..., 2n, n。即前n张牌被放到偶数位置2, 4, ..., 2n,而后n张牌被放到奇数位置1, 3, ..., 2n-1。可以证明对于任何一个自然数n,经过若干次洗牌后可恢复初始状态。现在你的的任务是计算转载 2017-04-14 08:23:41 · 130 阅读 · 0 评论 -
2017武大校赛网络预选赛C题 Divide by Six
DIVIDE BY SIX无解时输出-1s而不是WTF数据可能有前导零Input file: standard inputOutput file: standard output Time limit: 1 secondMemory limit: 512 mebibytesA positive integer number n is written on a b原创 2017-04-14 14:50:42 · 453 阅读 · 0 评论 -
ZOJ - 2313 Chinese Girls' Amusement
You must have heard that the Chinese culture is quite different from that of Europe or Russia. So some Chinese habits seem quite unusual or even weird to us.So it is known that there is one popula转载 2017-04-18 20:17:23 · 342529 阅读 · 1 评论 -
【矩阵快速幂】 hdu5015 233Matrix
233 MatrixTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2178 Accepted Submission(s): 1273Problem DescriptionIn our daily l转载 2017-04-12 20:38:30 · 335 阅读 · 0 评论 -
codeforces 777b Game of Credit Cards
B. Game of Credit Cardstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter the fourth season Sherlock an转载 2017-02-26 09:28:01 · 145 阅读 · 0 评论 -
codeforces 749C Voting
C. Votingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n employees in Alternative Cake Manufact转载 2016-12-31 09:35:15 · 305 阅读 · 0 评论 -
nyoj32 组合数
组合数时间限制:3000 ms | 内存限制:65535 KB难度:3描述找出从自然数1、2、... 、n(0<n<10)中任取r(0<r<=n)个数的所有组合。输入输入n、r。输出按特定顺序输出所有组合。特定顺序:每一个组合中的值从大到小排列,组合之间按逆字典序排列。样例输入5 3样例输出543542541532原创 2016-10-15 10:53:14 · 316 阅读 · 0 评论 -
nyoj28 大数阶乘
nyoj24 大数阶乘链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=28正确代码:#include#include#include#include#includeusing namespace std;const int maxn=40000;int a[maxn]={0};int main(){ int m,i转载 2016-10-21 09:44:39 · 245 阅读 · 0 评论 -
cf554B Cleans Up
Codeforces554B:Ohana Cleans Up转载 2016-11-20 11:01:52 · 337 阅读 · 0 评论 -
codeforce 23B party
纯转载,还没理解~B. Partytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputn people came to a party. The转载 2016-11-21 20:18:57 · 280 阅读 · 0 评论 -
康托展开、康托逆展开;nyoj139,143
康托展开 康托展开的公式是 X=an*(n-1)!+an-1*(n-2)!+...+ai*(i-1)!+...+a2*1!+a1*0! 其中,ai为当前未出现的元素中是排在第几个(从0开始)。 这个公式可能看着让人头大,最好举个例子来说明一下。例如,有一个数组 s = ["A", "B", "C", "D"],它的一个排列 s1 = ["D", "B", "A", "C"],现在要转载 2016-11-22 12:54:51 · 243 阅读 · 0 评论 -
Codeforces Round #383 (Div. 2) B. Arpa’s obvious problem and Mehrdad’s terrible solution
B. Arpa’s obvious problem and Mehrdad’s terrible solutiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTh转载 2016-12-07 15:35:02 · 264 阅读 · 0 评论 -
cf556B Case of Fake Numbers
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Case of Fake Numberstime limit per test2 secon转载 2016-11-20 11:17:09 · 273 阅读 · 0 评论 -
hihocoder 1425 What a beautiful Lake!
What a beautiful Lake!DescriptionWeiming Lake, also named "Un-named Lake", is the most famous scenic spot in Peking University. It is located in the north of the campus and is surrounded b转载 2016-11-21 21:34:19 · 315 阅读 · 0 评论 -
nyoj45 棋盘覆盖
棋盘覆盖描述在一个2k×2k(1k×2k未被覆盖过的方格,求需要类似图2方格总的个数s。如k=1时,s=1;k=2时,s=5 图1原创 2016-10-21 21:34:53 · 82 阅读 · 0 评论 -
【矩阵快速幂*模板】nyoj 301 递推求值
递推求值时间限制:1000 ms | 内存限制:65535 KB难度:4描述给你一个递推公式:f(x)=a*f(x-2)+b*f(x-1)+c并给你f(1),f(2)的值,请求出f(n)的值,由于f(n)的值可能过大,求出f(n)对1000007取模后的值。注意:-1对3取模后等于2输入第一行是一个整数T,表示测试数据转载 2017-04-12 18:56:22 · 448 阅读 · 0 评论