ICode9

精准搜索请尝试: 精确搜索
  • General tips | They Are Billions Game Guide They Are Billions guide, walkthrough2022-08-08 13:01:06

    General tips | They Are Billions Game Guide They Are Billions guide, walkthrough They Are Billions is a complicated game in which deep mechanic knowledge, quick response to emerging challenges and adequate planning is key to victory, especially at high di

  • 「题解」Codeforces 1111D Destroy the Colony2021-07-23 11:00:46

    orz qyc 设 \(m=\frac{|s|}{2}\). 看起来很像背包,由基础组合数学知识可知,把每个字符出现次数看做体积为 \(1\) 的物品,做 01 背包后 \(m\) 能被凑出的方案数,乘上 \((m!)^2\) 再除去每个数出现次数的阶乘即为没有限制的答案。 有限制了怎么做?可以看成删去这两个物品,然后把两个物品捆

  • TSP问题的GA解法2021-07-03 11:32:12

    TSP问题 ​ TSP(Traveling Salesman Problem)是典型的NP完全问题,即其最坏情况下的时间复杂度随着问题规模的增大按指数方式增长。TSP问题可以描述为:已知n个城市之间的相互距离,某一旅行商从某一个城市出发,访问每个城市一次且仅一次,最后回到出发的城市,如何安排才能使其所走的路

  • 人工蜂群算法(Artificial Bee Colony) Java实现2021-05-20 09:04:40

    人工蜂群算法(ABC算法)(Artificial Bee Colony),附上更全面的中文注释,简单易懂 Java同时采用四个测试函数Rastrigin、sphere、Rosenbrock、Griewank测试函数。 package ABCtest; public class bee { /* ABC算法的控制参数 */ int NP=20; /* 蜂群大小(雇佣蜂+跟随蜂)*/

  • CF756D Bacterial Melee2021-02-22 14:04:18

    Description Julia is conducting an experiment in her lab. She placed several luminescent bacterial colonies in a horizontal testtube. Different types of bacteria can be distinguished by the color of light they emit. Julia marks types of bacteria with smal

  • CF1481B New Colony 题解2021-02-19 16:03:12

    我们观察到一个性质:如果一块石头滚进了垃圾桶,那么它后面滚下来的石头也必定会进入垃圾桶。 这是显然的,因为这块石头没有产生任何贡献,所以不会发生改变。 这样我们就可以暴力枚举每一块石头知道结束或者进入垃圾桶。当石头进入垃圾桶,代表输出 -1。 复杂度是 \(O(t\times n\times h_

  • D. Destroy the Colony(退背包)2019-09-16 19:37:38

    original link - http://codeforces.com/contest/1111/problem/D 题意: 给出一个字符串,每次选择两个位置的字符,问有多少种字符串满足: 可以由原字符串任意次交换两个字符后得到; 选择的字符(两个或者一个)同时只出现在一边; 其他字符只出现一边。 解析: 假设选择的字符在左边(右

  • Codeforces G. Ant colony2019-07-27 21:01:07

    题目描述: F. Ant colonytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMole is hungry again. He found one ant colony, consisting of n ants, ordered in a row. Each ant i (1 ≤ i ≤ n) has a strength si.In

  • [CF1111D]Destroy the Colony2019-02-09 20:44:15

    题目大意:有一个长度为$n(n\leqslant10^5,n=0\pmod2)$的字符串,字符集大小为$52$,有$q(q\leqslant10^5)$次询问,每次询问第$x,y$个字符在这个字符串的同一侧,并且所有相同字符在字符串的同一侧的方案数。 题解:因为字符集大小只有$52$,所以本质不同的询问只有$52\times52$种,预处理。 发现

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有