/*代码一:DFS+Enum*///Memory Time //240K 344MS
//本题只要求输出翻转的次数,因此BFS或DFS都适用#includeusing namespace std;bool
chess[6][6]={false};//利用的只有中心的4x4bool flag;in.....
分类:
其他好文 时间:
2014-05-26 22:45:54
阅读次数:
323
#include //头文件调用,写程序时都要加上,#define uint unsigned int
//宏定义,为了后面定义变量书写简便#define uchar unsigned charuchar mm=0; //全局变量uchar flag_get=0;
//定义标志位,为1则灯亮/**....
分类:
其他好文 时间:
2014-05-26 08:42:09
阅读次数:
276
void selectsort(int a[],int n) //
选择排序的思路就是每次找到当前序列中最小的元素,然后交换{ // 就是选择最小的,然后交换 int i,j,flag; for(i = 0;i=0
&&ti;...
分类:
其他好文 时间:
2014-05-26 07:10:38
阅读次数:
200
/* 播放录音文件 */private void playMusic(File
file){Intent intent = new
Intent();intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);intent.setAction(android.con...
分类:
其他好文 时间:
2014-05-22 15:18:27
阅读次数:
269
#include
//#include
using namespace std;
struct node
{
char word[10];
int num;
};
node obj[100];
void my_word(char input[], char output[])
{
int sum=0,flag=0;...
分类:
其他好文 时间:
2014-05-22 12:41:25
阅读次数:
233
RCC CSR寄存器会存储复位标示,可通过它来知道复位原因,来源: 1
if(RCC_GetFlagStatus(RCC_FLAG_PINRST)) 2 printf("PINRST\r\n"); 3
if(RCC_GetFlagStatus(RCC_FLAG_PORR...
分类:
其他好文 时间:
2014-05-22 03:16:49
阅读次数:
3604
1.加下划线textView.getPaint().setFlags(Paint.
UNDERLINE_TEXT_FLAG );
//下划线2.单独做第一步,文字会出现锯齿,要加下面抗锯齿textView.getPaint().setFlags(Paint.
UNDERLINE_TEXT_FLAG|...
分类:
其他好文 时间:
2014-05-21 18:48:37
阅读次数:
192
1. 文件的打开读写 关闭
int open(const char *pathname,int flag,…) 打开一个文件
成功则返回文件描述符,若出现则返回-1
flag可以取下面的常量
O_RDONLY 只读打开
O_WRONLY 只写打开
O_RDWR 读写打开
其它的常量 O_APPEND,O_CREAT,O_EXCL,O_TRUNC,O_NOCTT...
分类:
其他好文 时间:
2014-05-20 16:07:29
阅读次数:
269
思路:枚举然后深搜,时间复杂度有点高。代码: 1 #include 2 #include 3
#include 4 #include 5 using namespace std; 6 int a[25]; 7 char c[25]; 8 int
flag; 9 int len;10 int judg...
分类:
其他好文 时间:
2014-05-18 19:51:19
阅读次数:
341
Intent intent = new Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setAction(Intent.ACTION_VIEW); inten...
分类:
移动开发 时间:
2014-05-17 19:03:17
阅读次数:
257