自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

真的想嫁给朱一龙诶

真的想嫁给朱一龙诶!

  • 博客(31)
  • 收藏
  • 关注

原创 当cmd的cd命令失效时,你该怎么做

奇奇怪怪,今天用cmd想进入某个路径时,cd命令失效了,既没有报错也没有盘符切换,然后我尝试返回根目录,然后直接写盘符,没想到奇迹出现了…

2023-06-23 21:37:57 421 1

原创 软蚀刻(Soft Lithography)技术小记

见:Introduction to PDMS soft-lithography and polymer molding for microfluidics链接:https://www.elveflow.com/microfluidic-reviews/soft-lithography-microfabrication/introduction-about-soft-lithography-and-polymer-molding-for-microfluidic/补充知识:光刻胶:光刻胶(英语:p

2020-09-20 15:15:17 808

原创 pycharm如何高效导入和管理包

之前看许多人都推荐用anaconda,说是各种常用包都有啦如何如何,但其实呢用pycharm完全可以实现DIY自己需要的包,并且生成通用的虚拟环境。步骤如下:File->Settings->Project Interpreter->设置->Add点OK确认,之后就可以愉快地添加需要的包,并且在新工程里面也可以使用啦~!...

2019-12-04 22:41:46 1506

原创 Python+jieba实现分词和词频统计并将结果存入Excel

import xlrdimport numpy as npimport pandas as pdimport jiebaimport jieba.analyseimport codecsfrom openpyxl import Workbookdef insertOne(value1,value2, sheet): row = [value1,value2] sh...

2019-11-03 00:16:07 6120 1

原创 Python+BeautifulSoup+requests获取某大学新闻网头条新闻标题

小白一枚,作业需要,就搞了一个粗陋的版本出来。基本功能么得问题,只是搞不明白为什么每页第一条新闻都会重复一次,暴力删除了…话不多说,直接贴代码:import requestsfrom bs4 import BeautifulSoupfrom openpyxl import Workbook# 写入一行数据def insertOne(value1,value2, sheet)...

2019-11-02 01:07:24 346

转载 LeetCode#29DivideTwoIntegers

//题解https://www.cnblogs.com/grandyang/p/4431949.html//关于负数除法的问题https://blog.csdn.net/misayaaaaa/article/details/69802746这个题目太特么坑了,要好好熟悉C++各种整数类型的范围,嗯,要命。...

2019-09-24 22:15:58 117

原创 LeetCode#28Implement_strStr()

//就很简单随便写写就行//注意一下当needle为空时要返回啥//出题者有给提示class Solution {public: int strStr(string haystack, string needle) { if (needle.size() == 0)return 0; if (haystack.size() == 0)return -1; if (needl...

2019-09-23 22:07:55 98

原创 LeetCode#27RemoveElement

//答应我不要用二分法写//一口老血吐出来class Solution {public: int removeElement(vector<int>& nums, int val) { if (nums.size() == 0)return 0; if (nums.size() == 1) { if (nums[0] == val)return 0; ...

2019-09-23 14:18:17 109

原创 LeetCode#26RemoveDuplicatesFromSortedArray

//打下划线太麻烦了换一下标题风格//请注意nums.end()返回的是向量最后一个元素的后面那个地址//太坑了//要好好学习class Solution {public: int removeDuplicates(vector<int>& nums) { if (nums.size() == 0) return 0; if (nums.size() ==...

2019-09-23 12:49:42 116

原创 LeetCode_#25_Reverse_Nodes_in_k-Group

//挺快的但是空间占用率比较高而且感觉写的好麻烦哦orzclass Solution {public: ListNode * reverseKGroup(ListNode* head, int k) { vector<ListNode*> every; ListNode* ptr; ptr = head; while (ptr != NULL) { eve...

2019-09-21 22:00:38 91

转载 关于A*算法(A星算法)

人智基础,老师稍微提了下此算法,希望我们复现一下,课上理解不够深刻,故查阅资料。感觉以下文章很好,不妨一观:https://www.gamedev.net/articles/programming/artificial-intelligence/a-pathfinding-for-beginners-r2003/https://blog.csdn.net/hitwhylz/articl...

2019-09-19 13:37:04 1653

原创 LeetCode_#24_Swap_Nodes_in_Pairs

就,解法挺暴力的,弄了个vector存地址,挺费空间的,随意看看吧。class Solution {public: ListNode * swapPairs(ListNode* head) { if (head == nullptr)return head; if (head->next == nullptr)return head; vector<ListNo...

2019-09-17 19:49:55 108

原创 LeetCode_#23_Merge_k_Sorted_Lists

我太暴力了,其他聪明的算法见https://blog.csdn.net/yutianzuijin/article/details/88598979130/131通过,最后数据量比较大的样例超时了,我十分怀疑是sort()的存在影响了一切。这版代码如下:class Solution {public: ListNode * mergeKLists(vector<ListNode...

2019-09-16 23:48:41 87

原创 美国大学英语写作第9版_笔记1_概况

2019.9.15 DAY1Wring Task II (IELTS)task responsecoherence and cohesionlexical resources a wide range of vocabulary with very natural and sophisticated control of lexical features...

2019-09-15 17:15:10 3524 1

原创 LeetCode_#22_Generate_Parentheses

emmm用递归吧,这都写不出来,真的药丸…class Solution {public: void generateParenthesisDFS(int left, int right, string out, vector<string> &vec) { if (left > right) return; if (left == 0 &&amp...

2019-09-15 14:27:21 118

原创 LeetCode_#21_Merge_Two_Sorted_Lists

就这破玩意儿我写了好几遍,可见基本功太差劲儿啊,药丸!class Solution {public: ListNode * mergeTwoLists(ListNode* l1, ListNode* l2) { if (l1 == nullptr&&l2 == nullptr) return l1; else if (l1 == nullptr&&...

2019-09-14 22:57:13 102

原创 LeetCode_#20_Valid_Parentheses

很简单,用栈就可以了…class Solution {public: bool isValid(string s) { int len = size(s); if (len == 0)return true; stack<char> re; for (int i = 0; i < len; i++) { if (re.empty()) { ...

2019-09-14 19:39:43 86

原创 LeetCode_#19_Remove_Nth_Node_From_End_of_List

class Solution {public: ListNode * removeNthFromEnd(ListNode* head, int n) { ListNode* ptr = head; int len = 1; while (ptr->next != NULL) { len++; ptr = ptr->next; } ListNode*...

2019-09-14 18:37:32 109

原创 LeetCode_#18_4_Sum

和之前的3Sum和3SumCloset是一个思路,随便写写就行。class Solution {public: vector<vector<int>> fourSum(vector<int>& nums, int target) { int len = size(nums); sort(nums.begin(),nums.end());...

2019-09-14 18:36:26 124

原创 LeetCode_#17_ Letter_Combinations_of_a_Phone_Number

class Solution {public: vector<string> letterCombinations(string digits) { int sz = digits.size(), tvsz; if (sz == 0) return vector<string>(); map<char, vector<char>&gt...

2019-09-14 18:35:09 144

原创 LeetCode_#16_3_Sum_Closet

class Solution {public: int threeSumClosest(vector<int>& nums, int target) { //vector<vector<int>> re; int re; //only one solution && there must be one solution...

2019-09-14 18:33:30 136

原创 LeetCode_#15_3_Sum

class Solution {public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> re; if (size(nums) < 3) return re; if (size(nums) == 3) { ...

2019-09-14 18:32:37 95

原创 LeetCode_#14_Longest_Common_Prefix

class Solution {public: //version_3 string longestCommonPrefix(vector<string>& strs) { int str_num = size(strs); if (str_num == 1) { return strs[0]; } if (str_num == 0) { ...

2019-07-29 12:00:24 86

原创 LeetCode_#9_Palindrome_Number

//思路,整型转字符串,用stringstream//不然就一位一位搞出来咯class Solution {public: bool isPalindrome(int x) { if(x&lt;0) return false; stringstream ss; ss&lt;&lt;x; int len = (ss.str...

2018-05-03 13:34:01 88

原创 LeetCode_#7_Reverse_Integer

//思路十分暴力//就是把原带符号数的每一位取出来//再逐个乘10的幂次//要注意的是如何判断溢出//哇判断溢出这个是我心中永远的痛了,从C语言学到数电、数据结构再到计原,我就没学明白过//有人看我博客么,给我通俗易懂的讲讲好么,我现在看到“溢出”两个字就犯怵,但没想到胡诌竟然还把题目做出来了class Solution {public: int reverse(int x) ...

2018-05-02 21:54:40 99

原创 LeetCode_#6_ZigZag_Conversion

//思路就是找出zigzag序列每一横行//(一共numRows横行)//中各个字符在原字符串s中下标的间隔是多少//依次输出即可class Solution {public: string convert(string s, int numRows) { if((s.size()&lt;=numRows)||(numRows==1)) return s; ...

2018-05-02 17:53:29 131

转载 LeetCode_#5_Longest_Palindromic_Substring

//好晚了自己竟然没写出来//想起这道题是大一C语言期末考试的一道题莫名悲伤//唉//感谢https://www.cnblogs.com/love-yh/p/7071871.htmlclass Solution {public: string longestPalindrome(string s) { string res=""; int ...

2018-05-02 01:52:29 136

原创 LeetCode_#4_Median_of_Two_Sorted_Arrays

//sorted好像就指升序排列,所以不用再判断是升序还是降序//注意返回类型是double,中位数除以二时应该写成2.0//我的思路非常简单粗暴所以runtime比较长hhh,还是需要优化class Solution {public: double findMedianSortedArrays(vector&lt;int&gt;&amp; nums1, vector&lt;int...

2018-05-01 23:51:11 154

原创 LeetCode_#3_Longest_Substring_Without_Repeating_Characters

//大致思路就是弄了两个指针,往后滑,调了挺久的还是基本功不扎实啊,看解答似乎用了Hash表,没看太懂咳咳咳,思路好像也就是滑窗吧class Solution {public: int lengthOfLongestSubstring(string s) { if(s.size()==0) return 0; int head=0,tail=0; ...

2018-05-01 17:12:37 124

原创 LeetCode_#2_Add_Two_Numbers

/** * Definition for singly-linked list. * struct ListNode { *     int val; *     ListNode *next; *     ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public:    ListNode* addTwoNumber...

2018-04-30 22:19:28 91

原创 LeetCode_#1_Two_Sum

class Solution {public:    vector&lt;int&gt; twoSum(vector&lt;int&gt;&amp; nums, int target) {        vector&lt;int&gt; target_series;        int len = nums.size();        for(int i=0;i&lt;len;i++){  ...

2018-04-30 22:18:09 119

空空如也

空空如也

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

TA关注的人

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