随笔分类 - dp
摘要:#include typedef long long LL;const int MOD = (int)1e9 + 7;LL L,R,G,T;int dp[62 + 1][2][2][2][2];bool vis[62 + 1][2][2][2][2];inline void add(int &a,i...
阅读全文
摘要:B. Modulo Sumtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a sequence of numbers...
阅读全文
摘要:Given 2 permutations of integers from 1 to N, you need to find the minimum number of operations necessary to change both or any one of them in such a ...
阅读全文
摘要:小明系列问题――小明序列Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 4521Description 大家都知道小明最喜欢研究跟序列有关的问题了,可是也就因为这样,...
阅读全文
摘要:Magic NumberTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 4323DescriptionThere are many magic numbers whos...
阅读全文
摘要:Zero EscapeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 289Accepted Submission(s): 135Problem...
阅读全文
摘要:A -Guess Your Way Out!Time Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 507CDescriptionAmr bought a ne...
阅读全文
摘要:A -Gargari and BishopsTime Limit:3000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 463CDescriptionGargari is jeal...
阅读全文
摘要:A.Little Pony and Expected MaximumTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 454CDescriptionTwi...
阅读全文
摘要:SRM 5102250TheAlmostLuckyNumbersDivTwoProblem StatementJohn and Brus believe that the digits 4 and 7 are lucky and all others are not. According to th...
阅读全文
摘要:SRM 1472600PeopleCircleProblem StatementThere arenumMalesmales andnumFemalesfemales arranged in a circle. Starting from a given point, you count clock...
阅读全文
摘要:C. Writing Codetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputProgrammers working on a large pr...
阅读全文
摘要:D. Bad Luck Islandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Bad Luck Island is inhabit...
阅读全文
摘要:TreesAccepts: 156Submissions: 533Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionToday CodeFamer is ...
阅读全文
摘要:排队购票Time Limit: 1 SecMemory Limit: 64 MB Submit: 1264Solved: 808Description一常球赛开始前,售票工作正在进行中。每张球票为50元,现有k(1 2 #include 3 #include 4 using namespace s...
阅读全文
摘要:完美串Description爱美之心人皆有之,GG也不例外。所以GG他对于完美串有一种热衷的爱。在GG眼中完美串是一个具有无比魅力的01子串。这个子串有之其魅力之处,对它取反后水平翻转,它又和它原来的一模一样。这就是GG热爱它的原因。但是世上并不是所有的01串都是完美串,所以GG下定决心想改造01串...
阅读全文
摘要:BracketsTime Limit:1000MSMemory Limit:65536KTotal Submissions:3624Accepted:1879DescriptionWe give the following inductive definition of a “regular bra...
阅读全文
摘要:Marriage CeremoniesTime Limit:2000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeLightOJ 1011DescriptionYou work in a company wh...
阅读全文
摘要:悦动达人Description一个游戏,在屏幕上有5个格子形成一行,每一秒都会有一个格子闪烁,格子闪烁时你需要保证至少有一只手指在格子上面, 现在我们已经知道第i秒时,第xi个格子会闪烁,我们假设手指的移动不花费时间,你现在用两根手指玩这个游戏, 设初始两根手指都在0处位置,算出n秒过后手指需要移动...
阅读全文
摘要:Caesar's LegionsTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionGaius Julius Caesar, a famous general, loved...
阅读全文