码迷,mamicode.com
首页 >  
搜索关键字:magic    ( 1247个结果
Linux下的led驱动程序,ok6410
本程序采用动态映射的方法控制led,硬件平台为飞凌的ok6410 led.h:定义控制命令 #ifndef _LED_H #define _LED_H #define LED_MAGIC 'M' #define LED_ON _IO(LED_MAGIC, 0) #define LED_OFF _IO(LED_MAGIC, 1) #endif 驱动程序led.c #inclu...
分类:系统相关   时间:2014-08-24 20:53:23    阅读次数:266
Linux设备驱动中的ioctl
memdev.h #ifndef _MEMDEV_H #define _MEMDEV_H #define MEM_MAGIC 'm' #define MEM_RESTART _IO(MEM_MAGIC, 0)//使用内核提供的宏产生命令, #define MEM_SET _IOW(MEM_MAGIC, 1, int)//改命令向内核传递一个整形的参数 #endif 驱动程序memd...
分类:系统相关   时间:2014-08-24 14:13:42    阅读次数:332
9.3 寻找magic index
在A[0..n-1]中,满足条件 A[i]==i的索引。给定一个有序数组,设法找到其中的magic index。扩展:考虑有重复元素的情况如何处理。public class Solution { public static int magicIndex(int[] array) { ...
分类:其他好文   时间:2014-08-23 22:47:51    阅读次数:191
HDU 3911 Black And White 分段树 题解
Problem DescriptionThere are a bunch of stones on the beach; Stone color is white or black. Little Sheep has a magic brush, she can change the color o...
分类:其他好文   时间:2014-08-20 12:11:22    阅读次数:209
UVA - 12294 RPG battles
Description   RPG battles  In many typical RPG games, you battle with bad guys, creatures, monsters or ghosts etc. all the time. After each battle, you may get magic potions th...
分类:其他好文   时间:2014-08-16 13:51:30    阅读次数:245
HDU 3874 Necklace (线段树单点更新+区间查询+离线操作)
Problem Description Mery has a beautiful necklace. The necklace is made up of N magic balls. Each ball has a beautiful value. The balls with the same beautiful value look the same, so if two or more ...
分类:其他好文   时间:2014-08-12 17:29:44    阅读次数:253
UVA471- Magic Numbers
题目链接 题意:s1/s2=N,s1、s2、N都是各个位数上数字不相同的整数。给定N,求有多少个这样的式子并输出。 思路:其实最大的数只能是9876543210,所以我们只要暴力枚举,枚举过程中判断s1、s2是否符合题目要求。 #include #include #include #include #include using namespace std;...
分类:其他好文   时间:2014-08-11 21:21:33    阅读次数:290
SGU 160.Magic Multiplying Machine
时间限制:0.5s空间限制6M题意: 给出n个(1int n, m, x;int g[10009], pr[1009][2], f[1009][2];void write (int x) { if (pr[x][0] != 0) write (pr[x][0]); printf ("%d ", .....
分类:其他好文   时间:2014-08-11 17:07:22    阅读次数:219
php技术总结
1.聚合:最终为大家共享组合:最终为一体2.如何编写可移植的php代码:将所有设置和PHP常量放在一个文件中,这样可以从如何函数或类使用它们。考虑使用XML文件或是将这些信息存到数据库,注意parse_ini_file函数关闭magic_quotesif(get_magic_quotes_gpc()){$_GET=array_map(‘st..
分类:Web程序   时间:2014-08-09 02:46:47    阅读次数:375
山东省赛题 NEU OJ 1444 线段树双标记
http://acm.neu.edu.cn/hustoj/problem.php?id=1444 OJ问题论坛发帖http://t.cn/zjBp4jd FAQ http://t.cn/zjHKbmN Linux问题看http://t.cn/aWnP1n 1444: Devour Magic 时间限制: 1 Sec  内存限制: 256 MB 提交: 129...
分类:其他好文   时间:2014-08-08 09:39:15    阅读次数:251
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!