会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Mr. Tan
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
13
下一页
2020年4月12日
Keras实现mnist
摘要: 1 import tensorflow as tf 2 import numpy as np 3 from tensorflow.keras.utils import to_categorical 4 5 # 导入数据 6 mnist = np.load('mnist.npz') 7 x_train
阅读全文
posted @ 2020-04-12 14:23 sqdtss
阅读(236)
评论(0)
推荐(0)
2020年3月31日
最长公共子串问题
摘要: 1 // 最长公共子串问题 2 // dp解决 3 // 状态转移方程: dp = 0 当str1[i-1] != str2[j-1], dp = dp[i-1][j-1] 当str1[i-1] == str2[j-1] 4 5 #include <bits/stdc++.h> 6 using na
阅读全文
posted @ 2020-03-31 10:24 sqdtss
阅读(142)
评论(0)
推荐(0)
2020年3月27日
万万没想到之抓捕孔连顺(2019校招)
摘要: 题目链接 https://www.nowcoder.com/practice/c0803540c94848baac03096745b55b9b?tpId=98&tqId=33007&tPage=1&rp=1&ru=/ta/2019test&qru=/ta/2019test/question-rank
阅读全文
posted @ 2020-03-27 17:34 sqdtss
阅读(421)
评论(0)
推荐(0)
2020年3月26日
快速幂
摘要: 1 #include <stdio.h> 2 #include <string.h> 3 4 typedef long long int lli; 5 6 lli power_digui(lli m, lli n) // 递归版 7 { 8 if (n == 0) // 任何数的0次方为1 9 re
阅读全文
posted @ 2020-03-26 19:16 sqdtss
阅读(139)
评论(0)
推荐(0)
一个学生37天准备考试,她知道他需要不超过60个小时的学习时间,每天至少1小时. 证明:无论如何安排学习时间,(每天都是整数小时)都存在连续的若干天,在此期间他恰好学习了13小时(鸽巢定理)
摘要: // 数学方法证明 设ak为第k天学习的时间,则: a1 + a2 + … + a37 <= 60 且ak >= 1 k = 1, 2 …, 37 则1<=b1<b2<…<b37<=60考察序列b1, b2, …,b37, b1+13, b2+13,….,b37+13此序列共74项,每项均为1~73
阅读全文
posted @ 2020-03-26 16:11 sqdtss
阅读(1775)
评论(0)
推荐(0)
栈操作
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 // 定义栈的结构体 5 typedef struct S 6 { 7 int data; 8 struct S *next; 9 } S, *SList; 10 11 // 初始化 12 void ini
阅读全文
posted @ 2020-03-26 16:08 sqdtss
阅读(169)
评论(0)
推荐(0)
队列操作
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 // 链队列结构体 5 typedef struct Queue 6 { 7 int data; 8 struct Queue *next; 9 } Queue, *QList; 10 // 队列指针结构体
阅读全文
posted @ 2020-03-26 16:05 sqdtss
阅读(194)
评论(0)
推荐(0)
将链表中元素值两两交换(比如1,2,3,4,5变为2,1,4,3,5)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 typedef struct node 5 { 6 int data; 7 node *next; 8 } node; 9 10 // 插入数组元素值 11 node *insert(node *L, in
阅读全文
posted @ 2020-03-26 15:09 sqdtss
阅读(398)
评论(0)
推荐(0)
二叉排序树数据结构及操作(BST求中序第一个元素,插入,查找,删除)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 // 二叉排序树数据结构 5 typedef struct BST 6 { 7 int data; // 数据部分 8 struct BST *lchild, *rchild; // 左右孩子 9 } BS
阅读全文
posted @ 2020-03-26 14:48 sqdtss
阅读(222)
评论(0)
推荐(0)
2020年3月24日
牛牛的背包问题(2019校招)
摘要: 题目链接: https://www.nowcoder.com/practice/bf877f837467488692be703735db84e6?tpId=98&tqId=32831&tPage=1&rp=1&ru=%2Fta%2F2019test&qru=%2Fta%2F2019test%2Fqu
阅读全文
posted @ 2020-03-24 12:52 sqdtss
阅读(206)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
13
下一页
公告