CF888E Maximum Subsequence 有一种叫做折半搜索的好东西 我们把数列劈成两半,分别搜索,再合并 合并可以排序+二分或者排序+单调性 代码极短 ...
分类:
其他好文 时间:
2019-09-15 16:48:18
阅读次数:
85
题目链接 https://atcoder.jp/contests/agc031/tasks/agc031_d 题解 这居然真的是个找规律神题。。。 首先要明白置换的一些基本定义,置换$p$和$q$的复合$a$定义为$a_i=p_{q_i}$, 记作$a=pq$. 有定理$(pq)^{ 1}=q^{ ...
分类:
其他好文 时间:
2019-09-14 00:35:32
阅读次数:
88
You're given a permutation aaa of length nnn (1≤n≤1051 \le n \le 10^51≤n≤105). For each i∈[1,n]i \in [1,n]i∈[1,n], construct a sequence sis_isi? by th ...
分类:
其他好文 时间:
2019-09-13 18:04:26
阅读次数:
114
题意: 已知$n$个数字,进行以下操作: $1.$区间$[L,R]$ 赋值为$x$ $2.$区间$[L,R]$ 赋值为$max(a[i] + x, 0)$ $3.$区间$[L,R]$ 询问$0$个数 已知初始值$\geq 0$,$x\geq0$。 思路: 吉司机线段树。 操作$1$可以直接打覆盖标记 ...
分类:
其他好文 时间:
2019-09-13 01:11:52
阅读次数:
124
```matlab function [best_solution,best_fit,iter] = mySa(solution,a,t0,tf,Markov) % 模拟退化算法 % ===== 输入 ======% % solution 初始解 % a 温度衰减系数 0.99 % t0 初始温度 ...
分类:
编程语言 时间:
2019-09-12 23:44:06
阅读次数:
119
题意 设 $$f_i = \left\{\begin{matrix}1 , \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ i < k\\ \prod_{j=1}^k f_{i-j}^{b_j} \ mod \ p, \ \ \ \ \ i > k ...
分类:
其他好文 时间:
2019-09-12 13:03:03
阅读次数:
73
也叫小清新线段树,用于解决区间最值修改问题 具体可以参考jiry_2神犇的集训队论文和WC2016上的PPT 此题就作为模板好了,模板的话写法是比较精妙的 ...
分类:
其他好文 时间:
2019-09-11 19:49:48
阅读次数:
63
B. New Year's Evetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSince Grisha behaved well last y ...
分类:
其他好文 时间:
2019-09-11 19:41:04
阅读次数:
108
原文链接:https://blog.csdn.net/shijing_0214/article/details/51971734 使用python的时候,经常会遇到文本编码的问题,其中最常见的就是“'gbk' codec can't decode byte 0xad in position 12: ...
分类:
其他好文 时间:
2019-09-11 15:40:58
阅读次数:
215
Sequence: Define a Sequence to generate sequential numbers automatically example:可以在 update、select、insert语句中使用 ...
分类:
数据库 时间:
2019-09-11 11:44:33
阅读次数:
83