摘要: 问题:计算下列表达式 1+2*3-4-(2-(-1))*2+4/2计算中包含+,-,*,/,(,),数字,负号(-) 1 #include <iostream> 2 #include <stack> 3 4 using namespace std; 5 6 bool isOp(string &val 阅读全文
posted @ 2022-06-24 13:54 #忘乎所以# 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 注册账号之后进行应用申请,有限制的次数,但是测试是肯定够用。 然后申请一个新的应用就可以了。 申请之后就能得到下面的 Api_Key 和 Secret_Key 进行接口测试。 当然需要先进行access_token的获取https://ai.baidu.com/ai-doc/REFERENCE/Ck 阅读全文
posted @ 2020-06-09 21:47 #忘乎所以# 阅读(1003) 评论(0) 推荐(0) 编辑
摘要: 最近要提交综测成绩,闲来无事,可以写个爬虫直接自动提交,如果要批量提交的话就弄成一个txt文档,然后读取文件。 前提是先要连上学校的vpn,接下来执行文件输入用户和密码即可。 1 import requests 2 from bs4 import BeautifulSoup 3 import tim 阅读全文
posted @ 2020-05-15 18:14 #忘乎所以# 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 因为想学一下scrapy,然后要求在linux下安装Vagrant, 但是这个宿主机需要docker提供虚拟机,所以又要安装docker, 根据官网的提示,通过ubuntu的安装方式会出错,因为这个确实不是ubuntu的稳定版,然后就百度搜解决方案,最终有一个贴子有一个方案解决了我的问题。 Dock 阅读全文
posted @ 2019-10-19 15:50 #忘乎所以# 阅读(6404) 评论(0) 推荐(0) 编辑
摘要: 字节跳动面试题: 两个数为正数。 用链表求和: 现场写的时候出了几个bug实在尴尬。。。 样例一 2 3 4 54 5 62 8 0 1 样例二 9 9 99 9 91 9 9 9 阅读全文
posted @ 2019-09-08 20:57 #忘乎所以# 阅读(1110) 评论(0) 推荐(0) 编辑
摘要: 寻找两个有序数组的中位数 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2。 请你找出这两个有序数组的中位数,并且要求算法的时间复杂度为 O(log(m + n))。 你可以假设 nums1 和 nums2 不会同时为空。 示例 1: nums1 = [1, 3]nums2 = [ 阅读全文
posted @ 2019-08-31 23:04 #忘乎所以# 阅读(536) 评论(0) 推荐(0) 编辑
摘要: 1113 Integer Set Partition (25 分) 1113 Integer Set Partition (25 分) 1113 Integer Set Partition (25 分) Given a set of N (>) positive integers, you are 阅读全文
posted @ 2019-08-11 12:11 #忘乎所以# 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 1115 Counting Nodes in a BST (30 分) 1115 Counting Nodes in a BST (30 分) 1115 Counting Nodes in a BST (30 分) A Binary Search Tree (BST) is recursively 阅读全文
posted @ 2019-08-11 01:21 #忘乎所以# 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 1119 Pre- and Post-order Traversals (30 分) 1119 Pre- and Post-order Traversals (30 分) 1119 Pre- and Post-order Traversals (30 分) Suppose that all the 阅读全文
posted @ 2019-08-10 23:38 #忘乎所以# 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 1118 Birds in Forest (25 分) 1118 Birds in Forest (25 分) 1118 Birds in Forest (25 分) Some scientists took pictures of thousands of birds in a forest. A 阅读全文
posted @ 2019-08-10 22:32 #忘乎所以# 阅读(335) 评论(0) 推荐(0) 编辑