Skip to content

Commit

Permalink
128
Browse files Browse the repository at this point in the history
  • Loading branch information
sjnaj committed Dec 8, 2021
1 parent 202f9c2 commit 5b86e3c
Show file tree
Hide file tree
Showing 81 changed files with 1,046,169 additions and 113,009 deletions.
4 changes: 2 additions & 2 deletions DataStructure/BinaryTree/Tree.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author: fengsc
* @Date: 2021-10-31 14:11:31
* @LastEditTime: 2021-11-02 18:50:03
* @LastEditTime: 2021-12-07 22:42:06
*/
#pragma once
#include <iostream>
Expand All @@ -10,7 +10,7 @@
#include <stack>
#include <queue>
#include "BinaryTree.cpp"
using DataType = char;
using DataType = int;
using namespace std;
struct Node
{
Expand Down
3 changes: 1 addition & 2 deletions DataStructure/BinaryTree/queen.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Author: fengsc
* @Date: 2021-11-10 15:54:52
* @LastEditTime: 2021-11-10 16:08:39
* @LastEditTime: 2021-12-07 22:17:00
*/
#include <iostream>
#include <cmath>
Expand All @@ -26,4 +26,3 @@ void dfs(vector<int> chess, vector<vector<int>> &ans, int k)
}
}
}
}
2 changes: 1 addition & 1 deletion DataStructure/Graph/.vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"defines": ["_DEBUG"],//在这定义好像没什么卵用
"compilerPath": "/usr/bin/gcc",
"intelliSenseMode": "linux-gcc-x64",
"configurationProvider": "go2sh.cmake-integration",
Expand Down
3 changes: 2 additions & 1 deletion DataStructure/Graph/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
"iomanip": "cpp",
"ctime": "cpp",
"list": "cpp"
}
},
"C_Cpp.errorSquiggles": "Disabled"
}
10 changes: 8 additions & 2 deletions DataStructure/Graph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -save-temps=obj")# CPP
#保存临时文件,预处理和汇编都是生成object的中间临时文件,=obj,表示生成预处理文件的位置和.o同目录,不加时在build目录下
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-schedule-insns2")



Expand All @@ -23,7 +22,14 @@ get_filename_component(mainname ${mainfile} NAME_WE)#转换生成mainname,NAME
add_executable(${mainname} ${mainfile})
##target_link_libraries( ${mainname} LINK Threads::Threads) # 添加链接库,LINK是在src目录的CMakeLists中定义的,Threads来自上面引入的包
endforeach()

if (CMAKE_BUILD_TYPE STREQUAL Debug)##添加_DEBUG宏
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=leak")
##不适用于release 模式
##-fno-omit-frame-pointer 保留栈帧指针,获取详细信息,运行默认关闭,调试时默认打开
add_definitions(
-D_DEBUG
)
endif ()
#aux_source_directory(. ALL_SRCS) # 添加当前目录下所有的源文件
#add_executable( ${PROJECT_NAME} ${ALL_SRCS})//默认projectname就是main
#target_link_libraries( ${PROJECT_NAME} LINK) # 添加链接库,LINK是在src目录的CMakeLists中定义的
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
[
{
"name" : "HELPSTRING",
"value" : "No help, variable specified on the command line."
"value" : "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..."
}
],
"type" : "STRING",
Expand Down Expand Up @@ -551,11 +551,11 @@
},
{
"name" : "HELPSTRING",
"value" : "No help, variable specified on the command line."
"value" : "Enable/Disable output of compile commands during generation."
}
],
"type" : "BOOL",
"value" : "TRUE"
"value" : "ON"
},
{
"name" : "CMAKE_EXTRA_GENERATOR",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
26,
27,
28,
29
29,
30,
31,
32
]
}
],
Expand Down Expand Up @@ -87,7 +90,10 @@
26,
27,
28,
29
29,
30,
31,
32
]
}
],
Expand Down Expand Up @@ -291,15 +297,36 @@
},
{
"directoryIndex" : 0,
"id" : "main::@6890427a1f51a3e7e1df",
"jsonFile" : "target-main-Debug-8cb6b73e48590b493186.json",
"name" : "main",
"id" : "mainALGraph::@6890427a1f51a3e7e1df",
"jsonFile" : "target-mainALGraph-Debug-05f29a2c3fc7912b41be.json",
"name" : "mainALGraph",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "mainMXGraph::@6890427a1f51a3e7e1df",
"jsonFile" : "target-mainMXGraph-Debug-2925c1ffd04ad2301b1e.json",
"name" : "mainMXGraph",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "mainMin::@6890427a1f51a3e7e1df",
"jsonFile" : "target-mainMin-Debug-5f44529521555cb167fc.json",
"name" : "mainMin",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "mainProject::@6890427a1f51a3e7e1df",
"jsonFile" : "target-mainProject-Debug-7d80ffa84fc5413bc984.json",
"name" : "mainProject",
"projectIndex" : 0
},
{
"directoryIndex" : 0,
"id" : "mainRelation::@6890427a1f51a3e7e1df",
"jsonFile" : "target-mainRelation-Debug-dc9b374fce60f18220ed.json",
"jsonFile" : "target-mainRelation-Debug-fc17fc9fb19492c617dc.json",
"name" : "mainRelation",
"projectIndex" : 0
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"objects" :
[
{
"jsonFile" : "codemodel-v2-01b898c0ac24003e101f.json",
"jsonFile" : "codemodel-v2-0495f20c03c487c27814.json",
"kind" : "codemodel",
"version" :
{
Expand All @@ -34,7 +34,7 @@
}
},
{
"jsonFile" : "cache-v2-163ffcf5974d47d8c744.json",
"jsonFile" : "cache-v2-ee181f39951f4e0f51f2.json",
"kind" : "cache",
"version" :
{
Expand All @@ -58,7 +58,7 @@
{
"cache-v2" :
{
"jsonFile" : "cache-v2-163ffcf5974d47d8c744.json",
"jsonFile" : "cache-v2-ee181f39951f4e0f51f2.json",
"kind" : "cache",
"version" :
{
Expand All @@ -78,7 +78,7 @@
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-01b898c0ac24003e101f.json",
"jsonFile" : "codemodel-v2-0495f20c03c487c27814.json",
"kind" : "codemodel",
"version" :
{
Expand Down Expand Up @@ -109,7 +109,7 @@
"responses" :
[
{
"jsonFile" : "cache-v2-163ffcf5974d47d8c744.json",
"jsonFile" : "cache-v2-ee181f39951f4e0f51f2.json",
"kind" : "cache",
"version" :
{
Expand All @@ -118,7 +118,7 @@
}
},
{
"jsonFile" : "codemodel-v2-01b898c0ac24003e101f.json",
"jsonFile" : "codemodel-v2-0495f20c03c487c27814.json",
"kind" : "codemodel",
"version" :
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"artifacts" :
[
{
"path" : "mainALGraph"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"add_definitions",
"include_directories"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 22,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 29,
"parent" : 0
},
{
"command" : 2,
"file" : 0,
"line" : 18,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : " -save-temps=obj -std=c++17 -fsanitize=address -fsanitize=leak -g "
}
],
"defines" :
[
{
"backtrace" : 2,
"define" : "_DEBUG"
}
],
"includes" :
[
{
"backtrace" : 3,
"path" : "/home/fengsc/Desktop/cpp/DataStructure/Graph/build"
}
],
"language" : "CXX",
"sourceIndexes" :
[
0
]
}
],
"id" : "mainALGraph::@6890427a1f51a3e7e1df",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-save-temps=obj -std=c++17 -fsanitize=address -fsanitize=leak -g",
"role" : "flags"
},
{
"fragment" : "-rdynamic",
"role" : "flags"
}
],
"language" : "CXX"
},
"name" : "mainALGraph",
"nameOnDisk" : "mainALGraph",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "mainALGraph.cpp",
"sourceGroupIndex" : 0
}
],
"type" : "EXECUTABLE"
}
Loading

0 comments on commit 5b86e3c

Please sign in to comment.