To change Speed and Duplex of an ethernet card, we can use ethtool - a Linux utility for Displaying or Changing ethernet card settings.   1. Install ethtool You can install ethtool by typing one of the following commands, depending upon your Linux di…
The easiest way to swap between keymaps and thus temporarily set keys to different language by use of loadkeys command. If the loadkeys command is unavailable install kbd package: # yum install kbd As for an example the following linux command will t…
From my mailbag: How do I write a C program to connect MySQL database server? MySQL database does support C program API just like PHP or perl. The C API code is distributed with MySQL. It is included in the mysqlclient library and allows C programs t…
ITS UNIX Systems Changing Ethernet Media Speed for AIX First you need to find out the device name of your ethernet card. It should be ent0 if the machine has only 1 ethernet card. Otherwise, it may be a higher number. You can determine the legal valu…
动态规划的解决方法是找到动态转移方程. 题目地址:http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=3&sectionid=2&problemid=4 题目大意:找到一个最多的老鼠序列,使得序列中的老鼠的体重满足递增,相应老鼠的速度满足递 减.即可要求找出老鼠体重递增,速度递减的最长子序列(不需要连续). 思路:动态转移方程的确定,状态f[i]表示前i个老鼠中的最长递减子序列长度,状态转移方程为mouse[i].len…
FatMouse's Speed Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13194    Accepted Submission(s): 5807Special Judge Problem Description FatMouse believes that the fatter a mouse is, the faster i…
FatMouse's Speed Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14980    Accepted Submission(s): 6618 Special Judge Problem Description FatMouse believes that the fatter a mouse is, the faster…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1160 题目意思:给出一堆老鼠,假设有 n 只(输入n条信息后Ctrl+Z).每只老鼠有对应的weight 和 speed.现在需要从这 n 只老鼠的序列中,找出最长的一条序列,满足老鼠的weight严格递增,speed严格递减. 我们可以用一个结构体来保存老鼠的信息,包括weight, speed 以及 id(这个 id 是未排序之前的,为了输出最后信息).那么首先对 weight 进行递增排序,如…
半个下午,总算A过去了 毕竟水题 好歹是自己独立思考,debug,然后2A过的 我为人人的dp算法 题意: 为了支持你的观点,你需要从给的数据中找出尽量多的数据,说明老鼠越重速度越慢这一论点 本着“指针是程序员杀手”这一原则,我果断用pre来表示这只老鼠的直接前驱的序号 代码中我是按体重从大到小排序,然后找出一条最长的体重严格递减速度严格递增的“链”(其实找到的是链尾). 然后输出的时候从后往前输出 对结构体排序 对于样例来说,循环完以后应该是这样的: order 2 3 4 8 1 5 7 0…
FatMouse's Speed Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1160 Description FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on…