07 2017 档案

摘要:DescriptionTwo positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instan... 阅读全文
posted @ 2017-07-29 23:29 mlzc 阅读(337) 评论(0) 推荐(0)
摘要:DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all... 阅读全文
posted @ 2017-07-28 22:47 mlzc 阅读(120) 评论(0) 推荐(0)
摘要:DescriptionThere will be a launch of a new, powerful and unusual collider very soon, which located along a straight line. n parti... 阅读全文
posted @ 2017-07-28 21:46 mlzc 阅读(119) 评论(0) 推荐(0)
摘要:DescriptionOne hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, i... 阅读全文
posted @ 2017-07-27 23:33 mlzc 阅读(185) 评论(0) 推荐(0)
摘要:DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M #include #i... 阅读全文
posted @ 2017-07-26 02:21 mlzc 阅读(110) 评论(0) 推荐(0)
摘要:DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, …, n into each circle separately, and the... 阅读全文
posted @ 2017-07-26 00:43 mlzc 阅读(83) 评论(0) 推荐(0)
摘要:DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began ... 阅读全文
posted @ 2017-07-26 00:15 mlzc 阅读(96) 评论(0) 推荐(0)
摘要:DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite fo... 阅读全文
posted @ 2017-07-23 01:51 mlzc 阅读(71) 评论(0) 推荐(0)
摘要:DescriptionA group of cows grabbed a truck and ventured on an expedition deep into the jungle. Being rather poor drivers, the cow... 阅读全文
posted @ 2017-07-23 01:31 mlzc 阅读(121) 评论(0) 推荐(0)
摘要:DescriptionSaruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track of his forces, ... 阅读全文
posted @ 2017-07-23 00:25 mlzc 阅读(73) 评论(0) 推荐(0)
摘要:DescriptionDuff is addicted to meat! Malek wants to keep her happy for n days. In order to be happy in i-th day, she needs to eat... 阅读全文
posted @ 2017-07-22 23:38 mlzc 阅读(172) 评论(0) 推荐(0)
摘要:DescriptionRecently, Duff has been practicing weight lifting. As a hard practice, Malek gave her a task. He gave her a sequence o... 阅读全文
posted @ 2017-07-22 23:05 mlzc 阅读(199) 评论(0) 推荐(0)
摘要:DescriptionPetya loves computer games. Finally a game that he’s been waiting for so long came out!The main character of this game... 阅读全文
posted @ 2017-07-21 14:20 mlzc 阅读(144) 评论(0) 推荐(0)
摘要:DescriptionGiven a n × n matrix A and a positive integer k, find the sum S=A+A2+A3+…+Ak.InputThe input contains exactly one test ... 阅读全文
posted @ 2017-07-21 03:08 mlzc 阅读(114) 评论(0) 推荐(0)
摘要:DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten term... 阅读全文
posted @ 2017-07-21 02:35 mlzc 阅读(220) 评论(0) 推荐(0)
摘要:DescriptionAn important topic nowadays in computer science is cryptography. Some people even think that cryptography is the only ... 阅读全文
posted @ 2017-07-21 02:23 mlzc 阅读(288) 评论(0) 推荐(0)
摘要:DescriptionWhen a thin rod of length L is heated n degrees, it expands to a new length L’=(1+n*C)*L, where C is the coefficient o... 阅读全文
posted @ 2017-07-21 01:57 mlzc 阅读(128) 评论(0) 推荐(0)
摘要:DescriptionJosephina is a clever girl and addicted to Machine Learning recently. She pays much attention to a method called Line... 阅读全文
posted @ 2017-07-21 01:21 mlzc 阅读(103) 评论(0) 推荐(0)
摘要:Description今年暑假不AC?” “是的。” “那你干什么呢?” “看世界杯呀,笨蛋!” “@#$%^&*%…” 确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。 作为球迷,一定想看尽量多的完整的比赛,当... 阅读全文
posted @ 2017-07-19 00:22 mlzc 阅读(103) 评论(0) 推荐(0)
摘要:Description作为杭电的老师,最盼望的日子就是每月的8号了,因为这一天是发工资的日子,养家糊口就靠它了,呵呵 但是对于学校财务处的工作人员来说,这一天则是很忙碌的一天,财务处的小胡老师最近就在考虑一个问题:如果每个老师的工资额都知道,最少需要准备多... 阅读全文
posted @ 2017-07-18 18:44 mlzc 阅读(161) 评论(0) 推荐(0)
摘要:Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青... 阅读全文
posted @ 2017-07-18 03:05 mlzc 阅读(136) 评论(0) 推荐(0)
摘要:DescriptionFarmer John has built a new long barn, with N (2 #include #include #include#include using namespace std;const int N = ... 阅读全文
posted @ 2017-07-17 20:48 mlzc 阅读(103) 评论(0) 推荐(0)
摘要:DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteer... 阅读全文
posted @ 2017-07-17 20:31 mlzc 阅读(102) 评论(0) 推荐(0)
摘要:什么是并查集?并查集是一种树型的数据结构,常用于处理一些不相交集合(Disjoint Sets)的合并及查询问题。并查集可以高效的进行如下操作:合并两个不相同的集合判断两个元素是否属于同一个集合并查集常见操作init()初始化所有元素独立为一个集合(即父节点是自身)定义数组fa[],fa[x]存储x... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(132) 评论(0) 推荐(0)
摘要:动态规划动态规划算法通常基于一个递推公式及一个或多个初始状态。 当前子问题的解将由上一次子问题的解推出。使用动态规划来解题只需要多项式时间复杂度, 因此它比回溯法、暴力法等要快许多。状态和状态转移方程例子:01背包问题有 n 个价值和重量分别为 v[i] 和 w[i] 的物品和一... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(96) 评论(0) 推荐(0)
摘要:基本运算取模(mod)取余(rem)定义给定一个正整数p,任意一个整数n,一定存在等式 :n = kp + r ;其中 k、r 是整数,且 0 ≤ r a|c对任意整数a,b,b>0,存在唯一的数对q,r,使a=bq+r,其中0≤r1) fact[cnt][0]=n,fact[... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(255) 评论(0) 推荐(0)
摘要:Ubiquitous ReligionsThere are so many different religions in the world today that it is difficult to keep track of them all. You are interes... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(145) 评论(0) 推荐(0)
摘要:畅通工程某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input测试输入包含若干测试用例。每个测... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(72) 评论(0) 推荐(0)
摘要:动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(90) 评论(0) 推荐(0)
摘要:HDU 1272 - 小希的迷宫上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(66) 评论(0) 推荐(0)
摘要:POJ 1703 - Find them, Catch themThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs ... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(86) 评论(0) 推荐(0)
摘要:POJ 1611 - The Suspects Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global thr... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(88) 评论(0) 推荐(0)
摘要:The cows don't use actual bowling balls when they go bowling. They each take a number (in the range 0..99), though, and line up in a standar... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(62) 评论(0) 推荐(0)
摘要:读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 Input测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。 Output对每个测试用... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(243) 评论(0) 推荐(0)
摘要:ACboy was kidnapped!!he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(.As ... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(112) 评论(0) 推荐(0)
摘要:看病要排队这个是地球人都知道的常识。不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所以不能根据简单的先来先服务的原则。所以医院对每种病情规定了10种不同的优先级。级别为10的优先权最高,级别... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(177) 评论(0) 推荐(0)
摘要:Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something happens to th... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(106) 评论(0) 推荐(0)
摘要:Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, t... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(80) 评论(0) 推荐(0)
摘要:Given a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value of themaximum positive product involving conse... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(103) 评论(0) 推荐(0)
摘要:/*给定一个序列 序列内部数字自由组合 求最大乘积*/#include #include #include #define T 30 //30为数组最大长度void quick_sort(int s[], int l, int r){ int i, j, x; i... 阅读全文
posted @ 2017-07-17 20:20 mlzc 阅读(280) 评论(0) 推荐(0)
摘要:元组与列表的区别之处在于,元组的元素不能修改。但是可以进行分片链接操作。元组name=('赵驰',100,99,88)列表name=['赵驰',100,99,88]元组采用小括号,列表采用方括号image.png元组常见操作元组合并image.png元组删除元组内的元素不允许被删... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(111) 评论(0) 推荐(0)
摘要:字典字典可以理解为列表的升级版列表list={“dandan”,"zhangsan","wangwu"}字典dic={'name':'淡淡','sex':'男','professional':'计算机科学与技术'}如果需要修改"zhangsan",则需要先找到它的下标,而字典是根... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(147) 评论(0) 推荐(0)
摘要:题目描述:给你n个整数,请按从大到小的顺序输出其中前m大的数。输入:每组测试数据有两行,第一行有两个数n,m(0#include#include#include#define N 1000000using namespace std;int a[N];int main(){ ... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(93) 评论(0) 推荐(0)
摘要:UVA 10082 - WERTYUA common typing error is to place thehands on the keyboard one row to theright of the correct position. So ‘Q’ istyped as ... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(101) 评论(0) 推荐(0)
摘要:C字符串-字符数组输入输出函数输入函数scanf("%s", s)读入字符串,在第一个空白符(' '、'\n'、'\t')处停止,不读入空白符,在串尾自动添加'\0'。(%*c表示读入并舍弃,可用于"吃掉"末尾的回车)gets(s)读入一行字符,直到遇到'\n',读入换行符并将其... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(367) 评论(0) 推荐(0)
摘要:排序:将杂乱无章的数据,按照一定的方法进行排列的过程叫做排序。排序的分类排序大的分类可分为内排序和外排序,不需要访问外存就能进行排序的叫做内排序。内排序又可以分为以下几类:插入排序:直接插入排序、二分法插入排序、希尔排序。选择排序:直接选择排序、堆排序。交换排序:冒泡排序、快速排... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(164) 评论(0) 推荐(0)
摘要:基础知识基本概念 程序 = 算法 + 数据结构 数据结构是计算机存储、组织数据的方式。 数据结构是指相互之间存在一种或多种特定关系的数据元素的集合。 通常情况下,精心选择的数据结构可以带来更高的运行或者存储效率。 数据结构往往同高效的检索算法和索引技... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(320) 评论(0) 推荐(0)
摘要:Petya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to do the ... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(95) 评论(0) 推荐(0)
摘要:There is an objective test result such as “OOXXOXXOOO”. An ‘O’ means a correct answer of a problemand an ‘X’ means a wrong answer. The score... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(49) 评论(0) 推荐(0)
摘要:NPY is learning arithmetic progression in his math class. In mathematics, an arithmetic progression (AP) is a sequence of numbers such that ... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(129) 评论(0) 推荐(0)
摘要:安装配置MinGw下载安装MinGW去官网下载MinGw :http://www.mingw.org/或者下载我已经下载好的完整版:http://pan.baidu.com/s/1gfgluin (2017.7.5更新)如图所示官网下载的选好后 Installation > ... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(158) 评论(0) 推荐(0)
摘要:Description输入n(n #include #define N 101void quick_sort(int s[], int l, int r){ int i, j, x; if (l abs(x)) j--; /* 从右... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(115) 评论(0) 推荐(0)
摘要:循环遍历列表(for循环)列表常见操作(“增”、“删”、“改”、“查”)增(append)删(“pop”、“del”、“remove”)改(“先找到用户下标,在进行修改,与列表元素赋值一样”)查(in、not in)#coding=utf-8name=["zhangsan","w... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(273) 评论(0) 推荐(0)
摘要:ctrl+a选中所有表格按住ctrl+shift+x输入下面命令执行即可。Option Explicit Dim rowsNum rowsNum = 0 '--------------------------------------------------------... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(217) 评论(0) 推荐(0)
摘要:Plsql下载以及安装第一个需要安装Oralce 客户端,第二个不需要,但是tsn文件得自己配置image.png下载地址如下链接: https://pan.baidu.com/s/1dEK8o1r 密码: bhpm文件一压缩包里面都有详细的安装说明,这里不再赘述。文件二直接解压... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(140) 评论(0) 推荐(0)
摘要:Sublime Text3 安装 Package Control快捷键 ctrl+`Sublime Text3安装Package Control代码如下import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b09057... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(125) 评论(0) 推荐(0)
摘要:1. 获取access_token登陆微信公众平台->开发者工具->在线接口调试工具填写appid和appsecret获取到access_token之后填进去即可。2. 保存代码放到服务器上面。3. 访问youdomain/xxx.php正确时的返回JSON数据包如下:{"err... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(819) 评论(0) 推荐(0)
摘要:参考微信公众平台开发者文档https://mp.weixin.qq.com/wiki/8/f9a0b8382e0b77d87b3bcc1ce6fbc104.html下载示例代码将示例代码通过FTP传至自己的服务器配置域名和Token(我这里是dandan)随机生成Encoding... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(205) 评论(0) 推荐(0)
摘要:本次使用的路由器为 联想newifimini Y1步骤如下newifi刷openwrt固件刷uboot下载地址http://downloads.openwrt.org.cn/PandoraBox/Lenovo-Y1_RY-1S/u-boot/u-boot-pandorabox-y... 阅读全文
posted @ 2017-07-17 20:19 mlzc 阅读(438) 评论(0) 推荐(0)