- 博客(25)
- 收藏
- 关注
原创 PAT(甲级)1017. Queueing at Bank (25)
Queueing at Bank (25)Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line
2018-01-26 18:57:36 331
原创 PAT(甲级)1016. Phone Bills (25)
Phone Bills (25)A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call
2018-01-25 22:10:13 240
原创 PAT(甲级)1027. Colors in Mars (20)
Colors in Mars (20)People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red
2018-01-22 19:14:58 203
原创 PAT(甲级)1015. Reversible Primes (20)
Reversible Primes (20)A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its re
2018-01-21 21:33:30 209
原创 PAT(甲级)1014. Waiting in Line (30)
Waiting in Line (30)Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait i
2018-01-21 20:24:50 407
原创 PAT(甲级)1013. Battle Over Cities (25)
Battle Over Cities (25)It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know
2018-01-21 17:20:17 195
原创 HDU4496 D-City【并查集删边】
D-CityProblem Description Luxer is a really bad guy. He destroys everything he met. One day Luxer went to D-city. D-city has N D-points and M D-lines. Each D-line connects exactly two D-points. Luxe
2018-01-21 16:30:36 371
原创 PAT(甲级)1012. The Best Rank (25)
The Best Rank (25)To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Alge
2018-01-21 14:46:34 223
原创 PAT(甲级)1011. World Cup Betting (20)
World Cup Betting (20)With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup tr
2018-01-20 22:01:18 246
原创 PAT(甲级)1010. Radix (25)
Radix (25)Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is “yes”, if 6 is a decimal number and 110 is a binary number.Now for any pair of posi
2018-01-20 20:58:37 194
原创 PAT(甲级)1009. Product of Polynomials (25)
Product of Polynomials (25)This time, you are supposed to find A*B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each lin
2018-01-19 21:08:11 202
原创 PAT(甲级)1008. Elevator (20)
Elevator (20)The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It
2018-01-19 19:58:00 202
原创 PAT(甲级)1007. Maximum Subsequence Sum (25)
Maximum Subsequence Sum (25)Given a sequence of K integers { N1, N2, …, NK }. A continuous subsequence is defined to be { Ni, Ni+1, …, Nj } where 1 <= i <= j <= K. The Maximum Subsequence is the contin
2018-01-19 19:45:39 191
转载 最大连续子序列和
最大连续子序列和 转载于http://blog.csdn.net/sgbfblog/article/details/8032464 最大连续子序列和问题是个很老的面试题了,最佳的解法是O(N)复杂度,当然其中的一些小的地方还是有些值得注意的地方的。这里还是总结三种常见的解法,重点关注最后一种O(N)的解法即可。需要注意的是有些题目中的最大连续子序列和如果为负,则返回0;而本题目中的最大连续子序列
2018-01-19 11:42:21 305
原创 Linux下ftp搭建过程中所遇到的问题
1.首先就是yum install -y vsftpd 和 yum install -y lftp 下载安装不成功 简单的可以直接在vi /etc/sysconfig/network-scripts/ifcfg-eth0 里面 将 BOOTPROTO=”dhch” 然后Esc 之后:wq 保存退出 shutdown -r now 或者init 6重启虚拟机尝试一番 如果上面不行可以尝试更换
2018-01-19 10:29:36 476
原创 Linux下ftp服务器搭建
创建两个Linux虚拟机,完成初始配置,可以让两台Linux虚拟机能互相ping通 修改各自的 主机名,在/etc/sysconfig/network 文件中,完成如下设置 服务端主机名设置为 server 。客户端设置为 client 两台虚拟机已经ping通一、Vsftpd 简单用法 [root@localhost ~]# yum install -y vsftpd
2018-01-19 09:43:04 504
原创 Linux下实现虚拟机和主机的通信
1.实现虚拟机和主机的通信配置方式如下: 首先将VMnet1和VMnet8禁用 打开虚拟机 更改其网络适配器为 桥接模式 选择确定 然后进入虚拟机中,进行设置IP,与宿主在同一网段的其他IP 查看本机的IP地址和子网掩码 打开cmd命令窗口,输入ipconfig -all 如果是ping两台虚拟机 则输入ifconfig -a 进入虚拟机,打开一个命令窗口,输入se
2018-01-19 09:21:34 2077
原创 linux-CentOS-配置ip地址-配置putty远程连接工具
配置动态IP 1、设置虚拟机网络连接方式为NAT: 2、以root身份进入linux,在命令行输入如下命令: vi /etc/sysconfig/network-scripts/ifcfg-eth0 打开ifcfg-eth0文件,使用方向键把把光标移动到ONBOOT这一行,按“i”键进入编辑模式,然后把这一行变成:”ONBOOT=yes” ,把BOOTPROTO行变成:BO
2018-01-18 21:22:58 2445 2
原创 Linux虚拟机-CentOS系统安装
1.创建新虚拟机 下一步直到完成即可。 2.安装CentOS6.3 1.打开新建的空白虚拟机,在设置中添加CentOS6.3光盘镜像 2.启动系统并进入BIOS中修改从光驱启动,点击向下箭头,选择【启动进入BIOS】 3.在BIOS中设置为光驱优先启动然后保存即可 4.选择默认第一项回车,开始安装。 5.选择中文,下一步 6.选择美国英语式键
2018-01-18 21:10:38 231
原创 PAT(甲级)1006. Sign In and Sign Out (25)
Sign In and Sign Out (25)At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of sig
2018-01-18 20:32:12 205
原创 PAT(甲级)1005. Spell It Right (20)
Spell It Right (20) Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contai
2018-01-18 11:10:32 170
原创 PAT(甲级)1004. Counting Leaves (30)
Counting Leaves (30) A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. InputEach input file contains one test case. Each case
2018-01-18 09:48:36 192
原创 PAT 甲级-1003. Emergency (25)
Emergency (25)时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue As an emergency rescue team leader of a city, you are given a special map of your country. The map shows severa
2018-01-17 10:25:21 217
原创 PAT甲级-1001. A+B Format (20)
A+B Format (20)时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueCalculate a + b and output the sum in standard format – that is, the digits must be separated into groups of thre
2018-01-13 16:51:11 207
原创 PAT甲级-1002. A+B for Polynomials (25)
A+B for Polynomials (25)时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, YueThis time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains
2018-01-13 16:40:49 188
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人