#include <stdio.h>int main (){ char a,b,c,d,e; a=getchar(); b=getchar(); c=getchar(); d=getchar(); e=getchar(); putchar(a); putchar(b); putchar(c); pu ...
分类:
其他好文 时间:
2019-04-25 14:32:30
阅读次数:
106
把题目要求最大化的那个式子,取一手对数,然后就变成了一个分数规划问题。 二分后AC自动机上DP即可。 cpp // luogu judger enable o2 include define N 2200 define inf (1e9+7) define eps (1e 7) define db ...
分类:
其他好文 时间:
2019-04-25 09:13:39
阅读次数:
117
先跑一遍n为起点最短路,再新开一个点,向有干草垛的点连一根边权为d[u]-w的有向边(很重要。。我当时连的无向边,然后我死了。),相当于用价值抵消一部分边权, 然后以这个新的点为起点跑最短路就好了。。。 2019.04.24 ...
分类:
其他好文 时间:
2019-04-25 01:17:50
阅读次数:
120
Gargari and Permutations CodeForces - 463D Gargari got bored to play with the bishops and now, after solving the problem about them, he is trying to d ...
分类:
其他好文 时间:
2019-04-24 19:08:56
阅读次数:
195
题目描述: bz 题解: (1)高消。 直接列异或方程组高消即可。 代码: #include<vector> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N = 105; ...
分类:
其他好文 时间:
2019-04-24 19:01:46
阅读次数:
137
传送门 求最小平均等待时间就相当于求最小总等待时间 考虑对于一个技术人员的修车顺序,$k_1,k_2,k_3,...,k_p$ 这 $p$ 辆车的车主的总等待时间为 $t_{k_1},t_{k_1}+t_{k_2},t_{k_1}+t_{k_2}+t_{k_3},...,t_{k_1}+t_{k_2 ...
分类:
其他好文 时间:
2019-04-24 12:07:19
阅读次数:
149
装备购买HYSBZ - 4004 程序使用long double 这一类型,相比于double,long double 的精度更高,但运算速度稍微慢点 这是一道及其典型的高斯消元,应对的也是各种情况,有解的,没解的,已经未知数个数比方程数多或者少或者相等 可以当做模板 ...
分类:
其他好文 时间:
2019-04-23 09:39:01
阅读次数:
121
来一发大暴力 树链剖分无疑了 对于某个询问节点,二分答案所在的深度,若该深度到该节点上的区间和 0,说明其中有满足条件的点,增加深度继续二分,否则减小深度 线段树上的操作:单点修改+区间查询(区间和) 关于时间: 时间复杂度$O(nlog^{2}n)$ 虽然不是最优解法,但能过了,稍微卡一下,总时间 ...
分类:
其他好文 时间:
2019-04-23 09:22:02
阅读次数:
165
一 #include<stdio.h>int main(){ putchar(getchar()); putchar(getchar()); putchar(getchar()); putchar(getchar()); putchar(getchar()); return 0;} 二 #inclu ...
分类:
其他好文 时间:
2019-04-22 15:15:19
阅读次数:
176
"传送门" 其实有一个显然的性质嘛:对于每个数,其实只要考虑它最右能被换到的位置就好了 然后设$f[i][j]$表示已经处理完了前$i 1$位,当前还有$j$个$1$可以自由支配(注意这里说的是当前可以自由支配,不是总共可以自由支配的$1$) 代码: c++ include include incl ...
分类:
其他好文 时间:
2019-04-22 12:06:27
阅读次数:
145