摘要:
半夜被狗吠吵醒,听见阳台外面的草丛里有悉悉邃邃的声音,联想到前些天有宿舍被盗的情况,顿时不敢再睡了。过了会儿果然有人推门进来!!观察了下,原来是小宝。。。好像四点多有场比赛的。然后恢复了平静,很静的夜,连呼噜声都没有。想起了白天去车站接师父的事,还有晚上和师父师姐吃饭的事,感觉很幸福。有个人回家了,再从家里回来的时候,有人去车站接你,于被接的人,于接人的人,都是件幸福的事吧。不管这种感情是亲情,还... 阅读全文
摘要:
http://pat.zju.edu.cn/contests/pat-practise/1024 1 #include <stdio.h> 2 #include <stack> 3 using namespace std; 4 int main() 5 { 6 int N,b; 7 scanf("%d%d",&N,&b); 8 if(N==0) { 9 printf("Yes\n");10 printf("0\n");11 return 0;12 }13 14 stack<int> 阅读全文
摘要:
http://pat.zju.edu.cn/contests/pat-practise/1017 1 #include <stdio.h> 2 #include <string.h> 3 #include <algorithm> 4 using namespace std; 5 6 int N,K,wait_time=0; 7 struct Customer 8 { 9 int arrive_time; 10 int need_time; 11 }; 12 13 struct Customer customer[10002]; 14 15 struct... 阅读全文
摘要:
http://pat.zju.edu.cn/contests/pat-practise/1032好吧,注意有可能存在空串,别的就没什么了,代码写的比较烂,有好多不必要的重复。 1 #include <stdio.h> 2 struct Node{ 3 int next_num; 4 char ch; 5 }; 6 7 struct Node nodes[100002]; 8 int main() 9 {10 int head1,head2,node_num;11 scanf("%d%d%d",&head1,&head2,&node_num 阅读全文
摘要:
http://pat.zju.edu.cn/contests/pat-practise/1031模拟题 1 #include <stdio.h> 2 #include <string.h> 3 char words[100]; 4 int main() 5 { 6 scanf("%s",words); 7 //先确定底部的长度 8 int i; 9 int n2;10 for(i=3;;i++) {11 if((strlen(words)-i)%2==0&&((strlen(words)-i)/2+1<=i)){12 ... 阅读全文
摘要:
http://pat.zju.edu.cn/contests/pat-practise/1024简单大数 1 #include <stdio.h> 2 #include <string.h> 3 char ori_str[100],trans_str[100]; 4 char temp[100]; 5 int K; 6 7 void trans(char *str) 8 { 9 int i=strlen(str);10 11 int j;12 for(j=0;j<i;j++) {13 trans_str[j]=ori_str[i-1-j];14 ... 阅读全文
摘要:
1 #include <stdio.h> 2 #include <string.h> 3 int occur_table[12]={0}; 4 bool fill_table(char *p) 5 { 6 while(*p){ 7 occur_table[(*p)-'0']++; 8 p++; 9 }10 return 0;11 }12 int main()13 {14 char ori_num[22];15 scanf("%s",ori_num);16 fill_table(ori_num);17 in... 阅读全文
摘要:
SX:"我今天刚把签证搞定,托福已经考完了,所以这两个月基本没事儿了。回去吃饭再聊。"很偶然的机会,给卜老师发了封邮件,卜老师不到一个小时就回了, 晚上王老师打电话过来,第二天下午便收到正式通知。好高的办事效率。八仙过海,各显神通。 阅读全文
摘要:
昨天在实验室看内存页面回收部分的代码,发现了一个特别有意思的地方:代码路径为mm/vmscan.c if (!populated_zone(zone)) continue; static inline int populated_zone(struct zone *zone) ... 阅读全文
摘要:
天气阴沉沉的,在F楼看书,突然想起明年这时候就快和师父师姐分别了,很难受。前天提前给师姐过生日,回来时ZD同学看见我,没打招呼,过后给我发短信说看见我满面红光的从她身边走过,没好意思打扰我,她忍不住笑了,太可爱了。刚回到宿舍时,SH跟我说,看你志得意满的样子。。 阅读全文