diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 884ed5f..1240473 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -13,12 +13,12 @@ "state": { "type": "markdown", "state": { - "file": "月兔直流变频内机功能说明书/运行模式/送风模式.md", + "file": "月兔直流变频内机功能说明书/检测与维护/故障处理.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "送风模式" + "title": "故障处理" } } ] @@ -94,7 +94,7 @@ "state": { "type": "backlink", "state": { - "file": "月兔直流变频内机功能说明书/运行模式/送风模式.md", + "file": "月兔直流变频内机功能说明书/检测与维护/故障处理.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -104,7 +104,7 @@ "unlinkedCollapsed": true }, "icon": "links-coming-in", - "title": "送风模式 的反向链接列表" + "title": "故障处理 的反向链接列表" } }, { @@ -113,12 +113,12 @@ "state": { "type": "outgoing-link", "state": { - "file": "月兔直流变频内机功能说明书/运行模式/送风模式.md", + "file": "月兔直流变频内机功能说明书/检测与维护/故障处理.md", "linksCollapsed": false, "unlinkedCollapsed": true }, "icon": "links-going-out", - "title": "送风模式 的出链列表" + "title": "故障处理 的出链列表" } }, { @@ -142,13 +142,13 @@ "state": { "type": "outline", "state": { - "file": "月兔直流变频内机功能说明书/运行模式/送风模式.md", + "file": "月兔直流变频内机功能说明书/检测与维护/故障处理.md", "followCursor": false, "showSearch": false, "searchQuery": "" }, "icon": "lucide-list", - "title": "送风模式 的大纲" + "title": "故障处理 的大纲" } } ] @@ -172,11 +172,22 @@ "obsidian-livesync:Show Customization sync": false } }, - "active": "87ec71219df28de6", + "active": "3abfa1be25cf8175", "lastOpenFiles": [ + "月兔直流变频内机功能说明书/月兔直流变频内机功能说明书.md", + "月兔直流变频内机功能说明书/运行模式/送风模式.md", + "C/main.exe", + "C语言学习/T1/cmake-build-debug/CMakeFiles/clion-Debug-log.txt", + "C语言学习/T1/cmake-build-debug/CMakeFiles", + "C语言学习/T1/cmake-build-debug", + "C语言学习/T1", + "C语言学习", + "C/T1/cmake-build-debug/CMakeFiles/4.0.2/CompilerIdC/tmp", + "C/T1/cmake-build-debug/CMakeFiles/4.0.2/CompilerIdC/a.exe", + "C/T1/cmake-build-debug/CMakeFiles/4.0.2/CompilerIdC/CMakeCCompilerId.c", + "C/T1/cmake-build-debug/Testing/Temporary/LastTest.log", "运行模式/制冷模式.md", "运行模式/制热模式.md", - "运行模式", "月兔直流变频内机功能说明书/运行模式/除湿模式.md", "月兔直流变频内机功能说明书/运行模式/温度补偿.md", "月兔直流变频内机功能说明书/运行模式/制冷模式.md", @@ -185,17 +196,13 @@ "月兔直流变频内机功能说明书/睡眠制冷运行过程参考表.png", "月兔直流变频内机功能说明书/睡眠制热运行过程参考表.png", "月兔直流变频内机功能说明书/显示灯板.png", - "月兔直流变频内机功能说明书/月兔直流变频内机功能说明书.md", - "月兔直流变频内机功能说明书/月兔直流变频内机功能说明书.pdf", "月兔直流变频内机功能说明书/制冷模式.png", "月兔直流变频内机功能说明书/制热防冷风.png", "月兔直流变频内机功能说明书/制热模式.png", "月兔直流变频内机功能说明书/README.md", "月兔直流变频内机功能说明书/特殊功能/自清洁功能.md", - "C语言学习", "月兔直流变频内机功能说明书/特殊功能/高温杀菌功能.md", "未命名.canvas", - "月兔直流变频内机功能说明书", "未命名 1.canvas", "月兔直流变频内机功能说明书/检测与维护/Wifi功能.md", "月兔直流变频内机功能说明书/功能特性/睡眠功能.md", @@ -211,12 +218,6 @@ "月兔直流变频内机功能说明书/检测与维护/故障处理.md", "月兔直流变频内机功能说明书/检测与维护/保护类故障查询.md", "月兔直流变频内机功能说明书/检测与维护/参数查询.md", - "电控概述.md", - "月兔直流变频内机功能说明书/检测与维护/缩时功能.md", - "月兔直流变频内机功能说明书/检测与维护", - "月兔直流变频内机功能说明书/特殊功能", - "月兔直流变频内机功能说明书/功能特性", - "月兔直流变频内机功能说明书/运行模式", - "月兔直流变频内机功能说明书/基础配置" + "电控概述.md" ] } \ No newline at end of file diff --git a/C/.idea/.gitignore b/C/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/C/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/C/.idea/C.iml b/C/.idea/C.iml new file mode 100644 index 0000000..4c94235 --- /dev/null +++ b/C/.idea/C.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/C/.idea/editor.xml b/C/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/C/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/C/.idea/modules.xml b/C/.idea/modules.xml new file mode 100644 index 0000000..a0bac1c --- /dev/null +++ b/C/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/C/.idea/vcs.xml b/C/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/C/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/C/T1/.idea/.gitignore b/C/T1/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/C/T1/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/C/T1/.idea/T1.iml b/C/T1/.idea/T1.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/C/T1/.idea/T1.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/C/T1/.idea/editor.xml b/C/T1/.idea/editor.xml new file mode 100644 index 0000000..ca29dcc --- /dev/null +++ b/C/T1/.idea/editor.xml @@ -0,0 +1,101 @@ + + + + + \ No newline at end of file diff --git a/C/T1/.idea/encodings.xml b/C/T1/.idea/encodings.xml new file mode 100644 index 0000000..8a3ca1f --- /dev/null +++ b/C/T1/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/C/T1/.idea/misc.xml b/C/T1/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/C/T1/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/C/T1/.idea/modules.xml b/C/T1/.idea/modules.xml new file mode 100644 index 0000000..13bf4e0 --- /dev/null +++ b/C/T1/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/C/T1/.idea/vcs.xml b/C/T1/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/C/T1/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/C/T1/CMakeLists.txt b/C/T1/CMakeLists.txt new file mode 100644 index 0000000..661b675 --- /dev/null +++ b/C/T1/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 4.0) +project(T1 C) + +set(CMAKE_C_STANDARD 11) + +add_executable(T1 main.c) diff --git a/C/T1/main.c b/C/T1/main.c new file mode 100644 index 0000000..c95d869 --- /dev/null +++ b/C/T1/main.c @@ -0,0 +1,37 @@ +#include +#include +#include + +bool canWinNim(int n) { + // 如果石头数量是4的倍数,先手必输 + // 否则先手必胜 + return n % 4 != 0; +} + +int main(void) { + // 测试用例1: n = 4, 期望输出: false + int n1 = 4; + bool result1 = canWinNim(n1); + printf("石头数量 %d: %s\n", n1, result1 ? "true (能赢)" : "false (不能赢)"); + + // 测试用例2: n = 1, 期望输出: true + int n2 = 1; + bool result2 = canWinNim(n2); + printf("石头数量 %d: %s\n", n2, result2 ? "true (能赢)" : "false (不能赢)"); + + // 测试用例3: n = 2, 期望输出: true + int n3 = 2; + bool result3 = canWinNim(n3); + printf("石头数量 %d: %s\n", n3, result3 ? "true (能赢)" : "false (不能赢)"); + + // 额外测试用例 + int n4 = 3; + bool result4 = canWinNim(n4); + printf("石头数量 %d: %s\n", n4, result4 ? "true (能赢)" : "false (不能赢)"); + + int n5 = 5; + bool result5 = canWinNim(n5); + printf("石头数量 %d: %s\n", n5, result5 ? "true (能赢)" : "false (不能赢)"); + + return 0; +} diff --git a/C/main.exe b/C/main.exe new file mode 100644 index 0000000..567f2f3 Binary files /dev/null and b/C/main.exe differ