Update CMakeLists.txt

This commit is contained in:
2026-09-05 11:05:50 +08:00
parent 94bdf44889
commit a7a78fbac8
22 changed files with 1339 additions and 52 deletions
+1 -1
View File
@@ -230,7 +230,7 @@
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" /> <option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" /> <option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" /> <option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseInternalLinkage/@EntryIndexedValue" value="SUGGESTION" type="string" /> <option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseInternalLinkage/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" /> <option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" /> <option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" />
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" /> <option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" />
+232 -46
View File
@@ -4,7 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="BackendCodeEditorMiscSettings"> <component name="BackendCodeEditorMiscSettings">
<option name="/Default/Environment/Hierarchy/GeneratedFilesCacheKey/Timestamp/@EntryValue" value="8" type="long" /> <option name="/Default/Environment/Hierarchy/GeneratedFilesCacheKey/Timestamp/@EntryValue" value="3" type="long" />
<option name="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=SwitchToGoToActionSuggester/@EntryIndexedValue" value="true" type="bool" /> <option name="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=SwitchToGoToActionSuggester/@EntryIndexedValue" value="true" type="bool" />
<option name="/Default/Housekeeping/LiveTemplatesHousekeeping/HotspotSessionHintIsShown/@EntryValue" value="true" type="bool" /> <option name="/Default/Housekeeping/LiveTemplatesHousekeeping/HotspotSessionHintIsShown/@EntryValue" value="true" type="bool" />
<option name="/Default/Housekeeping/OptionsDialog/SelectedPageId/@EntryValue" value="CppFormatterOtherPage" type="string" /> <option name="/Default/Housekeeping/OptionsDialog/SelectedPageId/@EntryValue" value="CppFormatterOtherPage" type="string" />
@@ -21,54 +21,84 @@
<component name="CMakeRunConfigurationManager"> <component name="CMakeRunConfigurationManager">
<generated> <generated>
<config projectName="exercises" targetName="pojcs101_M02692_12_coins" /> <config projectName="exercises" targetName="pojcs101_M02692_12_coins" />
<config projectName="exercises" targetName="pojcs101_M03532" /> <config projectName="exercises" targetName="pojcs101_T12559_biggest_smallest_combination" />
<config projectName="exercises" targetName="pojcs101_M01321_chest_grid" /> <config projectName="exercises" targetName="pojcs101_T12559_biggest_smallest_combination_WRONG" />
<config projectName="exercises" targetName="pojcs101_E02883" /> <config projectName="exercises" targetName="pojcs101_E02883" />
<config projectName="exercises" targetName="pojcs101_M02694_polish_notation_tree" /> <config projectName="exercises" targetName="pojcs101_M02694_polish_notation_tree" />
<config projectName="exercises" targetName="noip2012s_kings_game" /> <config projectName="exercises" targetName="noip2012s_kings_game" />
<config projectName="exercises" targetName="CMakeCXXCompilerId" />
<config projectName="exercises" targetName="pojcs101_M01017_6_boxes" /> <config projectName="exercises" targetName="pojcs101_M01017_6_boxes" />
<config projectName="exercises" targetName="pojcs101_M01002_memorable_number" /> <config projectName="exercises" targetName="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE" />
<config projectName="exercises" targetName="pojcs101_M02524_ubiquitous_religions_dsu" /> <config projectName="exercises" targetName="dp__backpack_dp__NOIP2006S_jinming_budget_dp_knapsack" />
<config projectName="exercises" targetName="pojcs101_M03247_palindromic_prime" /> <config projectName="exercises" targetName="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_PINGPONG" />
<config projectName="exercises" targetName="pojcs101_E01218" /> <config projectName="exercises" targetName="_others__qyz__gdbh" />
<config projectName="exercises" targetName="exercises" />
<config projectName="exercises" targetName="pojcs101_M03704_brackets" /> <config projectName="exercises" targetName="pojcs101_M03704_brackets" />
<config projectName="exercises" targetName="luogu_ez_B3628" /> <config projectName="exercises" targetName="luogu_ez_B3628" />
<config projectName="exercises" targetName="dp__TJOI2007_walk_segments_dp" />
<config projectName="exercises" targetName="pojcs101_M03441_sum_zero" /> <config projectName="exercises" targetName="pojcs101_M03441_sum_zero" />
<config projectName="exercises" targetName="pojcs101_T01011_sticks_WRONG" />
<config projectName="exercises" targetName="pojcs101_M01328_radar_greedy" /> <config projectName="exercises" targetName="pojcs101_M01328_radar_greedy" />
<config projectName="exercises" targetName="pojcs101_M01852_ants_falling" />
<config projectName="exercises" targetName="pojcs101_M02692_12_coins_WRONG" /> <config projectName="exercises" targetName="pojcs101_M02692_12_coins_WRONG" />
<config projectName="exercises" targetName="pojcs101_M02746_josephus_problem_simulation" /> <config projectName="exercises" targetName="pojcs101_M02746_josephus_problem_simulation" />
<config projectName="exercises" targetName="pojcs101_M02039_snakey_encryption" /> <config projectName="exercises" targetName="pojcs101_M02039_snakey_encryption" />
<config projectName="exercises" targetName="pojcs101_M01088_ski_WRONG" /> <config projectName="exercises" targetName="dp__NOIP1996S_miner_dp_MWASTE" />
<config projectName="exercises" targetName="lc_135_candy" />
<config projectName="exercises" targetName="pojcs101_T01011_sticks" /> <config projectName="exercises" targetName="pojcs101_T01011_sticks" />
<config projectName="exercises" targetName="pojcs101_M02431_cows_gas_leak_WRONG" /> <config projectName="exercises" targetName="pojcs101_M02431_cows_gas_leak_WRONG" />
<config projectName="exercises" targetName="NOIP2003J_bigint" />
<config projectName="exercises" targetName="pojcs101_M01922_ride_follower" /> <config projectName="exercises" targetName="pojcs101_M01922_ride_follower" />
<config projectName="exercises" targetName="luogu_template_dsu_P3367" /> <config projectName="exercises" targetName="luogu_template_dsu_P3367" />
<config projectName="exercises" targetName="pojcs101_M01088_ski" />
<config projectName="exercises" targetName="pojcs101_E01003" /> <config projectName="exercises" targetName="pojcs101_E01003" />
<config projectName="exercises" targetName="pojcs101_M03532" />
<config projectName="exercises" targetName="pojcs101_M01321_chest_grid" />
<config projectName="exercises" targetName="pojcs101_T04117_split_int" />
<config projectName="exercises" targetName="pojcs101_T27373_biggest_combination_t2_TLE" />
<config projectName="exercises" targetName="pojcs101_M01002_memorable_number" />
<config projectName="exercises" targetName="pojcs101_M02524_ubiquitous_religions_dsu" />
<config projectName="exercises" targetName="pojcs101_M03247_palindromic_prime" />
<config projectName="exercises" targetName="SHOI2002_ski" />
<config projectName="exercises" targetName="pojcs101_E01218" />
<config projectName="exercises" targetName="dp__NOIP1996S_miner_dp" />
<config projectName="exercises" targetName="exercises" />
<config projectName="exercises" targetName="dp__SHOI2002_ski_dp" />
<config projectName="exercises" targetName="pojcs101_T01011_sticks_WRONG" />
<config projectName="exercises" targetName="pojcs101_M01852_ants_falling" />
<config projectName="exercises" targetName="SHOI2002_ski_WRONG" />
<config projectName="exercises" targetName="pojcs101_T27104_chicken_monitors" />
<config projectName="exercises" targetName="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE_BETTER" />
<config projectName="exercises" targetName="cmake-build-debug-gcc__CMakeFiles__4.3.1__CompilerIdCXX__CMakeCXXCompilerId" />
<config projectName="exercises" targetName="lc_135_candy" />
<config projectName="exercises" targetName="pojcs101_T27373_biggest_combination_t2" />
<config projectName="exercises" targetName="_others__qyz__test" />
<config projectName="exercises" targetName="pojcs101_M01328_radar_greedy_WRONG" /> <config projectName="exercises" targetName="pojcs101_M01328_radar_greedy_WRONG" />
<config projectName="exercises" targetName="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack" />
</generated> </generated>
</component> </component>
<component name="CMakeSettings" AUTO_RELOAD="true"> <component name="CMakeSettings" AUTO_RELOAD="true">
<configurations /> <configurations />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="4491295e-723c-4e0b-b7b4-9be1cbde5db8" name="更改" comment="CMakeLists.txt"> <list default="true" id="4491295e-723c-4e0b-b7b4-9be1cbde5db8" name="更改" comment="1">
<change afterPath="$PROJECT_DIR$/lc_135_candy.cpp" afterDir="false" /> <change afterPath="$PROJECT_DIR$/NOIP2003J_bigint.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/noi2001_food_chain_dsu.py" afterDir="false" /> <change afterPath="$PROJECT_DIR$/_others/qyz/gdbh.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/noip2012s_kings_game.cpp" afterDir="false" /> <change afterPath="$PROJECT_DIR$/_others/qyz/test.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pojcs101_M03441_sum_zero.cpp" afterDir="false" /> <change afterPath="$PROJECT_DIR$/dp/NOIP1996S_miner_dp.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pojcs101_M03532.cpp" afterDir="false" /> <change afterPath="$PROJECT_DIR$/dp/NOIP1996S_miner_dp_MWASTE.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pojcs101_M03704_brackets.cpp" afterDir="false" /> <change afterPath="$PROJECT_DIR$/dp/SHOI2002_ski_dp.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dp/TJOI2007_walk_segments_dp.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dp/backpack_dp/NOIP2005J_herbs_dp_knapsack.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dp/backpack_dp/NOIP2005J_herbs_dp_knapsack_MWASTE.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dp/backpack_dp/NOIP2005J_herbs_dp_knapsack_MWASTE_BETTER.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dp/backpack_dp/NOIP2005J_herbs_dp_knapsack_PINGPONG.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/dp/backpack_dp/NOIP2006S_jinming_budget_dp_knapsack.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pojcs101_T04117_split_int.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pojcs101_T12559_biggest_smallest_combination.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pojcs101_T12559_biggest_smallest_combination_WRONG.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pojcs101_T27104_chicken_monitors.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pojcs101_T27373_biggest_combination_t2.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/pojcs101_T27373_biggest_combination_t2_TLE.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/editor.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/editor.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/editor.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/editor.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/exercises.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/exercises.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pojcs101_T01011_sticks.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/pojcs101_T01011_sticks.cpp" afterDir="false" /> <change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pojcs101_M01088_ski.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/SHOI2002_ski.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pojcs101_M01088_ski_WRONG.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/SHOI2002_ski_WRONG.cpp" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -100,6 +130,9 @@
</option> </option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="HighlightingSettingsPerFile">
<setting file="mock:///dummy.cpp" root0="SKIP_HIGHLIGHTING" />
</component>
<component name="MacroExpansionManager"> <component name="MacroExpansionManager">
<option name="directoryName" value="7Sv2hfws" /> <option name="directoryName" value="7Sv2hfws" />
</component> </component>
@@ -128,6 +161,7 @@
"C/C++ 文件.luogu_UVA755.cpp.executor": "Run", "C/C++ 文件.luogu_UVA755.cpp.executor": "Run",
"C/C++ 文件.luogu_ez_B3628.cpp.executor": "Run", "C/C++ 文件.luogu_ez_B3628.cpp.executor": "Run",
"C/C++ 文件.luogu_model_dsu_P3367.cpp.executor": "Run", "C/C++ 文件.luogu_model_dsu_P3367.cpp.executor": "Run",
"C/C++ 文件.noip2003j_bigint.cpp.executor": "Run",
"C/C++ 文件.ojcs101_E01003.cpp.executor": "Run", "C/C++ 文件.ojcs101_E01003.cpp.executor": "Run",
"C/C++ 文件.ojcs101_E01218.cpp.executor": "Run", "C/C++ 文件.ojcs101_E01218.cpp.executor": "Run",
"C/C++ 文件.ojcs101_E02883.cpp.executor": "Run", "C/C++ 文件.ojcs101_E02883.cpp.executor": "Run",
@@ -145,13 +179,25 @@
"C/C++ 文件.pojcs101_M02694_polish_notation_tree.cpp.executor": "Run", "C/C++ 文件.pojcs101_M02694_polish_notation_tree.cpp.executor": "Run",
"C/C++ 文件.pojcs101_M03247_palindromic_prime.cpp.executor": "Run", "C/C++ 文件.pojcs101_M03247_palindromic_prime.cpp.executor": "Run",
"C/C++ 文件.pojcs101_M03441_sum_zero.cpp.executor": "Run", "C/C++ 文件.pojcs101_M03441_sum_zero.cpp.executor": "Run",
"CMake 应用程序.NOIP2005J_herbs_dp_backpack.executor": "Run",
"CMake 应用程序.NOIP2005J_herbs_dp_backpack_MWASTE_BETTER.executor": "Run",
"CMake 应用程序.NOIP2006S_jinming_budget_dp_knapsack.executor": "Run",
"CMake 应用程序.SHOI2002_ski_dp.executor": "Run",
"CMake 应用程序.exercises.executor": "Run", "CMake 应用程序.exercises.executor": "Run",
"CMake 应用程序.gdbh.executor": "Run",
"CMake 应用程序.lc_135_candy.executor": "Run", "CMake 应用程序.lc_135_candy.executor": "Run",
"CMake 应用程序.luogu_P2196_miner_dp.executor": "Run",
"CMake 应用程序.noip2003j_bigint.executor": "Run",
"CMake 应用程序.pojcs101_M02694_polish_notation_tree.executor": "Run", "CMake 应用程序.pojcs101_M02694_polish_notation_tree.executor": "Run",
"CMake 应用程序.pojcs101_M03441_sum_zero.executor": "Run", "CMake 应用程序.pojcs101_M03441_sum_zero.executor": "Run",
"CMake 应用程序.pojcs101_M03532.executor": "Run", "CMake 应用程序.pojcs101_M03532.executor": "Run",
"CMake 应用程序.pojcs101_M03704_brackets.executor": "Run", "CMake 应用程序.pojcs101_M03704_brackets.executor": "Run",
"CMake 应用程序.pojcs101_T01011_sticks.executor": "Run", "CMake 应用程序.pojcs101_T01011_sticks.executor": "Run",
"CMake 应用程序.pojcs101_T04117_split_int.executor": "Run",
"CMake 应用程序.pojcs101_T12559_biggest_smallest_combination.executor": "Run",
"CMake 应用程序.pojcs101_T27104_chicken_monitors.executor": "Run",
"CMake 应用程序.pojcs101_T27373_biggest_combination_t2.executor": "Run",
"CMake 应用程序.test.executor": "Run",
"CMake 调试.exercises.executor": "Debug", "CMake 调试.exercises.executor": "Debug",
"CidrDebugProfileConversion": "true", "CidrDebugProfileConversion": "true",
"ModuleVcsDetector.initialDetectionPerformed": "true", "ModuleVcsDetector.initialDetectionPerformed": "true",
@@ -170,20 +216,26 @@
"codeWithMe.voiceChat.enabledByDefault": "false", "codeWithMe.voiceChat.enabledByDefault": "false",
"deletionFromPopupRequiresConfirmation": "false", "deletionFromPopupRequiresConfirmation": "false",
"git-widget-placeholder": "main", "git-widget-placeholder": "main",
"last_opened_file_path": "/Users/roger/coding/exercises", "last_opened_file_path": "/Users/roger/coding/exercises/dp/backpack_dp",
"node.js.detected.package.jshint": "true", "node.js.detected.package.jshint": "true",
"node.js.selected.package.jshint": "", "node.js.selected.package.jshint": "",
"nodejs_package_manager_path": "npm", "nodejs_package_manager_path": "npm",
"org.rust.first.attach.projects": "true", "org.rust.first.attach.projects": "true",
"settings.editor.selected.configurable": "CPPToolchains" "settings.editor.selected.configurable": "editor.preferences.completion.inline"
} }
}]]></component> }]]></component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/dp/backpack_dp" />
<recent name="$PROJECT_DIR$" /> <recent name="$PROJECT_DIR$" />
</key> </key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/dp/backpack_dp" />
<recent name="$PROJECT_DIR$/_others" />
<recent name="$PROJECT_DIR$/dp" />
</key>
</component> </component>
<component name="RunManager" selected="CMake 应用程序.lc_135_candy"> <component name="RunManager" selected="CMake 应用程序.dp__TJOI2007_walk_segments_dp">
<configuration default="true" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true"> <configuration default="true" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true">
<method v="2"> <method v="2">
<option name="CLION.EXTERNAL.BUILD" enabled="true" /> <option name="CLION.EXTERNAL.BUILD" enabled="true" />
@@ -209,7 +261,77 @@
<option name="BeforeTestRunTask" enabled="true" /> <option name="BeforeTestRunTask" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="CMakeCXXCompilerId" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="CMakeCXXCompilerId" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="CMakeCXXCompilerId"> <configuration name="NOIP2003J_bigint" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="NOIP2003J_bigint" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="NOIP2003J_bigint">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="SHOI2002_ski" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="SHOI2002_ski" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="SHOI2002_ski">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="SHOI2002_ski_WRONG" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="SHOI2002_ski_WRONG" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="SHOI2002_ski_WRONG">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="_others__qyz__gdbh" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="_others__qyz__gdbh" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="_others__qyz__gdbh">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="_others__qyz__test" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="_others__qyz__test" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="_others__qyz__test">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="cmake-build-debug-gcc__CMakeFiles__4.3.1__CompilerIdCXX__CMakeCXXCompilerId" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="cmake-build-debug-gcc__CMakeFiles__4.3.1__CompilerIdCXX__CMakeCXXCompilerId" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="cmake-build-debug-gcc__CMakeFiles__4.3.1__CompilerIdCXX__CMakeCXXCompilerId">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="dp__NOIP1996S_miner_dp" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="dp__NOIP1996S_miner_dp" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="dp__NOIP1996S_miner_dp">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="dp__NOIP1996S_miner_dp_MWASTE" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="dp__NOIP1996S_miner_dp_MWASTE" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="dp__NOIP1996S_miner_dp_MWASTE">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="dp__SHOI2002_ski_dp" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="dp__SHOI2002_ski_dp" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="dp__SHOI2002_ski_dp">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="dp__TJOI2007_walk_segments_dp" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="dp__TJOI2007_walk_segments_dp" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="dp__TJOI2007_walk_segments_dp">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE_BETTER" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE_BETTER" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE_BETTER">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_PINGPONG" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_PINGPONG" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_PINGPONG">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="dp__backpack_dp__NOIP2006S_jinming_budget_dp_knapsack" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="dp__backpack_dp__NOIP2006S_jinming_budget_dp_knapsack" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="dp__backpack_dp__NOIP2006S_jinming_budget_dp_knapsack">
<method v="2"> <method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" /> <option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method> </method>
@@ -259,16 +381,6 @@
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" /> <option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="pojcs101_M01088_ski" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_M01088_ski" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01088_ski">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="pojcs101_M01088_ski_WRONG" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_M01088_ski_WRONG" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01088_ski_WRONG">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="pojcs101_M01321_chest_grid" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_M01321_chest_grid" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01321_chest_grid"> <configuration name="pojcs101_M01321_chest_grid" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_M01321_chest_grid" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01321_chest_grid">
<method v="2"> <method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" /> <option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
@@ -359,6 +471,36 @@
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" /> <option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="pojcs101_T04117_split_int" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_T04117_split_int" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_T04117_split_int">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="pojcs101_T12559_biggest_smallest_combination" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_T12559_biggest_smallest_combination" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_T12559_biggest_smallest_combination">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="pojcs101_T12559_biggest_smallest_combination_WRONG" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_T12559_biggest_smallest_combination_WRONG" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_T12559_biggest_smallest_combination_WRONG">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="pojcs101_T27104_chicken_monitors" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_T27104_chicken_monitors" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_T27104_chicken_monitors">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="pojcs101_T27373_biggest_combination_t2" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_T27373_biggest_combination_t2" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_T27373_biggest_combination_t2">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="pojcs101_T27373_biggest_combination_t2_TLE" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_T27373_biggest_combination_t2_TLE" CONFIG_NAME="Debug-GCC" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_T27373_biggest_combination_t2_TLE">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="noi2001_food_chain_dsu" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true"> <configuration name="noi2001_food_chain_dsu" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="exercises" /> <module name="exercises" />
<option name="ENV_FILES" value="" /> <option name="ENV_FILES" value="" />
@@ -410,36 +552,54 @@
<method v="2" /> <method v="2" />
</configuration> </configuration>
<list> <list>
<item itemvalue="CMake 应用程序.CMakeCXXCompilerId" /> <item itemvalue="CMake 应用程序._others__qyz__gdbh" />
<item itemvalue="CMake 应用程序._others__qyz__test" />
<item itemvalue="CMake 应用程序.cmake-build-debug-gcc__CMakeFiles__4.3.1__CompilerIdCXX__CMakeCXXCompilerId" />
<item itemvalue="CMake 应用程序.dp__backpack_dp__NOIP2005J_herbs_dp_knapsack" />
<item itemvalue="CMake 应用程序.dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE" />
<item itemvalue="CMake 应用程序.dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_MWASTE_BETTER" />
<item itemvalue="CMake 应用程序.dp__backpack_dp__NOIP2005J_herbs_dp_knapsack_PINGPONG" />
<item itemvalue="CMake 应用程序.dp__backpack_dp__NOIP2006S_jinming_budget_dp_knapsack" />
<item itemvalue="CMake 应用程序.dp__NOIP1996S_miner_dp" />
<item itemvalue="CMake 应用程序.dp__NOIP1996S_miner_dp_MWASTE" />
<item itemvalue="CMake 应用程序.dp__SHOI2002_ski_dp" />
<item itemvalue="CMake 应用程序.dp__TJOI2007_walk_segments_dp" />
<item itemvalue="CMake 应用程序.lc_135_candy" /> <item itemvalue="CMake 应用程序.lc_135_candy" />
<item itemvalue="CMake 应用程序.luogu_ez_B3628" /> <item itemvalue="CMake 应用程序.luogu_ez_B3628" />
<item itemvalue="CMake 应用程序.luogu_template_dsu_P3367" /> <item itemvalue="CMake 应用程序.luogu_template_dsu_P3367" />
<item itemvalue="CMake 应用程序.NOIP2003J_bigint" />
<item itemvalue="CMake 应用程序.noip2012s_kings_game" /> <item itemvalue="CMake 应用程序.noip2012s_kings_game" />
<item itemvalue="CMake 应用程序.pojcs101_E01003" /> <item itemvalue="CMake 应用程序.pojcs101_E01003" />
<item itemvalue="CMake 应用程序.pojcs101_E01218" /> <item itemvalue="CMake 应用程序.pojcs101_E01218" />
<item itemvalue="CMake 应用程序.pojcs101_E02883" /> <item itemvalue="CMake 应用程序.pojcs101_E02883" />
<item itemvalue="CMake 应用程序.pojcs101_M01002_memorable_number" /> <item itemvalue="CMake 应用程序.pojcs101_M01002_memorable_number" />
<item itemvalue="CMake 应用程序.pojcs101_M01017_6_boxes" /> <item itemvalue="CMake 应用程序.pojcs101_M01017_6_boxes" />
<item itemvalue="CMake 应用程序.pojcs101_M01088_ski" />
<item itemvalue="CMake 应用程序.pojcs101_M01088_ski_WRONG" />
<item itemvalue="CMake 应用程序.pojcs101_M01321_chest_grid" /> <item itemvalue="CMake 应用程序.pojcs101_M01321_chest_grid" />
<item itemvalue="CMake 应用程序.pojcs101_M01328_radar_greedy" />
<item itemvalue="CMake 应用程序.pojcs101_M01328_radar_greedy_WRONG" /> <item itemvalue="CMake 应用程序.pojcs101_M01328_radar_greedy_WRONG" />
<item itemvalue="CMake 应用程序.pojcs101_M01328_radar_greedy" />
<item itemvalue="CMake 应用程序.pojcs101_M01852_ants_falling" /> <item itemvalue="CMake 应用程序.pojcs101_M01852_ants_falling" />
<item itemvalue="CMake 应用程序.pojcs101_M01922_ride_follower" /> <item itemvalue="CMake 应用程序.pojcs101_M01922_ride_follower" />
<item itemvalue="CMake 应用程序.pojcs101_M02039_snakey_encryption" /> <item itemvalue="CMake 应用程序.pojcs101_M02039_snakey_encryption" />
<item itemvalue="CMake 应用程序.pojcs101_M02431_cows_gas_leak_WRONG" /> <item itemvalue="CMake 应用程序.pojcs101_M02431_cows_gas_leak_WRONG" />
<item itemvalue="CMake 应用程序.pojcs101_M02524_ubiquitous_religions_dsu" /> <item itemvalue="CMake 应用程序.pojcs101_M02524_ubiquitous_religions_dsu" />
<item itemvalue="CMake 应用程序.pojcs101_M02692_12_coins" />
<item itemvalue="CMake 应用程序.pojcs101_M02692_12_coins_WRONG" /> <item itemvalue="CMake 应用程序.pojcs101_M02692_12_coins_WRONG" />
<item itemvalue="CMake 应用程序.pojcs101_M02692_12_coins" />
<item itemvalue="CMake 应用程序.pojcs101_M02694_polish_notation_tree" /> <item itemvalue="CMake 应用程序.pojcs101_M02694_polish_notation_tree" />
<item itemvalue="CMake 应用程序.pojcs101_M02746_josephus_problem" /> <item itemvalue="CMake 应用程序.pojcs101_M02746_josephus_problem" />
<item itemvalue="CMake 应用程序.pojcs101_M03247_palindromic_prime" /> <item itemvalue="CMake 应用程序.pojcs101_M03247_palindromic_prime" />
<item itemvalue="CMake 应用程序.pojcs101_M03441_sum_zero" /> <item itemvalue="CMake 应用程序.pojcs101_M03441_sum_zero" />
<item itemvalue="CMake 应用程序.pojcs101_M03532" /> <item itemvalue="CMake 应用程序.pojcs101_M03532" />
<item itemvalue="CMake 应用程序.pojcs101_M03704_brackets" /> <item itemvalue="CMake 应用程序.pojcs101_M03704_brackets" />
<item itemvalue="CMake 应用程序.pojcs101_T01011_sticks" />
<item itemvalue="CMake 应用程序.pojcs101_T01011_sticks_WRONG" /> <item itemvalue="CMake 应用程序.pojcs101_T01011_sticks_WRONG" />
<item itemvalue="CMake 应用程序.pojcs101_T01011_sticks" />
<item itemvalue="CMake 应用程序.pojcs101_T04117_split_int" />
<item itemvalue="CMake 应用程序.pojcs101_T12559_biggest_smallest_combination_WRONG" />
<item itemvalue="CMake 应用程序.pojcs101_T12559_biggest_smallest_combination" />
<item itemvalue="CMake 应用程序.pojcs101_T27104_chicken_monitors" />
<item itemvalue="CMake 应用程序.pojcs101_T27373_biggest_combination_t2" />
<item itemvalue="CMake 应用程序.pojcs101_T27373_biggest_combination_t2_TLE" />
<item itemvalue="CMake 应用程序.SHOI2002_ski" />
<item itemvalue="CMake 应用程序.SHOI2002_ski_WRONG" />
<item itemvalue="Python.noi2001_food_chain_dsu" /> <item itemvalue="Python.noi2001_food_chain_dsu" />
<item itemvalue="Python.pojcs101_M03247_palindromic_prime_init1" /> <item itemvalue="Python.pojcs101_M03247_palindromic_prime_init1" />
</list> </list>
@@ -450,6 +610,32 @@
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
<component name="SelectedDebugProfileService"><![CDATA[{
"profileIdByStamp": [
{
"first": {
"##RUN_CONFIGURATION##": "CMake 应用程序._others__qyzgdbh",
"cmake": "CMakeBuildProfile:Debug-GCC"
},
"second": "2c1c9069-eeff-46e4-9092-db62e2b1ded5"
},
{
"first": {
"##RUN_CONFIGURATION##": "CMake 应用程序.NOIP2003J_bigint",
"cmake": "CMakeBuildProfile:Debug-GCC"
},
"second": "2c1c9069-eeff-46e4-9092-db62e2b1ded5"
},
{
"first": {
"##RUN_CONFIGURATION##": "CMake 应用程序.pojcs101_T27373_biggest_combination_t2",
"cmake": "CMakeBuildProfile:Debug-GCC"
},
"second": "2c1c9069-eeff-46e4-9092-db62e2b1ded5"
}
],
"modificationCount": 49
}]]></component>
<component name="SharedIndexes"> <component name="SharedIndexes">
<attachedChunks> <attachedChunks>
<set> <set>
@@ -482,9 +668,9 @@
<isAutomaticBootstrapAfterUpdate value="false" /> <isAutomaticBootstrapAfterUpdate value="false" />
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="1" />
<MESSAGE value="CMakeLists.txt" /> <MESSAGE value="CMakeLists.txt" />
<option name="LAST_COMMIT_MESSAGE" value="CMakeLists.txt" /> <MESSAGE value="1" />
<option name="LAST_COMMIT_MESSAGE" value="1" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
+19 -5
View File
@@ -1,15 +1,29 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
project(exercises) project(exercises)
# 设置 C++ 标准(例如 C++17
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
# 递归查找当前目录下所有的 .cpp 文件
file(GLOB_RECURSE SOURCES "*.cpp") file(GLOB_RECURSE SOURCES "*.cpp")
# 遍历所有找到的 .cpp 文件,为每个文件单独创建一个可执行目标
foreach (source ${SOURCES}) foreach (source ${SOURCES})
# 获取文件名(不带扩展名)作为可执行文件的名字 # 获取文件所在目录(绝对路径)
get_filename_component(dir ${source} DIRECTORY)
# 计算相对于源码根目录的路径
file(RELATIVE_PATH rel_dir ${CMAKE_CURRENT_SOURCE_DIR} ${dir})
# 获取文件名(不带扩展名)
get_filename_component(name ${source} NAME_WE) get_filename_component(name ${source} NAME_WE)
add_executable(${name} ${source})
# 构造带相对路径的目标名,例如 src_utils_foo
if (rel_dir STREQUAL "")
set(target_name "${name}")
else ()
string(REPLACE "/" "__" rel_dir_flat "${rel_dir}")
set(target_name "${rel_dir_flat}__${name}")
endif ()
add_executable(${target_name} ${source})
# 顺便把可执行文件输出到与源文件对应的目录中(可选)
set_target_properties(${target_name} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${rel_dir}"
)
endforeach () endforeach ()
+104
View File
@@ -0,0 +1,104 @@
#include <cmath>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
/// 只处理 500 位!
class BigInt {
public:
using bigint = vector<unsigned long long>;
static constexpr unsigned int BASE_DIGITS = 8;
const unsigned long long BASE = static_cast<unsigned long long>(std::pow(10, BASE_DIGITS));
static constexpr size_t TARGET_SIZE = 125;
bigint value;
BigInt() : value({0}) { organize(); }
BigInt(bigint v) : value(std::move(v)) { organize(); }
BigInt(unsigned long long v) {
value.push_back(v);
organize();
}
void organize() {
value.resize(TARGET_SIZE, 0);
for (int i = 0; i < TARGET_SIZE - 1; i++) {
value[i + 1] += value[i] / BASE;
value[i] %= BASE;
}
value[TARGET_SIZE - 1] %= BASE;
}
BigInt& operator=(const BigInt& other) {
value = other.value;
organize();
return *this;
}
BigInt operator*(const BigInt& other) const {
BigInt ans(0);
for (int i = 0; i < TARGET_SIZE; i++) {
for (int j = 0; i + j < TARGET_SIZE; j++) {
ans.value[i + j] += value[i] * other.value[j];
}
}
ans.organize();
return ans;
}
BigInt operator*(const unsigned long other) const {
BigInt ans(*this);
ans.value[0] *= other;
ans.organize();
return ans;
}
template <typename T>
BigInt operator*=(const T& other) {
*this = *this * other;
return *this;
}
[[nodiscard]] BigInt pow(unsigned int exp) const {
if (exp == 0) { return {1}; }
if (exp == 1) { return *this; }
BigInt ans = (*this * *this).pow(exp / 2);
if (exp % 2 == 1) {
ans *= *this;
}
return ans;
}
[[nodiscard]] string to_string(size_t digits = 500) const {
string s;
for (int i = 0; i < TARGET_SIZE; i++) {
string current = std::to_string(value[i]);
if (current.size() < BASE_DIGITS) {
current.insert(0, BASE_DIGITS - current.size(), '0');
}
s.insert(0, current);
}
return s.substr(s.size() - digits, s.size());
}
};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
unsigned int exp;
cin >> exp;
cout << floor(exp * log10(2)) + 1 << endl;
BigInt ans = BigInt(2).pow(exp);
ans.value[0] -= 1; // 2^n 没问题
string s = ans.to_string(500);
for (int i = 0; i < 500; i += 50) {
cout << s.substr(i, 50) << endl;
}
return 0;
}
+43
View File
@@ -0,0 +1,43 @@
#include <iostream>
using namespace std;
int primes[2001];
bool is_prime(int a) {
for (int i = 2; i * i <= a; i++) {
if (a % i != 0) {
continue;
} else {
return false;
}
}
return true;
}
void init_primes() {
int current_num = 2, i = 0;
for (;; current_num++) {
if (is_prime(current_num)) {
primes[i] = current_num;
i++;
}
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int a;
cin >> a;
if (a % 2 != 0 || a < 6) {
cout << "Error!" << endl;
} else
for (int i = 0; primes[i] <= a / 2; i++) {
if (is_prime(a - primes[i])) {
cout << a << "=" << i << "+" << a - i << endl;
}
}
return 0;
}
+18
View File
@@ -0,0 +1,18 @@
#include <iostream>
using namespace std;
// x[0]..x[99]
bool is_prime(int n) {
for (int i=2; i*i<=n; i++) {
if (n%i == 0) {return false;}
}
return true;
}
int main() {
cout << is_prime(4);
return 0;
}
+84
View File
@@ -0,0 +1,84 @@
#include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
struct Node {
int mine_amount = -1, prev = -1;
};
constexpr int MAX_N = 25, INF = 0x3f3f3f3f;
int n, mine_amounts[MAX_N];
bool adj[MAX_N][MAX_N];
// int dp[MAX_N][MAX_N];
Node dp_route[MAX_N];
void solve_dp() {
for (int i=0; i<n; i++) {
dp_route[i] = {.mine_amount = mine_amounts[i]};
}
for (int current = 1; current < n; current++) {
for (int prev = 0; prev < current; prev++) {
if (adj[prev][current]) {
int new_ans = dp_route[prev].mine_amount + mine_amounts[current];
if (new_ans > dp_route[current].mine_amount) {
dp_route[current] = {.mine_amount = new_ans, .prev = prev};
}
}
}
}
}
void print_route() {
int max_ans = -1, max_idx = -1;
vector<int> final_route;
for (int i = 0; i < n; i++) {
if (dp_route[i].mine_amount > max_ans) {
max_ans = dp_route[i].mine_amount;
max_idx = i;
}
}
while (max_idx != -1) {
final_route.push_back(max_idx);
max_idx = dp_route[max_idx].prev;
}
reverse(final_route.begin(), final_route.end());
for (const int i : final_route) {
cout << i + 1 << " ";
}
cout << endl << max_ans << endl;
}
void log_dp() {
for (int i = 0; i < n; i++) {
// for (int j = 0; j < n; j++) {
// clog << dp[i][j] << " ";
// }
clog << "->" << dp_route[i].mine_amount << " " << dp_route[i].prev << endl;
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
for (int i = 0; i < n; i++) {
cin >> mine_amounts[i];
}
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
cin >> adj[i][j];
adj[j][i] = adj[i][j];
}
}
solve_dp();
log_dp();
print_route();
return 0;
}
+85
View File
@@ -0,0 +1,85 @@
#include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
struct Node {
int mine_amount = -1, prev = -1;
};
constexpr int MAX_N = 25, INF = 0x3f3f3f3f;
int n, mine_amounts[MAX_N];
bool adj[MAX_N][MAX_N];
int dp[MAX_N][MAX_N];
Node dp_route[MAX_N];
void solve_dp() {
memset(dp, -1, sizeof(dp));
for (int i=0; i<n; i++) {
dp_route[i] = {.mine_amount = mine_amounts[i]};
}
for (int current = 1; current < n; current++) {
for (int prev = 0; prev < current; prev++) {
if (adj[prev][current]) {
dp[current][prev] = dp_route[prev].mine_amount + mine_amounts[current];
if (dp[current][prev] > dp_route[current].mine_amount) {
dp_route[current] = {.mine_amount = dp[current][prev], .prev = prev};
}
}
}
}
}
void print_route() {
int max_ans = -1, max_idx = -1;
vector<int> final_route;
for (int i = 0; i < n; i++) {
if (dp_route[i].mine_amount > max_ans) {
max_ans = dp_route[i].mine_amount;
max_idx = i;
}
}
while (max_idx != -1) {
final_route.push_back(max_idx);
max_idx = dp_route[max_idx].prev;
}
reverse(final_route.begin(), final_route.end());
for (const int i : final_route) {
cout << i + 1 << " ";
}
cout << endl << max_ans << endl;
}
void log_dp() {
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
clog << dp[i][j] << " ";
}
clog << "->" << dp_route[i].mine_amount << " " << dp_route[i].prev << endl;
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
for (int i = 0; i < n; i++) {
cin >> mine_amounts[i];
}
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
cin >> adj[i][j];
adj[j][i] = adj[i][j];
}
}
solve_dp();
log_dp();
print_route();
return 0;
}
+110
View File
@@ -0,0 +1,110 @@
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct Node {
int x, y, height;
};
constexpr int MAX_N = 105;
constexpr short DX[4] = {0, 1, 0, -1}, DY[4] = {1, 0, -1, 0};
int r, c;
int heights[MAX_N][MAX_N];
vector<int> adj_nodes[MAX_N * MAX_N];
vector<Node> nodes;
int dp[MAX_N * MAX_N];
int pack_coord(int x, int y) {
return x * c + y;
}
int pack_coord(Node node) {
return pack_coord(node.x, node.y);
}
bool within_board(int x, int y) {
return 0 <= x && x < r && 0 <= y && y < c;
}
void log_dp() {
for (int i = 0; i < r * c; i++) {
clog << dp[i] << "\t";
if (i % c == c - 1) {
clog << endl;
}
}
}
void log_adj_nodes() {
for (int i = 0; i < r * c; i++) {
clog << i << " -> ";
for (int adj_node : adj_nodes[i]) {
clog << adj_node << " ";
}
clog << endl;
}
}
void init_adj_nodes() {
for (int i = 0; i < r; i++) {
for (int j = 0; j < c; j++) {
nodes.push_back({i, j, heights[i][j]});
int x = i, y = j;
for (int k = 0; k < 4; k++) {
int nx = x + DX[k], ny = y + DY[k];
if (within_board(nx, ny) && heights[nx][ny] > heights[x][y]) {
// 反向建图,小 -> 大
adj_nodes[pack_coord(x, y)].push_back(pack_coord(nx, ny));
}
}
}
}
sort(nodes.begin(), nodes.end(), [](const Node& a, const Node& b) {
return a.height > b.height;
});
}
void solve_dp() {
dp[pack_coord(nodes[0])] = 1;
for (int i = 1; i < nodes.size(); i++) {
Node curr_node = nodes[i];
int max_dp = 0;
for (int adj_node : adj_nodes[pack_coord(curr_node)]) {
max_dp = max(max_dp, dp[adj_node]);
}
dp[pack_coord(curr_node)] = max_dp + 1;
}
}
int get_ans() {
int max_dp = -1;
for (int i = 0; i < r * c; i++) {
max_dp = max(max_dp, dp[i]);
}
return max_dp;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> r >> c;
for (int i = 0; i < r; i++) {
for (int j = 0; j < c; j++) {
cin >> heights[i][j];
}
}
init_adj_nodes();
solve_dp();
log_adj_nodes();
log_dp();
cout << get_ans() << endl;
return 0;
}
@@ -0,0 +1,52 @@
#include <iostream>
using namespace std;
struct Item {
int weight, value;
};
constexpr int MAX_N = 105, MAX_CAPACITY = 1005;
int capacity, n;
Item items[MAX_N];
int dp[MAX_CAPACITY];
bool ping_pong;
void log_dp() {
// for (int i = 0; i <= 1; i++) {
for (int j = 0; j <= capacity; j++) {
clog << dp[j] << "\t";
}
clog << endl;
// }
}
void solve_dp() {
// for (int i = 0; i <= capacity; i++) { dp[0][i] = 0; }
// for (int i = 0; i <= n; i++) { dp[i][0] = 0; }
for (int stop_item = 1; stop_item <= n; stop_item++, ping_pong = !ping_pong) {
for (int w = capacity; w >= 1; w--) {
if (w >= items[stop_item - 1].weight) { // 负数
dp[w] = max(dp[w],
dp[w - items[stop_item - 1].weight] + items[stop_item - 1].value);
}
}
// log_dp();
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> capacity >> n;
for (int i = 0; i < n; i++) {
cin >> items[i].weight >> items[i].value;
}
solve_dp();
cout << dp[capacity] << endl;
return 0;
}
@@ -0,0 +1,48 @@
/*
* 背包 DP:考虑前 i 个物品的最大价值,在仅有 t 容量的情况下。
* 建议两个维度调换一下,方便乒乓/滚动。
*/
#include <iostream>
using namespace std;
struct Item {
int weight, value;
};
constexpr int MAX_N = 105, MAX_CAPACITY = 1005;
int capacity, n;
Item items[MAX_N];
int dp[MAX_CAPACITY][MAX_N];
void solve_dp() {
for (int i = 0; i <= capacity; i++) { dp[i][0] = 0; }
for (int i = 0; i <= n; i++) { dp[0][i] = 0; }
for (int stop_item = 1; stop_item <= n; stop_item++) {
for (int w = 1; w <= capacity; w++) {
dp[w][stop_item] = dp[w][stop_item - 1];
if (w >= items[stop_item - 1].weight) { // 负数
dp[w][stop_item] =
max(dp[w][stop_item],
dp[w - items[stop_item - 1].weight][stop_item - 1] + items[stop_item - 1].value);
}
}
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> capacity >> n;
for (int i = 0; i < n; i++) {
cin >> items[i].weight >> items[i].value;
}
solve_dp();
cout << dp[capacity][n] << endl;
return 0;
}
@@ -0,0 +1,57 @@
/*
* 背包 DP:考虑前 i 个物品的最大价值,在仅有 t 容量的情况下。
*/
#include <iostream>
using namespace std;
struct Item {
int weight, value;
};
constexpr int MAX_N = 105, MAX_CAPACITY = 1005;
int capacity, n;
Item items[MAX_N];
int dp[MAX_N][MAX_CAPACITY];
void log_dp() {
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= capacity; j++) {
clog << dp[i][j] << "\t";
}
clog << endl;
}
}
void solve_dp() {
for (int i = 0; i <= capacity; i++) { dp[0][i] = 0; }
for (int i = 0; i <= n; i++) { dp[i][0] = 0; }
for (int stop_item = 1; stop_item <= n; stop_item++) {
for (int w = 1; w <= capacity; w++) {
dp[stop_item][w] = dp[stop_item - 1][w];
if (w >= items[stop_item - 1].weight) { // 负数
dp[stop_item][w] =
max(dp[stop_item][w],
dp[stop_item - 1][w - items[stop_item - 1].weight] + items[stop_item - 1].value);
}
}
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> capacity >> n;
for (int i = 0; i < n; i++) {
cin >> items[i].weight >> items[i].value;
}
solve_dp();
log_dp();
cout << dp[n][capacity] << endl;
return 0;
}
@@ -0,0 +1,54 @@
#include <iostream>
using namespace std;
struct Item {
int weight, value;
};
constexpr int MAX_N = 105, MAX_CAPACITY = 1005;
int capacity, n;
Item items[MAX_N];
int dp[2][MAX_CAPACITY];
bool ping_pong;
void log_dp() {
// for (int i = 0; i <= 1; i++) {
for (int j = 0; j <= capacity; j++) {
clog << dp[ping_pong][j] << "\t";
}
clog << endl;
// }
}
void solve_dp() {
// for (int i = 0; i <= capacity; i++) { dp[0][i] = 0; }
// for (int i = 0; i <= n; i++) { dp[i][0] = 0; }
for (int stop_item = 1; stop_item <= n; stop_item++, ping_pong = !ping_pong) {
for (int w = 1; w <= capacity; w++) {
dp[ping_pong][w] = dp[!ping_pong][w];
if (w >= items[stop_item - 1].weight) { // 负数
dp[ping_pong][w] =
max(dp[ping_pong][w],
dp[!ping_pong][w - items[stop_item - 1].weight] + items[stop_item - 1].value);
}
}
// log_dp();
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> capacity >> n;
for (int i = 0; i < n; i++) {
cin >> items[i].weight >> items[i].value;
}
solve_dp();
cout << dp[!ping_pong][capacity] << endl;
return 0;
}
@@ -0,0 +1,86 @@
#include <iostream>
#include <vector>
using namespace std;
struct FlatItem {
int weight, value;
FlatItem operator+(const FlatItem& other) const {
return {.weight = weight + other.weight, .value = value + other.value};
}
};
struct OriginalItem {
FlatItem item{};
vector<FlatItem> sons;
};
constexpr int MAX_N = 65, MAX_CAPACITY = 32005;
int capacity, n;
vector<OriginalItem> items;
vector<FlatItem> flat_items;
int fathers_temp[MAX_N];
int dp[MAX_CAPACITY];
vector<FlatItem> generate_flat_items(OriginalItem item) {
switch (item.sons.size()) {
case 0:
return vector{item.item};
case 1:
return vector{
item.item,
item.sons[0] + item.item,
};
case 2:
return vector{
item.item,
item.sons[0] + item.item,
item.sons[1] + item.item,
item.sons[0] + item.sons[1] + item.item,
};
default:
throw logic_error("Invalid item size!");
}
}
void solve_dp() {
for (int i = 0; i < n; i++) {
if (items[i].item.value == -1) { continue; }
for (int w=capacity; w>=1; w--) {
// dp[w] = dp[w] // 不买
for (const auto& [weight, value] : generate_flat_items(items[i])) {
if (w >= weight) {
dp[w] = max(dp[w], dp[w - weight] + value);
}
}
}
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> capacity >> n;
items.resize(n);
for (int i = 0; i < n; i++) {
cin >> items[i].item.weight >> items[i].item.value >> fathers_temp[i];
items[i].item.value *= items[i].item.weight; // 题意
}
for (int i = 0; i < n; i++) {
if (fathers_temp[i] != 0) {
items[fathers_temp[i] - 1].sons.push_back(items[i].item);
items[i].item.value = -1; // 删掉这个元素!
}
}
solve_dp();
cout << dp[capacity] << endl;
return 0;
}
+39
View File
@@ -0,0 +1,39 @@
#include <iostream>
#include <unordered_map>
using namespace std;
constexpr int MAX_N = 100;
int cache[MAX_N * MAX_N];
int get_split_solutions_count(int n, int parts_count) {
if (n <= 0 || parts_count > n) { return 0; }
if (parts_count == 1 || parts_count == n) { return 1; }
if (cache[n * MAX_N + parts_count] != 0) {
return cache[n * MAX_N + parts_count];
}
int ans = 0;
for (int i = 1; i <= n / 2; i++) {
ans += get_split_solutions_count(n - i - (i - 1) * (parts_count - 1), parts_count - 1);
}
cache[n * MAX_N + parts_count] = ans;
return ans;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
while (cin >> n) {
// cout << get_split_solutions_count(n, 2) << endl;
int ans = 0;
for (int i = 1; i <= n; i++) {
ans += get_split_solutions_count(n, i);
// clog << i << ":" << ans << " ";
}
cout << ans << endl;
}
return 0;
}
@@ -0,0 +1,32 @@
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int nums_amount;
cin >> nums_amount;
vector<string> nums(nums_amount);
for (int i = 0; i < nums_amount; i++) {
cin >> nums[i];
}
sort(nums.begin(), nums.end(), [](const string& a, const string& b) {
return a + b < b + a;
});
for (int i = nums_amount - 1; i >= 0; i--) {
cout << nums[i];
}
cout << " ";
for (int i = 0; i < nums_amount; i++) {
cout << nums[i];
}
cout << endl;
return 0;
}
@@ -0,0 +1,66 @@
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
size_t get_digits(unsigned long long number) {
return static_cast<size_t>(log10(number)) + 1;
}
bool is_number_rising(unsigned long long number) {
while (number % 10 == (number / 10) % 10) { number /= 10; }
return (number / 10) % 10 < number % 10;
}
struct PartialNumber {
unsigned long long number = 0;
unsigned long long filled_number = -1;
size_t digits = 0;
void fill() {
digits = get_digits(number);
filled_number = number;
while (filled_number < 10000000000000000) {
filled_number *= 10, filled_number += number % 10;
}
}
bool operator<(PartialNumber& other) {
if (filled_number == -1) { fill(); }
if (other.filled_number == -1) { other.fill(); }
if (filled_number == other.filled_number) {
if (is_number_rising(number)) { return digits < other.digits; }
return digits > other.digits;
}
return filled_number < other.filled_number;
}
bool operator>(PartialNumber& other) {
return other < *this;
}
};
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int nums_amount;
cin >> nums_amount;
vector<PartialNumber> nums(nums_amount);
for (int i = 0; i < nums_amount; i++) {
cin >> nums[i].number;
}
sort(nums.begin(), nums.end());
for (int i = nums_amount - 1; i >= 0; i--) {
cout << nums[i].number;
}
cout << " ";
for (int i = 0; i < nums_amount; i++) {
cout << nums[i].number;
}
cout << endl;
return 0;
}
+62
View File
@@ -0,0 +1,62 @@
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using Range = pair<int, int>;
void log_range_vector(const vector<Range>& ranges, const string& prefix = "") {
clog << prefix;
for (const Range& r : ranges) {
clog << "(" << r.first << "," << r.second << ")" << " ";
}
clog << endl;
}
size_t get_min_ranges_amount(vector<Range> ranges, Range full_range) {
sort(ranges.begin(), ranges.end());
log_range_vector(ranges, "ranges: ");
size_t i = 0, ans = 0;
while (ranges[i].second < full_range.first) { i++; }
int max_start = 0, current_end = ranges[i].second;
while (true) {
while (ranges[i].first <= max_start) {
current_end = max(current_end, ranges[i].second);
if (current_end >= full_range.second) { return ans + 1; }
i++;
if (i >= ranges.size()) { throw invalid_argument("No valid ranges found (inside loop)"); }
}
ans++;
if (current_end >= full_range.second) { return ans; }
max_start = current_end;
}
throw invalid_argument("No valid ranges found (outside loop)");
}
vector<Range> get_ranges(const vector<int>& monitors) {
vector<Range> ranges;
for (int i = 0; i < monitors.size(); i++) {
ranges.emplace_back(i - monitors[i], i + monitors[i] + 1);
}
return ranges;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
size_t monitors_amount;
cin >> monitors_amount;
vector<int> monitors(monitors_amount);
for (int i = 0; i < monitors_amount; i++) {
cin >> monitors[i];
}
vector<Range> ranges = get_ranges(monitors);
Range full_range = {0, monitors_amount};
cout << get_min_ranges_amount(ranges, full_range) << endl;
return 0;
}
@@ -0,0 +1,59 @@
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
constexpr size_t MAX_M = 201, MAX_N = 1001;
vector<string> nums;
vector<bool> used;
map<size_t, int, greater<>> num_sizes;
string dp[MAX_M][MAX_N];
template <typename T>
void log_vector(const vector<T>& vec, const string& prefix = "") {
clog << prefix << endl;
for (const T& item : vec) {
clog << item << " ";
}
clog << endl;
}
void output_from_used() {
for (int i = 0; i < nums.size(); i++) {
if (used[i]) { cout << nums[i]; }
}
cout << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int nums_amount, target_size;
cin >> target_size >> nums_amount;
nums.resize(nums_amount), used.resize(nums_amount);
for (int i = 0; i < nums_amount; i++) {
cin >> nums[i];
}
sort(nums.begin(), nums.end(), [](const string& a, const string& b) {
return a + b > b + a;
});
for (const string& num : nums) {
num_sizes[num.size()]++;
}
log_vector(nums, "nums: ");
// while (!can_form_combination(target_size, target_size)) {
// target_size--;
// }
clog << "target_size: " << target_size << endl;
calc_used(target_size, target_size);
log_vector(used, "used: ");
output_from_used();
return 0;
}
@@ -0,0 +1,88 @@
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <algorithm>
using namespace std;
vector<string> nums;
vector<bool> used;
map<size_t, int, greater<>> num_sizes;
template <typename T>
void log_vector(const vector<T>& vec, const string& prefix = "") {
clog << prefix << endl;
for (const T& item : vec) {
clog << item << " ";
}
clog << endl;
}
bool can_form_combination(const size_t target_size,
const size_t remaining_size
) {
if (remaining_size == 0) { return true; }
for (auto& [size, count] : num_sizes) {
if (size > remaining_size) { break; }
if (count > 0) {
count--;
if (can_form_combination(target_size, remaining_size - size)) {
return true;
}
count++;
}
}
return false;
}
bool calc_used(const size_t target_size, const size_t remaining_size, const size_t start_idx = 0) {
if (remaining_size == 0) { return true; }
for (size_t i = start_idx; i < nums.size(); i++) {
if (nums[i].size() > remaining_size) { continue; }
used[i] = true;
if (calc_used(target_size, remaining_size - nums[i].size(), i + 1)) {
return true;
}
used[i] = false;
if (calc_used(target_size, remaining_size, i + 1)) {
return true;
}
}
return false;
}
void output_from_used() {
for (int i = 0; i < nums.size(); i++) {
if (used[i]) { cout << nums[i]; }
}
cout << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int nums_amount, target_size;
cin >> target_size >> nums_amount;
nums.resize(nums_amount), used.resize(nums_amount);
for (int i = 0; i < nums_amount; i++) {
cin >> nums[i];
}
sort(nums.begin(), nums.end(), [](const string& a, const string& b) {
return a + b > b + a;
});
for (const string& num : nums) {
num_sizes[num.size()]++;
}
log_vector(nums, "nums: ");
// while (!can_form_combination(target_size, target_size)) {
// target_size--;
// }
clog << "target_size: " << target_size << endl;
calc_used(target_size, target_size);
log_vector(used, "used: ");
output_from_used();
return 0;
}