April 3 2017 Week 14 Monday】的更多相关文章

Don't worry about finding your soul mate. Find yourself. 欲寻佳侣,先觅本心. You may fail to find your soul mate if you can't find yourself. Because only if you have found yourself, that is, you know truly who you are, you know truly what you want, then you m…
You only live once, but if you do it right, once is enough. 人生只有一次,但如果活对了,一次也就够了. Maybe I am going to have to do a lot more work on the project before it is presentable. A lot of people can finish their work effortlessly, but it is so stiff for me to…
Much effort, much prosperity. 越努力,越幸运. I have ever seen this sentence in many people's signature of their social media applications, like WeChat, Tecent QQ, and so on. I ever thought that may be true, if you make much more efforts, you would be able…
You will find that it is necessary to let things go; simply for the reason that they are heavy. 你会明白,放手是必要的:原因很简单,它们太过沉重. Just let it go. Sometimes you need to make it clear that you can't do nothing to compensate for the past. Be brave to let the pa…
He alone is poor who does not possess knowledge. 没有知识,才是贫穷. Knowledge, as a important part of wisdom, can be converted into wealth, especially in this fast-developing world, because it is becoming more and more technology-driven, those people with go…
Life is the art of drawing without an eraser. 人生如画,落笔无悔. Yesterday I watched a film from Japan, After the Storm, which told a story about a middleaged man. He is a unsuccessful novelist and divorced his wife, because he was indulged in gambling. But…
A good heart is better than all the brains in the world. 聪明绝顶,不如宅心仁厚. A good heart can be useful to this world, at least a good-hearted person seldom does harm to the society. That can be a good explaination for why we often makes friends with some g…
If you smile when no one else is around, you really mean it. 独处时的微笑,才是发自内心的. Recently I found I seldom smiled when I was alone. Most often I felt depressed and frustrated due to the obstacles I met both in life and work. And I become more and more pe…
Today is a perfect day to start living your dream. 实现梦想,莫如当下. Miracles may happen every day. If you choose to live your dream and strive for it, then it may be a perfect day. Sometimes, we feel we have tried our best but we still failed, yes, man pro…
Problems are not stop signs, they are guidelines. 问题不是休止符,而是引向标. It is ture during our explorations we often have to face problems, difficulities and dangers, sometimes even the most perilous ones and seemingly insurmountable. If we give up, we may l…
Gitlab的安装汉化及问题解决 一.前言 Gitlab需要安装的包太TM多了,源码安装能愁死个人,一直出错,后来发现几行命令就装的真是遇到的新大陆一样... ... 装完之后感觉太简单,加了汉化补丁,因为要用于线上环境顺手关了注册登录,保存发现关错了...作死今天上午才弄好,详情见下文 二.安装 可以rpm安装下载地址:清华开源网站镜像站 或者看下图...还用写么... ...centos6版 截图不好复制,我来插入一下 #sudo是获取root权限的,用root用户搭就不用了 yum ins…
题目: Problem F. Matrix GameInput file: standard inputOutput file: standard inputTime limit: 1 secondMemory limit: 256 mebibytesAlice and Bob are playing the next game. Both have same matrix N × M filled with digits from 0 to 9.Alice cuts the matrix ve…
题目:Problem J. TerminalInput file: standard inputOutput file: standard inputTime limit: 2 secondsMemory limit: 256 mebibytesN programmers from M teams are waiting at the terminal of airport. There are two shuttles at the exitof terminal, each shuttle…
题目:Problem L. Canonical duelInput file: standard inputOutput file: standard outputTime limit: 2 secondsMemory limit: 256 megabytesIn the game «Canonical duel» board N × M is used. Some of the cells of the board contain turrets. Aturret is the unit wi…
题目:Problem A. Arithmetic DerivativeInput file: standard inputOutput file: standard inputTime limit: 1 secondMemory limit: 256 mebibytesLets define an arithmetic derivative:• if p = 1 then p0 = 0;• if p is prime then p0 = 1;• if p is not prime then n0…
题目:Problem D. Clones and TreasuresInput file: standard inputOutput file: standard outputTime limit: 1 secondMemory limit: 256 mebibytesThe magical treasury consists of n sequential rooms. Due to construction of treasury its impossible togo from room…
给你一个网格(n<=2000,m<=2000),有一些炸弹,你可以选择一个空的位置,再放一个炸弹并将其引爆,一个炸弹爆炸后,其所在行和列的所有炸弹都会爆炸,连锁反应. 问你所能引爆的最多炸弹数. 转化成: 将行列当成点,炸弹当成边,然后你可以给这个二分图加1条边,问你最大的连通块的边的数量. 可以通过枚举所有可以建的边,通过并查集来尝试更新答案.由于一条边必然会让总度数+2,所以一个连通块的边数是所有点的度数之和/2. 并查集不必要动态维护集合的大小,一开始就建好并查集,提前统计好即可. 最后…
有两辆车,容量都为K,有n(10w)个人被划分成m(2k)组,依次上车,每个人上车花一秒.每一组的人都要上同一辆车,一辆车的等待时间是其停留时间*其载的人数,问最小的两辆车的总等待时间. 是f(i,j)表示前i组,j个人是否可行.w(i)表示第i组的人数. if f(i,j)==1 then f(i+1,j+w(i+1))=1. 这是个bitset可以做的事情,每次左移以后或上f(i-1)的bitset即可.其实可以滚动数组. 然后每更新一次bitset,求一下其最左侧的1的位置,就是对于第一辆…
给你n个字符串,问你最小的长度的前缀,使得每个字符串任意循环滑动之后,这些前缀都两两不同. 二分答案mid之后,将每个字符串长度为mid的循环子串都哈希出来,相当于对每个字符串,找一个与其他字符串所选定的子串不同的子串,是个二分图最大匹配的模型,可以匈牙利或者Dinic跑最大流看是否满流. 一个小优化是对于某个字符串,如果其所有不同的子串数量超过n,那么一定满足,可以直接删去. 卡常数,不能用set,map啥的,采取了用数组记录哈希值,排序后二分的手段进行去重和离散化. #include<cst…
给你一个n*m的字符矩阵,将横向(或纵向)全部裂开,然后以任意顺序首尾相接,然后再从中间任意位置切开,问你能构成的字典序最大的字符串. 以横向切开为例,纵向类似. 将所有横排从大到小排序,枚举最后切开的位置在哪一横排,将这一排提到排序后的字符串数组最前面,求个“最大表示法”,如果最大表示法的位置恰好在第一排的位置,那么可以用来更新答案. 如果不在第一排的位置,那么其所构成的仍然是合法的串,而且一定不会影响答案. 这是一个最小表示法的板子. #include<cstdio> #include&l…
给你n,K,问你要选出最少几个长度为2的K进制数,才能让所有的n位K进制数删除n-2个元素后,所剩余的长度为2的子序列至少有一个是你所选定的. 如果n>K,那么根据抽屉原理,对于所有n位K进制数,必然会至少有1个数字出现2次或以上,所以00,11,...,K-1 K-1这样的数对是必选的. 对于其他的情况下,我们需要让他构造不出来n位不含重复数字的K进制数. 于是可以把K个数尽可能平均地分成n-1组,每一组内部让他们选出任意两个数都不合法,于是只能组间互相拼,这样他只能构造出最多n-1位的K进制…
给你一行房间,有的是隐身药水,有的是守卫,有的是金币. 你可以任选起点,向右走,每经过一个药水或金币就拿走,每经过一个守卫必须消耗1个药水,问你最多得几个金币. 药水看成左括号,守卫看成右括号, 就从每个位置贪心地向右走,如果在 r 遇到不匹配,则把下一次的左端点置成r+1,接着走. O(n)即可. 因为如果把左端点放在上次的l和r之间,要么会发生不匹配,要么答案无法比上次走的更优. 队友代码: #include <iostream> #include <cstdio> #incl…
假设一个数有n个质因子a1,a2,..,an,那么n'=Σ(a1*a2*...*an)/ai. 打个表出来,发现一个数x,如果x'=Kx,那么x一定由K个“基础因子”组成. 这些基础因子是2^2,3^3,5^5,7^7,11^11,13^13.只有6个,K不超过30,于是可以dfs. 要注意搜索顺序(每次枚举的时候,都从大于等于前项的开始搜)和可行性剪枝(如果超过r则剪枝,虽说有可能爆long long,但其实整除就可以判,而且没有精度误差). #include<cstdio> //#incl…
My motto is: Contended with little, yet wishing for more. 我的座右铭是:为一点点感到满足,但希望获得更多. If you can live your life in this way, you will feel much happier about your life and you will always be optimistic about your future. Actually, most of our unpleasant…
Every man is a poet when he is in love. 每个恋爱中的人都是诗人. It is said this saying was from Plato, the famous ancient philosopher. Notice that when you are dating with a girl, the romantic process may involve flowers, chocolate, sweet words and surprising g…
It is a characteristic of wisdom not to do desperate things. 不做孤注一掷的事情是智慧的表现. We are told that we had better not to put all our eggs into one basket, that means, we must learn how to spread the risks so as to reduce the potential risks to the minimum…
Every light has darkness to balance it out. 有光明的地方,必定有黑暗予以平衡. I strive to get a balance between life and work. But it seems my efforts were just futile and I failed in both. I originally believed that although there were full of darkness in my life,…
今日内容介绍 1.流程控制语句switch 2.数组 3.随机点名器案例 ###01switch语句解构     * A:switch语句解构       * a:switch只能针对某个表达式的值作出判断,从而决定程序执行哪一段代码.         * b:格式如下:          swtich(表达式){                  case 常量1 :                  要执行的语句;                  break;               …
hi,all.最近比较忙,所以更新也比较慢了. 今天就来和大家分享一个小Tip,它是关于UGUI的坑的. 使用过UGUI的朋友们都知道,Canvas的渲染方式有三种: Screen Space Overlay Screen Space Camera World Space 其中后两者都需要指定一个Camera,Screen Space Camera对应的是Render Camera: World Space对应的是Event Camera. (这里要吐槽的一点就是,Screen Space Ca…
第一次会议:2017-11-14 额--这几天比较忙,忘记上传了,今天补上 先上个图,O(∩_∩)O哈哈: 会议主要内容: 1. 讨论整体框架 2. 个人具体分工 3. 代码统一 具体分工: 成员 计划任务 遇见难题 贡献比 李勇(组长) 改善UI界面 无 1 何忠鹏 搭建整体架构 无 1 黄进勇 数据库设计 3NF设计 1 吴桂元 整理需求,编写博客 无 1 郑希彬 市场调查 无 1 燃尽图:…