原创 LeetCode1296. 劃分數組爲連續數字的集合

1296. Divide Array in Sets of K Consecutive Numbers [Medium] Given an array of integers nums and a positive integer

原创 LeetCode659. 分割數組爲連續子序列

659. Split Array into Consecutive Subsequences [Medium] Given an array nums sorted in ascending order, return true

原创 numpy切片中的省略號及None

>>> import numpy as np >>> arr = np.arange(12).reshape(2, 2, 3) >>> arr array([[[ 0, 1, 2], [ 3, 4, 5]

原创 torch.nn和torch.nn.functional的區別

原文鏈接:https://discuss.pytorch.org/t/difference-of-methods-between-torch-nn-and-functional/1076

原创 python3 fstring

>>> # 可以使用小寫f或者大寫的F ... >>> name = "Eric" >>> age = 74 >>> f"hello, {name}. You are {age}." 'hello, Eric. You are 7

原创 VS2010調用外部EXE

背景:在當前工程中調用外部三方exe執行程序 環境:win10 VS2010 假設外部程序爲ge_exe.exe,具體功能爲將輸入的兩個參數等樣輸出。 TIPS:三方exe屬性,【配置屬性】-【常規】-【字符集】選擇使用多字節字符

原创 VS2010 error LINK1104: 無法打開文件 '***.obj'

環境: windows xp VS2010 問題: 在調用自己生成的動態庫時,出現錯誤: error LINK1104: 無法打開文件 '***.obj' 原因: 【項目屬性頁】- 【配置屬性】-【鏈接器】-【附加依賴項】,其中

原创 pytorch .data

原文鏈接:https://pytorch.org/blog/pytorch-0_4_0-migration-guide/ What about .data? .data was the

原创 字節跳動2020校園招聘筆試題(2019.9.15)

和小於K的三元組個數 圖片來源於網絡,侵刪。 int main() { int n; cin >> n; vector<int> nums(n); for (int i = 0; i < n; +

原创 LeetCode959. Regions Cut By Slashes(由斜槓劃分區域)

959. Regions Cut By Slashes In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or bla

原创 LeetCode312. Burst Balloons(戳氣球)

312. Burst Balloons Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represente

原创 LeetCode945. Minimum Increment to Make Array Unique(使數組唯一的最小增量)

945. Minimum Increment to Make Array Unique Given an array of integers A, a move consists of choosing any A[i], and

原创 LeetCode983. Minimum Cost For Tickets(最低票價)

983. Minimum Cost For Tickets In a country popular for train travel, you have planned some train travelling one yea

原创 根號數二分求解

#include<iostream> #include<algorithm> using namespace std; double my_sqrt(double num) { double l = 0; dou

原创 LeetCode763. Partition Labels(劃分字母區間)

763. Partition Labels A string S of lowercase letters is given. We want to partition this string into as many parts