自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

田航语

从简单开始,需要耐心,注重细节

  • 博客(8)
  • 资源 (2)
  • 收藏
  • 关注

原创 X的平方根

题目: 思路:二分查找 #include int sqrt(int x) { long long low=0,mid = 0; long long high = (long long)x; while(low<=high){ mid = (low + high)/2; if(mid*mid == x) return mid;

2017-08-23 19:56:22 293

原创 O_NONBLOCK vs O_NDELAY

O_NONBLOCK vs O_NDELAY in particular things like a read with O_NDELAY can in some situations return a 0 instead of an error and EAGAIN… Since 0 normally means EOF… you have to be aware of this b

2017-08-22 17:01:29 425

原创 奇怪的国家

题目 思路:以字符比较 #include #include #define MAX 50 int main() { char N[MAX]={'\0'},M[MAX],A[MAX]; scanf("%s\n",N); scanf("%s\n",M); for(int i = 0;i< strlen(M); i++) {

2017-08-21 20:47:34 351

原创 function pointer reinterpret_cast

htonl, htons, ntohl, ntohs - convert values between host and network byte order#include <arpa/inet.h> uint32_t htonl(uint32_t hostlong); uint16_t htons(uint16_t hostshort); uint32_t ntohl(uint32_t netl

2017-08-21 17:10:05 313

原创 Linux 相关笔记记录1

C++11/C++14 7. Threads with Shared Memory and Mutex - 2017[IPC:Shared Memory]int shmget(key_t key, size_t size, int shmflg);int shmctl(int shmid, int cmd, struct shmid_ds *buf);void *shmat(int shmid, c

2017-08-21 15:49:41 219

原创 泥塑课

泥塑课 [题目](https://nanti.jisuanke.com/t/6) #include #include int main() { int col = 0; int length[50]={0},width[50]={0},higth[50]={0}; char name[90][80]; memset(name,'\0',sizeof(nam

2017-08-17 19:50:10 249

原创 斐波那契数列

斐波那契数列 #include int main(){ int i=0,n=0, ans[100]={0}; scanf("%d",&n); ans[0] = 0; ans[1] = 1; for(i=2;i<=n;i++) { ans[i] = ans[i-1] + ans[i-2]; //printf("%d,%

2017-08-17 19:48:35 192

原创 计蒜课-判断质数

没啥意义,好久没写而已 #include int main() { int i=0,num=1; bool flag= false; scanf("%d",&num); if(num == 2) { printf("YES\n"); }else{ for(i = 2; i <= num/2; ++i){

2017-08-16 12:20:00 227

百度地图最新API查找附近美食

百度地图最新API查找附近美食

2016-08-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除