搞死人的题目,,, 就是在n*n的方格中找路径长度为L的回路. 开始的思路值适合n为偶数的情况,而忽视了奇数的case,所以wa了一次. 然后找奇数case的策略,代码从70多行变成了100多,然后改了又改,自己在下面测了好久,交上去1y,但心里却无成就感. 这样的一个题目,提不上什么思路,可以算作是乱搞的,下次比赛中再次碰到类似甚至同样的题目,我并不能保证能写出来. 代码如下: #include <cstdio> #include <cstring> #include <c…
大意: 有一张N*N的网格,你每次可以走一步,每格只能走一次,有没有一种方法让走了L步后回到一个距原点1步远的格子?  没有输出Unsuitable device,否则输出Overwhelming power of magic并输出方案.  一开始用DFS 奇偶剪枝了还是TLE, 代码如下: #include<iostream> #include<cstring> #include<cmath> #define N 110 using namespace std; in…
水题一个,代码挫了一下: 题意不好理解. 你去一个洞窟内探险,洞窟内有许多宝石,但都有魔法守护,你需要用魔法将它们打下来. 每个宝石都有自己的防御等级,当你的魔法超过它的防御等级时它就会被你打下来. 但是,当它被你打下来的时候,它会反弹你的魔法.如果反弹的魔法过强,你就会被自己的魔法杀死. 很不幸的是,你的魔法是群体性的,你不能选择攻击谁,只要防御等级低于你魔法水平的宝石都会被你打下来.并且每个都会反弹你的魔法. 你可以假设你的魔法水平无限大,但你躲避反弹的魔法的能力却并不是很强. 输入: 第一…
搞这个题差不多是从比赛开始到结束. 从自信慢慢的看题一直到wrong到死. 这个题目可以说成是思路题,以为我们只要明白一点,这道题就成了纯暴力的水题, 那就是当操作数不足栈中数字数目的时候,我们就没有必要复制了. 注意数组要开足,如果是一路复制的话,2^20就可以到10^6次方级了,在cur<n的情况下,cur的范围是有可能超10^6的,所以,我们至少要开到2*10^6大小. 代码如下: #include <cstdio> #include <cstring> #includ…
题目 #include<cstdio> #include<algorithm> using namespace std; #define N 1005 int n, m, cnt; int a[N], b[N], dp[N]; //dp[i]表示到a[i]大的怪物都死最少要多少个spell int main() { scanf("%d%d", &n, &m); for(int i = 1; i <= n; i++) { scanf(&quo…
题意:给一个长度为n数组{a[i]}.有m个操作Ti,Si,Li表示找以Ti值结束,以Si值开始,长度为Li的连续子串.找到后,将区间的答案值设为1.一开始答案值全部为0.最后输出n个答案值. 好久没打题了 算法:排序,乱搞.主要是要考虑到排序的时候,len大的放前边,这样可以break省掉不少时间.最后注意题目要求的输出顺序,是类似于输入顺序的理解. #include <cstdio> #include <cstring> #include <iostream> #i…
原题链接:http://acm.timus.ru/problem.aspx?space=1&num=1780 1780. Gray Code Time limit: 0.5 secondMemory limit: 64 MB Denis, Vanya and Fedya gathered at their first team training. Fedya told them that he knew the algorithm for constructing aGray code. Cre…
Power Hungry CowsTime Limit: 1000MS Memory Limit: 30000K Total Submissions: 4570 Accepted: 1120 Description FJ's cows would like to be able to compute integer powers P (1 <= P <= 20,000) of numbers very quickly, but need your help. Because they're g…
This world need more Zhu Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 262    Accepted Submission(s): 49 Problem Description As we all know, Zhu is the most powerful man. He has the infinite…
Running OrientDB the First Time First, download and extract OrientDB by selecting the appropriate package provided in our download page(click here for aditional installation methods). Start the server by running the server.sh or server.bat scripts lo…
什么毒瘤... 解:n = 1的,发现就是一个二次函数,解出来一个v的取值范围,选最大的即可. n = 2的,猜测可以三分.于是先二分给第一段路多少能量,然后用上面的方法求第二段路的最短时间.注意剩余能量不足跑完第二段路的时候,返回INF. 正解是啥拉格朗日乘子法,完全搞不倒... /** * There is no end though there is a start in space. ---Infinity. * It has own power, it ruins, and it go…
题意:给你三棵树,求所有点对在三棵树上的距离和中的最大值. 解:首先有个暴力,然后还有个迭代乱搞,可以得到61分... namespace bf { inline void solve() { ; i <= n; i++) { for(int j = i; j <= n; j++) { Ans = std::max(Ans, t1.dis(i, j) + t2.dis(i, j) + t3.dis(i, j)); } } printf("%lld\n", Ans); ret…
This year's National Day coincides with the Mid-Autumn festival, the double false merger about eight days of vacation, for the "golden week", every office worker want their holiday had a full and meaningful, more hope through the holidays to adj…
This world need more Zhu Time Limit: 12000/6000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 454    Accepted Submission(s): 84 Problem Description As we all know, Zhu is the most powerful man. He has the infinite…
This world need more Zhu 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5840 Description As we all know, Zhu is the most powerful man. He has the infinite power to protest the world. We need more men like Zhu! In Duoladuo, this place is like a tree.…
题目链接 hdu-6681 Problem Description Rikka's birthday is on June 12th. The story of this problem happens on that day. Today is Rikka's birthday. Yuta prepares a big cake for her: the shape of this cake is a rectangular of n centimeters times m centimete…
Understanding Variational Autoencoders (VAEs) 2019-09-29 11:33:18 This blog is from: https://towardsdatascience.com/understanding-variational-autoencoders-vaes-f70510919f73 Introduction In the last few years, deep learning based generative models hav…
https://blog.paulhankin.net/fibonacci/ This code, somewhat surprisingly, generates Fibonacci numbers. def fib(n): return (4 << n*(3+n)) // ((4 << 2*n) - (2 << n) - 1) & ((2 << n) - 1) In this blog post, I'll explain where it co…
切题ing!!!!! HDU  2196 Anniversary party 经典树形DP,以前写的太搓了,终于学会简单写法了.... #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <map> #include <queue> #include <set>…
Waiting ten thousand years for Love Time Limit: 10000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1057    Accepted Submission(s): 335 Problem Description It was ten thousand years, after Demon Lemon caught Y…
这是六个人的故事,从不服输而又有强烈控制欲的monica,未经世事的千金大小姐rachel,正直又专情的ross,幽默风趣的chandle,古怪迷人的phoebe,花心天真的joey——六个好友之间的情路坎坷,事业成败和生活中的喜怒哀乐,无时无刻不牵动着彼此的心,而正是正平凡的点点滴滴,却成为最令人感动与留恋的东西. 人物:1.瑞秋•格林(RACHEL GREENE)由珍妮佛•安妮斯顿(Jennifer Aniston)扮演 瑞秋是莫妮卡的高中同学,在与牙医未婚夫的婚礼上脱逃至莫妮卡处. 2.罗…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3555 Bomb Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) 问题描述 The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bo…
问题地址: http://www.thegrouplet.com/thread-112923-1-1.html 问题: 网站配有太多的模板是否影响网站加载速度 月光答复: wp不需要删除其他的模板,不影响速度 问题地址: http://www.thegrouplet.com/thread-112926-1-1.html 问题: 除了WORDPRESS大家还用什么其他的博客程序额? 月光答复: Typecho这种虽然简单,但是如果你有特殊需要,找插件和模板就难多了 各有各的好  ... 问题地址:…
1.账号管理相关文件 1)/etc/passwd    每一行都代表一个账号,有几行就代表有几个账号在你的系统中,不过需要特别留意的是,里头很多账号本来就是系统中必须要的,我们可以简称他为系统账号, 例如bin,daemon,adm,nobody等等,这些账号是系统正常运作时所需要的,请不要随意的杀掉他. 如: root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/s…
A.珠 题目:http://ch.ezoj.tk/contest/CH%20Round%20%2354%20-%20Streaming%20%235%20(NOIP模拟赛Day1)/珠 题解:sb题,把原串复制一边接到后面然后来回扫两遍即可. sb题还不能A,我是大sb,数组开小+只扫一遍=90 幸亏出题人数据良心T_T 代码: #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring&…
Celica is a brave person and believer of a God in the bright side. He always fights against the monsters that endanger humans. One day, he is asked to go through a maze to do a important task. The maze is a rectangle of n*m, and Celica is at (x1, y1)…
首先,题意就把我们引向了矩阵乘法,注意边长m<=60,那么就按边建图,变成一个120个点的图,然后乱搞就行了。 PS:WA了N久改了3次终于A了QAQ CODE: #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #define mod 45989 using namespace std; struct mat{     int n,m;     long…
私のZJOI Day1 2017-3-21 07:52:53 有人在暴力膜 苟-- 富贵 无相忘 ZJOI2017交流群 133135071 如果你足够厉害 如果你足够厉害 如果你足够厉害 其实完全可以看那些大佬的ppt,分享见网址大佬ppt. ps:其实本人就是抄抄他们ppt,下午最后一节课实在想睡觉就没有认真听了...滑稽.jpg 以下正文 搜索专题 学军中学 周子鑫 题目传送门 NOIP2012 普及组 文化之旅 NOIP2015 提高组 斗地主 NOI2010 方程的解数 ZJOI200…
刷题 上午刷了一上午的网络流 (md建图快建吐了),然后就搞了一个网络流的索引= = (实在看不下去那篇大长文了啊喂),然后发现都是水题= =,我还瞎××乱刷 下午--听说我要刷平衡树? Blog 日常乱搞blog,扔了一大圈网络流水题上去,然后就开始搞百度,(mdzz百度爬虫爬不到github),然后发现可能我的库炸掉了,于是愤怒的放弃了百度计划- - 然后正当我准备让我的博客回溯回到原来的状态时,我发现我的库炸飞了,然后叫来某司机,某司机进行了一圈令人窒息的操作,我的库又回来啦 (mdzz我…
bzoj上的usaco题目还是很好的(我被虐的很惨. 有必要总结整理一下. 1592: [Usaco2008 Feb]Making the Grade 路面修整 一开始没有想到离散化.然后离散化之后就很好做了.F[I,j]表示第i个点,高度>=j或<=j,f[I,j]=min(f[i-1,j]+abs(b[j]-a[i]),f[I,j-1]) 1593: [Usaco2008 Feb]Hotel 旅馆 线段树 ★1594: [Usaco2008 Jan]猜数游戏 二分答案然后写线段树维护 15…