• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






tccbj

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 2 3 4 5 6 7 8 9 ··· 22 下一页

2019年3月30日

安装TensorFlow踩的坑
摘要: 1、TensorFlow的版本要和对应的cuda,cudnn版本都对应上,装了cuda 9.0和cudnn 7.5,TensorFlow默认装了最新版1.13.1,一直出现 DLL error: 找不到指定模块。装了各种VS2015、2017都没用,最后发现是TensorFlow版本太高,需要cud 阅读全文
posted @ 2019-03-30 20:34 tccbj 阅读(493) 评论(0) 推荐(0)
 

2019年3月19日

剑指offer——包含min函数的栈
摘要: 定义栈的数据结构,请在该类型中实现一个能够得到栈中所含最小元素的min函数(时间复杂度应为O(1))。 思路:用一个辅助栈记录入栈元素从大到小,如果后面压入的元素比辅助栈顶元素大,就不用压入它(等于还是要,否则pop了会出错)。考虑635入栈,第一次s1:6,s2:6,min:6。第二次s1:6,3 阅读全文
posted @ 2019-03-19 08:54 tccbj 阅读(158) 评论(0) 推荐(0)
 

2019年3月15日

剑指offer——链表中倒数第k个结点
摘要: 输入一个链表,输出该链表中倒数第k个结点。 分析:用两个指针来判断,两个指针差k个位置,当后面一个指针到尾部时,前面那个就在倒数第k个位置。还要注意判断k大于链表长度的情况。 阅读全文
posted @ 2019-03-15 20:50 tccbj 阅读(128) 评论(0) 推荐(0)
 

2019年3月14日

剑指offer——矩形覆盖
摘要: 我们可以用2*1的小矩形横着或者竖着去覆盖更大的矩形。请问用n个2*1的小矩形无重叠地覆盖一个2*n的大矩形,总共有多少种方法? 分析:斐波那契数列的变形 n=0,返回0 n=1,返回1 n=2,返回1 n>2,两种情况第一块横着放,返回f(n-1),竖着放返回f(n-2) 所以就是一个典型斐波那契 阅读全文
posted @ 2019-03-14 22:39 tccbj 阅读(105) 评论(0) 推荐(0)
 
剑指offer——变态跳台阶
摘要: 一只青蛙一次可以跳上1级台阶,也可以跳上2级……它也可以跳上n级。求该青蛙跳上一个n级的台阶总共有多少种跳法。 分析: 两种方法,第一种比较直观,第二种比较直接。 第一种:f(1)=1; f(2)=f(2-1)+f(2-2)=2; f(3)=f(3-1)+f(3-2)+f(3-3); f(n) = 阅读全文
posted @ 2019-03-14 21:40 tccbj 阅读(117) 评论(0) 推荐(0)
 

2019年3月1日

PAT A1095 Cars on Campus (30 分)——排序,时序,从头遍历会超时
摘要: Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the g 阅读全文
posted @ 2019-03-01 17:02 tccbj 阅读(343) 评论(0) 推荐(0)
 
PAT A1094 The Largest Generation (25 分)——树的bfs遍历
摘要: A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find t 阅读全文
posted @ 2019-03-01 15:31 tccbj 阅读(147) 评论(0) 推荐(0)
 
PAT A1055 The World's Richest (25 分)——排序
摘要: Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to si 阅读全文
posted @ 2019-03-01 14:57 tccbj 阅读(238) 评论(0) 推荐(0)
 
PAT A1052 Linked List Sorting (25 分)——链表,排序
摘要: A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key  阅读全文
posted @ 2019-03-01 14:40 tccbj 阅读(132) 评论(0) 推荐(0)
 
PAT A1076 Forwards on Weibo (30 分)——图的bfs
摘要: Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social n 阅读全文
posted @ 2019-03-01 11:45 tccbj 阅读(151) 评论(0) 推荐(0)
 
上一页 1 2 3 4 5 6 7 8 9 ··· 22 下一页