- 博客(7)
- 资源 (2)
- 收藏
- 关注
原创 词法分析器,待修改
// C语言词法分析器#include <cstdio>#include <cstring>#include <iostream>#include <map>#include <string>#include <fstream>#include <sstream>#include <vecto...
2019-05-06 10:50:24
164
原创 浮点数加法
#include <iostream>#include <stdio.h>#include <string.h>using namespace std;struct bigNum{ int left[1000]; int right[1000]; int size1; int size2; void init...
2019-04-08 17:37:38
396
原创 最短路径——最小生成树
题目描述N个城市,标号从0到N-1,M条道路,第K条道路(K从0开始)的长度为2^K,求编号为0的城市到其他城市的最短距离输入描述:第一行两个正整数N(2<=N<=100)M(M<=500),表示有N个城市,M条道路接下来M行两个整数,表示相连的两个城市的编号输出描述:N-1行,表示0号城市到其他城市的最短路,如果无法到达,输出-1,数值太大的以MOD 100000 ...
2019-04-03 20:05:42
324
原创 确定比赛名次——拓扑排序
先存一份代码在这#include <iostream>#include <stdio.h>#include <vector>#include <queue>using namespace std;vector<int> g[505];int indegree[505];int main(){ int n,m...
2019-04-03 15:25:58
120
原创 LEETCODE3. Longest Substring Without Repeating Characters贪心
题目Given a string, find the length of the longest substring without repeating characters.Example 1:Input: “abcabcbb”Output: 3Explanation: The answer is “abc”, with the length of 3.Example 2:Inpu...
2019-03-23 15:16:48
69
原创 Leetcode121. Best Time to Buy and Sell Stock
**题目**Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the...
2019-03-23 14:31:05
65
原创 Leetcode 260. Single Number III
目录题目分析代码题目Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once.Example:Input:...
2019-03-15 13:07:01
104
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人