the permutation in c
the process is:
First,
find the first l from left to right that p[l]<p[l+1]
Next,
find the first r from left to right again that p[l]<p[r]
so p[r] is the only one bigger than p[l]
then
swap p[l] and p[r]
and
reverse p[l+1...n-1]
code:
2012年9月23日 星期日
2012年9月1日 星期六
Setting ThinkPad TrackPoint
Whatever I try, the rc.local still won't work when it boots or reboots.
That's mean I need to run the command manually to change trackpoint speed, sensitivity.
That's mean I need to run the command manually to change trackpoint speed, sensitivity.
#!/bin/bash echo -n xxx > /sys/devices/platform/i8042/serio1/speed echo -n yyy > /sys/devices/platform/i8042/serio1/sensitivity exit 0put this shell in /bin/xxx.sh is a little more convenient to use.
訂閱:
意見 (Atom)