2020年2月8日

c使用mutex同步

摘要: #include <stdio.h> #include <unistd.h> #include <pthread.h> void increase(); int sum = 0; pthread_mutex_t mutex; int main() { // init mutex pthread_mu 阅读全文

posted @ 2020-02-08 23:04 luckygxf 阅读(700) 评论(0) 推荐(0) 编辑

1290. 二进制链表转整数

摘要: int getDecimalValue(struct ListNode* head){ int res = 0; while (head) { res <<= 1; res += head->val; head = head->next; } return res; } 阅读全文

posted @ 2020-02-08 18:17 luckygxf 阅读(139) 评论(0) 推荐(0) 编辑

c date格式

摘要: // // Created by gxf on 2020/2/8. // #include <time.h> #include <stdio.h> int main(int argc, char **argv) { time_t seconds; time(&seconds); printf("se 阅读全文

posted @ 2020-02-08 11:52 luckygxf 阅读(511) 评论(0) 推荐(0) 编辑

导航