随笔分类 - SGU
摘要:题意:给空间内两根圆柱,求轴线垂直相交时公共部分的体积。暴力积分即可。ID:Date'n'Time:Name:Task:.Ext:Status:Time:Memory:158937402.09.14 19:37HuZhifeng217.CPPAccepted499 ms46 kb精度卡爆,0.001...
阅读全文
摘要:209. Areastime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardConsider N different lines on the plane. They di...
阅读全文
摘要:#208. Toral Tickets time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard output: standardOn the planet Eisiem pa...
阅读全文
摘要:#207. Robbers time limit per test: 0.5 sec. memory limit per test: 65536 KB input: standard output: standardN robbers have robbed the bank...
阅读全文
摘要:#206. Roads time limit per test: 0.5 sec. memory limit per test: 65536 KB input: standard output: standardThe kingdom of Farland has N cit...
阅读全文
摘要:#205. Quantization Problem time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard output: standardWhen entering so...
阅读全文
摘要:#204. Little Jumper time limit per test: 0.5 sec. memory limit per test: 65536 KB input: standard output: standardLittle frog Georgie like...
阅读全文
摘要:\(O(nlogn)\)可能会超时,最优二叉树有\(O(n)\)的做法,当年合并果子全机房就我最快,哈哈。。开两个队列,一个存放未合并的节点,一个存放合并之后的子树,每次取最小时只需考虑这两个队列中的最小值即可,可以证明在队列内的元素单调。notice: 输入数据已经排好序了,Characters ...
阅读全文
摘要:多柱汉诺塔问题。 引用自wiki百科多塔汉诺塔问题在有3个柱子时,所需步数的公式较简单,但对于4个以上柱子的汉诺塔尚未得到通用公式,但有一递归公式(未得到证明,但目前为止没有找到反例):令为在有k个柱子时,移动n个圆盘到另一柱子上需要的步数,则:对于任何移动方法,必定会先将个圆盘移动到一个中间柱子...
阅读全文
摘要:各种操作:put x c:表示在第 x 列上增加 c 个积木(c>0)。tput t x c:表示在塔 t 的第 x 列上增加 c 个积木(c>0)。towers:询问共有几座塔。cubes t:询问第 t 座塔共有几个积木。length t:询问第 t 座塔的长度。tcubes t x:询问第 t...
阅读全文
摘要:给定\(p, k, A\),满足\(k, p\)是质数,求\[x^k \equiv A \mod p\]不会。。。upd:3:29两边取指标,是求\[k\text{ind}_x\equiv \text{ind}_A\mod p-1\]的解数,先求最小的解,然后暴力求之后的就行了。 1 #includ...
阅读全文
摘要:注意一个问题就是不合法状态的判定。一个是点数不对,一个是X赢了,但是0接着下了一个子,一个是0赢了,但X也接着下了子,判断一下就行了。做法是直接搜索,然后调参数。。。比较难懂的说。 1 #include 2 #define rep(_i, _n) for(int _i = 1; _i 0) re...
阅读全文
摘要:题意好难看懂的说。。。 有限状态自动机DFA是这么一个有序组;Σ代表输入字符集,表示此自动机的工作范围;U代表所有的状态集合;s是初始状态;T是最终状态;phi代表转移函数,定义为phi : U × Σ → U。 利用DFA进行字符串识别是要你做这么一件事情:The input of the a...
阅读全文
摘要:题意:有1*2的小方块,在n*m (n 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include ...
阅读全文
摘要:比较裸的题了。分解因数后消元便行了,答案就是2的自由元数量次方减一(因为空集不算答案) \(2^k-1\)//{HEADS#define FILE_IN_OUT#include #include #include #include #include #include #include #includ...
阅读全文

浙公网安备 33010602011771号