Problem Description In a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their de ...
分类:
其他好文 时间:
2021-02-05 10:47:53
阅读次数:
0
原题链接 考察:容斥原理 错误思路: 枚举预处理每一个数C4n 的组合数,将p数组的每一个数求约数集合,将约数个数>=4的纳入容斥的集合内.再用容斥计数解决. 时间复杂度是10000*100*2出现次数>=4的约数个数 ,前面的时间复杂度已经到了1e6,如果个数>7就已经有超时风险,更不要说总共10 ...
分类:
其他好文 时间:
2021-02-01 12:59:29
阅读次数:
0
Game of Taking Stones HDU - 5973 题目大意 给你两堆石子,分别有$x$,$y$个,可以同时在两堆里取相同个数,也可以只在一堆里取不小于$1$个的石子。 \(x,y<10^{100}\) 解 首先,不考虑数据范围,这是个经典的威佐夫博弈,先手输只需满足如下式子即可: \ ...
分类:
其他好文 时间:
2021-02-01 11:37:37
阅读次数:
0
#include<iostream> #include<stack> #include<vector> #include<cstring> using namespace std; int n; char s1[10], s2[10]; vector<int> p; //记录顺序 stack<cha ...
分类:
其他好文 时间:
2021-01-30 11:54:10
阅读次数:
0
题意 定义 \(\text{He[N]}\) 表示满足以下方程的解的个数: \[ X^2\equiv X(\bmod N)(X\in [0,N-1]) \] 并且定义 \(\text{HeHe[N]}=\text{He[1]}\times \cdots \times \text{He[N]}\),对 ...
分类:
其他好文 时间:
2021-01-27 13:59:23
阅读次数:
0
地址 https://vjudge.net/problem/POJ-3187 题意是给你一个N(1<=N<=10) 要求将1到N的数字进行排列 然后进行杨辉三角运算 每行的数字等于上一行相同坐标和上一行相同坐标右边的两个数字之和 最后得到唯一的一个数字 现在给予N 和一个M 请问初始的N个数字该如何 ...
分类:
其他好文 时间:
2021-01-27 13:02:49
阅读次数:
0
原题链接 考察:二分图匹配+线性代数(?) 完全是参考大佬的思路: 根据线性代数的知识,如果矩阵的对角线全为1,说明该矩阵的秩是满的,而初等变换(交换行或者列)不改变矩阵的秩,因此行变换可由列变换代替,其实这道题感觉是在求矩阵的秩,行列变换同时进行会改变矩阵的秩,因此这道题只用行变换或者列变换即可 ...
分类:
其他好文 时间:
2021-01-25 11:35:38
阅读次数:
0
搜索空间不过 \(1e4\) ,暴力 \(bfs\) 即可得到最少操作。 输出每次操作可能需要手动模拟栈,方便找到最优解后回溯输出。 /** * poj3414 Pots * */ #include <cstdio> #include <queue> #include <iostream> #inc ...
分类:
其他好文 时间:
2021-01-25 11:05:02
阅读次数:
0
题目链接:https://vjudge.net/problem/POJ-3278 Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediatel ...
分类:
其他好文 时间:
2021-01-19 12:20:23
阅读次数:
0
地址 https://vjudge.net/problem/POJ-3050 The cows play the child's game of hopscotch in a non-traditional way. Instead of a linear set of numbered boxes ...
分类:
其他好文 时间:
2021-01-18 11:21:11
阅读次数:
0