printf("\r\n this is a usart printf demo \r\n");将串口定义成 printf 函数#include //重定向C库函数printf到USART1int fputc(int ch, FILE *f){ /* 发送一个字节数据到USART1 *...
分类:
其他好文 时间:
2014-10-04 23:02:47
阅读次数:
354
T^T Saffah大神照样刷我这样诚心诚意想做一套NOIP模拟题的蒟蒻.第一题 九九归一好diao的名字...题意就是给定一队$n,q$,求在模$n$意义下一个数$x$自乘的循环节长度.当$x=0$时候输出$0$是吧............................................
分类:
其他好文 时间:
2014-10-04 22:09:57
阅读次数:
343
最近参加了很多CH上的比赛呢~Rating--了。。题目各种跪烂。各种膜拜大神OTZZZT1珠描述萌蛋有n颗珠子,每一颗珠子都写有一个数字。萌蛋把它们用线串成了环。我们称一个数字串是有趣的,当且仅当它的第1位是2,且除了第1位以外的每一位都是3。例如,2,233,2333333都是有趣的数字串。现在...
分类:
其他好文 时间:
2014-10-04 20:32:17
阅读次数:
484
摘自 http://github.com/panweizeng/home/blob/master/code/python/dict/dict.py 支持简单的Ch to En 和En to Ch我把它放在 /usr/bin/dict 1234567891011$ dict 白痴单词:白痴 音标: b...
分类:
编程语言 时间:
2014-10-04 17:54:46
阅读次数:
250
/* 仅适合纯数字输入输出 */
#include
int Scan() { //输入外挂
int res = 0, flag = 0;
char ch;
if((ch = getchar()) == '-') flag = 1;
else if(ch >= '0' && ch <= '9') res = ch - '0';
while((ch =...
分类:
其他好文 时间:
2014-10-04 16:22:26
阅读次数:
219
代码: #include <stdio.h>
#include <stdlib.h>
int main(void) {
int i;
double d;
char ch;
int counter;
counter = scanf("%i %lf %c", &i, &d, &ch);
printf("The return value of function is %d....
分类:
其他好文 时间:
2014-10-04 12:03:56
阅读次数:
148
string标准库固然强大,但是仍然有一些处理字符串的优秀数据结构。Trie(前缀树)就是其中之一,它通过在树上对不同字符串的相同字符只记录一次,来实现对多个字符串的"压缩":可以认为多个字符串被压成了一个超级大的字符串。int ch[10000][26],cnt[10000];int sz=1; ...
分类:
其他好文 时间:
2014-10-02 23:21:23
阅读次数:
187
Treap名字的来源:Tree+Heap,正如名字一样,就是一颗简单的BST,一坨堆的合体。BST的不平衡的根本原因在于基于左s; if(ch[1]!=NULL) s+=ch[1]->s; }}Treap的结点结构Treap的主操作由以下几部分构成:rotate、insert,...
分类:
其他好文 时间:
2014-10-02 21:33:33
阅读次数:
267
Ubuntu安装Latex http://www.oschina.net/question/12_63776Ubuntu下Latex中文环境配置 http://vistb.net/2012/05/config-latex-ch-env-in-ubuntu/Ubuntu中配置LaTeX中文的方法htt...
分类:
其他好文 时间:
2014-10-02 00:37:01
阅读次数:
218
void getMemory(char *p){p=(char *)malloc(100);}char * getMemory(char *p){char ch[]="hello world";return ch;}char * getMemory(char **p){*p=(char*)mallo...
分类:
其他好文 时间:
2014-10-01 19:47:01
阅读次数:
186