Compare commits
3
Commits
2b6dc69bde
...
32d7529967
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32d7529967 | ||
|
|
f853068f9b | ||
|
|
8bc1b22a1c |
+8
-1
@@ -1,2 +1,9 @@
|
||||
.venv
|
||||
*.exe
|
||||
cmake-build-debug
|
||||
/*.exe
|
||||
/*.dSYM
|
||||
|
||||
# 忽略 linux 编译产物
|
||||
/*
|
||||
!/*.*
|
||||
!*/
|
||||
Generated
+1
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
|
||||
<option name="chatAppRouterInfo" value="chat-session" />
|
||||
<option name="progress" value="1.0" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+5
@@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="默认_mod" />
|
||||
</state>
|
||||
</component>
|
||||
Generated
+5
-87
@@ -206,7 +206,7 @@
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
@@ -250,101 +250,19 @@
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALLOW_COMMENT_AFTER_LBRACE/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/EMPTY_BLOCK_STYLE/@EntryValue" value="TOGETHER_SAME_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/EXPORT_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/REQUIRES_EXPRESSION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+2
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module classpath="CIDR" type="CPP_MODULE" version="4" />
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="CppTemplateArgumentsCanBeDeduced" enabled="false" level="HINT" enabled_by_default="false" />
|
||||
<inspection_tool class="CppUseInternalLinkage" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
||||
Generated
+271
-56
@@ -4,19 +4,62 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="BackendCodeEditorMiscSettings">
|
||||
<option name="/Default/Environment/Hierarchy/GeneratedFilesCacheKey/Timestamp/@EntryValue" value="8" type="long" />
|
||||
<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/OptionsDialog/SelectedPageId/@EntryValue" value="CppFormatterOtherPage" type="string" />
|
||||
</component>
|
||||
<component name="CMakePresetLoader">{
|
||||
"useNewFormat": true
|
||||
}</component>
|
||||
<component name="CMakeProjectFlavorService">
|
||||
<option name="flavorId" value="CMakePlainProjectFlavor" />
|
||||
</component>
|
||||
<component name="CMakeReloadState">
|
||||
<option name="reloaded" value="true" />
|
||||
</component>
|
||||
<component name="CMakeRunConfigurationManager">
|
||||
<generated>
|
||||
<config projectName="exercises" targetName="pojcs101_M02692_12_coins" />
|
||||
<config projectName="exercises" targetName="luogu_ez_B3628" />
|
||||
<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_M01321_chest_grid" />
|
||||
<config projectName="exercises" targetName="pojcs101_M02039_snakey_encryption" />
|
||||
<config projectName="exercises" targetName="pojcs101_E02883" />
|
||||
<config projectName="exercises" targetName="pojcs101_M02694_polish_notation_tree" />
|
||||
<config projectName="exercises" targetName="CMakeCXXCompilerId" />
|
||||
<config projectName="exercises" targetName="pojcs101_M01017_6_boxes" />
|
||||
<config projectName="exercises" targetName="apple-sdk" />
|
||||
<config projectName="exercises" targetName="pojcs101_M01088_ski_WRONG" />
|
||||
<config projectName="exercises" targetName="pojcs101_M02431_cows_gas_leak_WRONG" />
|
||||
<config projectName="exercises" targetName="pojcs101_M01922_ride_follower" />
|
||||
<config projectName="exercises" targetName="luogu_template_dsu_P3367" />
|
||||
<config projectName="exercises" targetName="pojcs101_M01002_memorable_number" />
|
||||
<config projectName="exercises" targetName="pojcs101_M01088_ski" />
|
||||
<config projectName="exercises" targetName="pojcs101_M02524_ubiquitous_religions_dsu" />
|
||||
<config projectName="exercises" targetName="pojcs101_E01003" />
|
||||
<config projectName="exercises" targetName="pojcs101_M01328_radar_greedy_WRONG" />
|
||||
<config projectName="exercises" targetName="pojcs101_E01218" />
|
||||
<config projectName="exercises" targetName="exercises" />
|
||||
</generated>
|
||||
</component>
|
||||
<component name="CMakeSettings">
|
||||
<configurations>
|
||||
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" />
|
||||
</configurations>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="4491295e-723c-4e0b-b7b4-9be1cbde5db8" name="更改" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/lc_127.py" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/pojcs101_M01017_6_boxes.cpp" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/pojcs101_M02692_12_coins.cpp" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/pojcs101_M02692_12_coins_WRONG.cpp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/exercises.iml" beforeDir="false" />
|
||||
<list default="true" id="4491295e-723c-4e0b-b7b4-9be1cbde5db8" name="更改" comment="1">
|
||||
<change afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/luogu_template_dsu_P3367.cpp" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/pojcs101_M02694_polish_notation_tree.cpp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/MarsCodeWorkspaceAppSettings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/MarsCodeWorkspaceAppSettings.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/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pojcs101_M01002.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/pojcs101_M01002_memorable_number.cpp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pojcs101_M02524_ubiquitous_religions_dsu.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/pojcs101_M02524_ubiquitous_religions_dsu.cpp" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -25,24 +68,38 @@
|
||||
</component>
|
||||
<component name="ClangdSettings">
|
||||
<option name="formatViaClangd" value="false" />
|
||||
<option name="clangWarnings" value="-Wno-unused-variable,-Wno-infinite-recursion,-Wno-array-bounds,-Wno-return-stack-address,-Werror=implicit-function-declaration,-Wshadow,-Wno-shadow-field-in-constructor-modified,-Wno-shadow-ivar,-Wuninitialized,-Wunused-label,-Wunused-lambda-capture,-std=c++17" />
|
||||
</component>
|
||||
<component name="CurrentDebugProfile">
|
||||
<option name="debugProfileId" value="e77b0a9f-756a-4aba-8623-5e4caeda05ed" />
|
||||
<option name="debugProfileId" value="2c1c9069-eeff-46e4-9092-db62e2b1ded5" />
|
||||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="C++ Single file program" />
|
||||
<option value="C++ Single file for OJ" />
|
||||
<option value="CMakeLists.txt" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
||||
<map>
|
||||
<entry key="$PROJECT_DIR$" value="main" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="MacroExpansionManager">
|
||||
<option name="directoryName" value="7Sv2hfws" />
|
||||
</component>
|
||||
<component name="ProjectApplicationVersion">
|
||||
<option name="ide" value="CLion" />
|
||||
<option name="majorVersion" value="2026" />
|
||||
<option name="minorVersion" value="2.0.1" />
|
||||
<option name="productBranch" value="Classic" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"customColor": "",
|
||||
"associatedIndex": 6
|
||||
@@ -52,73 +109,214 @@
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"C/C++ 文件.D_pojcs101_M02692.cpp.executor": "Run",
|
||||
"C/C++ 文件.luogu_UVA755.cpp.executor": "Run",
|
||||
"C/C++ 文件.luogu_ez_B3628.cpp.executor": "Run",
|
||||
"C/C++ 文件.ojcs101_E01003.cpp.executor": "Run",
|
||||
"C/C++ 文件.ojcs101_E01218.cpp.executor": "Run",
|
||||
"C/C++ 文件.ojcs101_E02883.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M01017_6_boxes.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M02692.cpp.executor": "Run",
|
||||
"CidrDebugProfileConversion": "true",
|
||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||
"Python.lc_127.executor": "Run",
|
||||
"RunOnceActivity.RadMigrateCodeStyle": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"RunOnceActivity.readMode.enableVisualFormatting": "true",
|
||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||
"cf.first.check.clang-format": "false",
|
||||
"cidr.known.project.marker": "true",
|
||||
"codeWithMe.voiceChat.enabledByDefault": "false",
|
||||
"git-widget-placeholder": "main",
|
||||
"last_opened_file_path": "E:/Projects/exercises",
|
||||
"node.js.detected.package.jshint": "true",
|
||||
"node.js.selected.package.jshint": "",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"org.rust.first.attach.projects": "true",
|
||||
"settings.editor.selected.configurable": "preferences.sourceCode.C++"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"C/C++ 文件.D_pojcs101_M02692.cpp.executor": "Run",
|
||||
"C/C++ 文件.luogu_UVA755.cpp.executor": "Run",
|
||||
"C/C++ 文件.luogu_ez_B3628.cpp.executor": "Run",
|
||||
"C/C++ 文件.luogu_model_dsu_P3367.cpp.executor": "Run",
|
||||
"C/C++ 文件.ojcs101_E01003.cpp.executor": "Run",
|
||||
"C/C++ 文件.ojcs101_E01218.cpp.executor": "Run",
|
||||
"C/C++ 文件.ojcs101_E02883.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M01017_6_boxes.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M01088_ski.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M01321_chest_grid.cpp.executor": "Debug",
|
||||
"C/C++ 文件.pojcs101_M01328_radar_greedy.cpp.executor": "Debug",
|
||||
"C/C++ 文件.pojcs101_M01852_ants_falling.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M01922_ride_follower.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M02039_snakey_encryption.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M02431_cows_gas_leak.cpp.executor": "Debug",
|
||||
"C/C++ 文件.pojcs101_M02524_ubiquitous_religions_dsu.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M02692.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M02692_12_coins.cpp.executor": "Run",
|
||||
"C/C++ 文件.pojcs101_M02694_polish_notation_tree.cpp.executor": "Run",
|
||||
"CMake 应用程序.exercises.executor": "Run",
|
||||
"CMake 应用程序.pojcs101_M02694_polish_notation_tree.executor": "Debug",
|
||||
"CidrDebugProfileConversion": "true",
|
||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||
"Python.lc_127.executor": "Run",
|
||||
"RunOnceActivity.RadMigrateCodeStyle": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"RunOnceActivity.readMode.enableVisualFormatting": "true",
|
||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||
"RunOnceActivity.west.config.association.type.startup.service": "true",
|
||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"cf.first.check.clang-format": "false",
|
||||
"cidr.known.project.marker": "true",
|
||||
"codeWithMe.voiceChat.enabledByDefault": "false",
|
||||
"deletionFromPopupRequiresConfirmation": "false",
|
||||
"git-widget-placeholder": "main",
|
||||
"last_opened_file_path": "/Users/roger/coding/exercises",
|
||||
"node.js.detected.package.jshint": "true",
|
||||
"node.js.selected.package.jshint": "",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"org.rust.first.attach.projects": "true",
|
||||
"settings.editor.selected.configurable": "CPPToolchains"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="RunManager" selected="C/C++ 文件.pojcs101_M01017_6_boxes.cpp">
|
||||
<configuration name="D_pojcs101_M02692.cpp" type="CppFileRunConfiguration" factoryName="CppFileRunConfiguration" temporary="true" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="D_pojcs101_M02692.cpp" CONFIG_NAME="D_pojcs101_M02692.cpp">
|
||||
<option name="sourceFile" value="D_pojcs101_M02692.cpp" />
|
||||
}</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager" selected="CMake 应用程序.pojcs101_M02694_polish_notation_tree">
|
||||
<configuration default="true" type="CMakeBoostTestRunConfigurationType" factoryName="Boost Test" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" TEST_MODE="SUITE_TEST">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.cpp.runfile.CppFileBuildBeforeRunTaskProvider$BasicBuildBeforeRunTask" enabled="true" />
|
||||
<option name="BeforeTestRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="luogu_UVA755.cpp" type="CppFileRunConfiguration" factoryName="CppFileRunConfiguration" temporary="true" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="luogu_UVA755.cpp" CONFIG_NAME="luogu_UVA755.cpp">
|
||||
<option name="sourceFile" value="luogu_UVA755.cpp" />
|
||||
<configuration default="true" type="CMakeCatchTestRunConfigurationType" factoryName="Catch Test" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" TEST_MODE="SUITE_TEST">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.cpp.runfile.CppFileBuildBeforeRunTaskProvider$BasicBuildBeforeRunTask" enabled="true" />
|
||||
<option name="BeforeTestRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="ojcs101_E01218.cpp" type="CppFileRunConfiguration" factoryName="CppFileRunConfiguration" temporary="true" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="ojcs101_E01218.cpp" CONFIG_NAME="ojcs101_E01218.cpp">
|
||||
<option name="sourceFile" value="ojcs101_E01218.cpp" />
|
||||
<configuration default="true" type="CMakeDoctestTestRunConfigurationType" factoryName="doctest Test" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" TEST_MODE="SUITE_TEST">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.cpp.runfile.CppFileBuildBeforeRunTaskProvider$BasicBuildBeforeRunTask" enabled="true" />
|
||||
<option name="BeforeTestRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="ojcs101_E02883.cpp" type="CppFileRunConfiguration" factoryName="CppFileRunConfiguration" temporary="true" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="ojcs101_E02883.cpp" CONFIG_NAME="ojcs101_E02883.cpp">
|
||||
<option name="sourceFile" value="ojcs101_E02883.cpp" />
|
||||
<configuration default="true" type="CMakeGoogleTestRunConfigurationType" factoryName="Google Test" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" TEST_MODE="SUITE_TEST">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.cpp.runfile.CppFileBuildBeforeRunTaskProvider$BasicBuildBeforeRunTask" enabled="true" />
|
||||
<option name="BeforeTestRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M01017_6_boxes.cpp" type="CppFileRunConfiguration" factoryName="CppFileRunConfiguration" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_M01017_6_boxes.cpp" CONFIG_NAME="pojcs101_M01017_6_boxes.cpp">
|
||||
<option name="sourceFile" value="pojcs101_M01017_6_boxes.cpp" />
|
||||
<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" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="CMakeCXXCompilerId">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.cpp.runfile.CppFileBuildBeforeRunTaskProvider$BasicBuildBeforeRunTask" enabled="true" />
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M02692.cpp" type="CppFileRunConfiguration" factoryName="CppFileRunConfiguration" temporary="true" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="exercises" TARGET_NAME="pojcs101_M02692.cpp" CONFIG_NAME="pojcs101_M02692.cpp">
|
||||
<option name="sourceFile" value="pojcs101_M02692.cpp" />
|
||||
<configuration name="apple-sdk" 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="apple-sdk" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="apple-sdk">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.cpp.runfile.CppFileBuildBeforeRunTaskProvider$BasicBuildBeforeRunTask" enabled="true" />
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="luogu_ez_B3628" 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="luogu_ez_B3628" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="luogu_ez_B3628">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="luogu_template_dsu_P3367" 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="luogu_template_dsu_P3367" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="luogu_template_dsu_P3367">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_E01003" 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_E01003" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_E01003">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_E01218" 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_E01218" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_E01218">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_E02883" 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_E02883" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_E02883">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M01002_memorable_number" 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_M01002_memorable_number" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01002_memorable_number">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M01017_6_boxes" 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_M01017_6_boxes" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01017_6_boxes">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</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" 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" 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" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01321_chest_grid">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M01328_radar_greedy" 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_M01328_radar_greedy" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01328_radar_greedy">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M01328_radar_greedy_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_M01328_radar_greedy_WRONG" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01328_radar_greedy_WRONG">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M01852_ants_falling" 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_M01852_ants_falling" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01852_ants_falling">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M01922_ride_follower" 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_M01922_ride_follower" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M01922_ride_follower">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M02039_snakey_encryption" 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_M02039_snakey_encryption" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M02039_snakey_encryption">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M02431_cows_gas_leak_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_M02431_cows_gas_leak_WRONG" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M02431_cows_gas_leak_WRONG">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M02524_ubiquitous_religions_dsu" 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_M02524_ubiquitous_religions_dsu" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M02524_ubiquitous_religions_dsu">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M02692_12_coins" 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_M02692_12_coins" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M02692_12_coins">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M02692_12_coins_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_M02692_12_coins_WRONG" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M02692_12_coins_WRONG">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="pojcs101_M02694_polish_notation_tree" 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_M02694_polish_notation_tree" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="exercises" RUN_TARGET_NAME="pojcs101_M02694_polish_notation_tree">
|
||||
<method v="2">
|
||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<list>
|
||||
<item itemvalue="CMake 应用程序.apple-sdk" />
|
||||
<item itemvalue="CMake 应用程序.CMakeCXXCompilerId" />
|
||||
<item itemvalue="CMake 应用程序.luogu_ez_B3628" />
|
||||
<item itemvalue="CMake 应用程序.luogu_template_dsu_P3367" />
|
||||
<item itemvalue="CMake 应用程序.pojcs101_E01003" />
|
||||
<item itemvalue="CMake 应用程序.pojcs101_E01218" />
|
||||
<item itemvalue="CMake 应用程序.pojcs101_E02883" />
|
||||
<item itemvalue="CMake 应用程序.pojcs101_M01002_memorable_number" />
|
||||
<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_M01328_radar_greedy" />
|
||||
<item itemvalue="CMake 应用程序.pojcs101_M01328_radar_greedy_WRONG" />
|
||||
<item itemvalue="CMake 应用程序.pojcs101_M01852_ants_falling" />
|
||||
<item itemvalue="CMake 应用程序.pojcs101_M01922_ride_follower" />
|
||||
<item itemvalue="CMake 应用程序.pojcs101_M02039_snakey_encryption" />
|
||||
<item itemvalue="CMake 应用程序.pojcs101_M02431_cows_gas_leak_WRONG" />
|
||||
<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_M02694_polish_notation_tree" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
@@ -142,10 +340,27 @@
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="VCPKGProject">
|
||||
<isAutomaticCheckingOnLaunch value="false" />
|
||||
<isAutomaticFoundErrors value="true" />
|
||||
<isAutomaticReloadCMake value="true" />
|
||||
<isAutomaticBootstrapAfterUpdate value="false" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="1" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="1" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<breakpoints>
|
||||
<line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
|
||||
<url>file://$PROJECT_DIR$/pojcs101_M01321_chest_grid.cpp</url>
|
||||
<line>44</line>
|
||||
<option name="timeStamp" value="2" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
</component>
|
||||
<component name="XSLT-Support.FileAssociations.UIState">
|
||||
<expand />
|
||||
<select />
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(exercises)
|
||||
|
||||
# 设置 C++ 标准(例如 C++17)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# 递归查找当前目录下所有的 .cpp 文件
|
||||
file(GLOB_RECURSE SOURCES "*.cpp")
|
||||
|
||||
# 遍历所有找到的 .cpp 文件,为每个文件单独创建一个可执行目标
|
||||
foreach(source ${SOURCES})
|
||||
# 获取文件名(不带扩展名)作为可执行文件的名字
|
||||
get_filename_component(name ${source} NAME_WE)
|
||||
add_executable(${name} ${source})
|
||||
endforeach()
|
||||
@@ -0,0 +1,48 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Dsu {
|
||||
public:
|
||||
struct Node {
|
||||
size_t parent, size;
|
||||
};
|
||||
|
||||
vector<Node> nodes;
|
||||
|
||||
explicit Dsu(const size_t size) : nodes(size) {
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
nodes[i] = {.parent = i, .size = 0};
|
||||
}
|
||||
}
|
||||
|
||||
size_t find(const size_t x) {
|
||||
if (nodes[x].parent == x) { return x; }
|
||||
return nodes[x].parent = find(nodes[x].parent);
|
||||
}
|
||||
|
||||
void unite(size_t x, size_t y) {
|
||||
if ((x = find(x)) == (y = find(y))) { return; }
|
||||
if (nodes[x].size > nodes[y].size) { swap(x, y); }
|
||||
nodes[x].parent = y;
|
||||
nodes[y].size += nodes[x].size;
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
int elements_count, operations_count;
|
||||
cin >> elements_count >> operations_count;
|
||||
Dsu dsu(elements_count);
|
||||
for (int _ = 0; _ < operations_count; _++) {
|
||||
int op, x, y;
|
||||
cin >> op >> x >> y;
|
||||
if (op == 1) { dsu.unite(x, y); }
|
||||
if (op == 2) { cout << (dsu.find(x) == dsu.find(y) ? 'Y' : 'N') << endl; }
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -40,7 +40,6 @@ void runDataset() {
|
||||
if (noDuplicate) {
|
||||
std::cout << "No duplicates." << std::endl;
|
||||
}
|
||||
// std::cout << std::endl;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
constexpr int DX[] = {0, 1, 0, -1};
|
||||
constexpr int DY[] = {1, 0, -1, 0};
|
||||
|
||||
int path_length = 0;
|
||||
|
||||
void log_grid(const vector<vector<int>>& grid, string name) {
|
||||
for (const auto& row : grid) {
|
||||
clog << name << ": ";
|
||||
for (const auto& cell : row) {
|
||||
clog << cell << " ";
|
||||
}
|
||||
clog << endl;
|
||||
}
|
||||
}
|
||||
|
||||
int dfs(const vector<vector<int>>& grid, const int x, const int y,
|
||||
vector<vector<int>>& calculated_depths, const int _depth = 1) {
|
||||
const unsigned int r = grid.size(), c = grid[0].size();
|
||||
|
||||
const int current_num = grid[x][y];
|
||||
if (calculated_depths[x][y] > 0) { return calculated_depths[x][y] + _depth - 1; }
|
||||
|
||||
if (_depth + current_num <= path_length) {
|
||||
// clog << "CUT " << x << "," << y << ":" << current_num << ", " << _depth << endl;
|
||||
return -1;
|
||||
} // 剪枝
|
||||
// if (current_num == 1) { return _depth; }
|
||||
// clog << x << "," << y << ":" << current_num << ", " << _depth << endl;
|
||||
|
||||
int best_depth = _depth;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
const int nx = x + DX[i], ny = y + DY[i];
|
||||
if (nx >= 0 && nx < r && ny >= 0 && ny < c && grid[nx][ny] < current_num) {
|
||||
int next_depth = dfs(grid, nx, ny, calculated_depths, _depth + 1);
|
||||
best_depth = max(best_depth, next_depth);
|
||||
}
|
||||
}
|
||||
path_length = max(path_length, best_depth);
|
||||
calculated_depths[x][y] = best_depth - _depth + 1;
|
||||
return best_depth;
|
||||
}
|
||||
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
int r, c;
|
||||
cin >> r >> c;
|
||||
|
||||
vector<vector<int>> grid(r, vector<int>(c));
|
||||
vector<vector<int>> calculated_depths(r, vector<int>(c, 0));
|
||||
|
||||
for (int i = 0; i < r; i++) {
|
||||
for (int j = 0; j < c; j++) {
|
||||
cin >> grid[i][j];
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < r; i++) {
|
||||
for (int j = 0; j < c; j++) {
|
||||
dfs(grid, i, j, calculated_depths);
|
||||
// clog << "---" << endl;
|
||||
// log_grid(calculated_depths, "calculated_depths");
|
||||
// clog << "---" << endl;
|
||||
}
|
||||
}
|
||||
cout << path_length << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
constexpr int DX[] = {0, 1, 0, -1};
|
||||
constexpr int DY[] = {1, 0, -1, 0};
|
||||
|
||||
int longest_path(const vector<vector<int> > &grid, int x = -1, int y = -1, int depth = 0) {
|
||||
const unsigned int r = grid.size(), c = grid[0].size();
|
||||
if (x == -1 && y == -1) {
|
||||
for (int i = 0; i < r; i++) {
|
||||
for (int j = 0; j < c; j++) {
|
||||
if (grid[i][j] == r * c) {
|
||||
x = i, y = j, depth = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
int nx = x + DX[i], ny = y + DY[i];
|
||||
if (nx >= 0 && nx < grid.size() && ny >= 0 && ny < grid[0].size()
|
||||
&& grid[nx][ny] == grid[x][y] - 1) {
|
||||
return longest_path(grid, nx, ny, depth + 1);
|
||||
}
|
||||
}
|
||||
return depth;
|
||||
}
|
||||
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
int r, c;
|
||||
cin >> r >> c;
|
||||
|
||||
vector<vector<int> > grid(r, vector<int>(c));
|
||||
for (int i = 0; i < r; i++) {
|
||||
for (int j = 0; j < c; j++) {
|
||||
cin >> grid[i][j];
|
||||
}
|
||||
}
|
||||
cout << longest_path(grid) << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void log_array(const vector<bool>& arr, const string& name) {
|
||||
clog << name << ": ";
|
||||
for (const auto& cell : arr) {
|
||||
clog << cell << " ";
|
||||
}
|
||||
clog << endl;
|
||||
}
|
||||
|
||||
vector<vector<bool>> get_grid(const int size) {
|
||||
vector<vector<bool>> grid;
|
||||
for (int _ = 0; _ < size; _++) {
|
||||
string pattern;
|
||||
vector<bool> row;
|
||||
cin >> pattern;
|
||||
for (const char c : pattern) { row.push_back(c != '.'); }
|
||||
grid.push_back(row);
|
||||
}
|
||||
return grid;
|
||||
}
|
||||
|
||||
long long dfs(const vector<vector<bool>>& grid,
|
||||
const int remaining_chests,
|
||||
const int curr_empty_row,
|
||||
vector<bool>& col_occupation) {
|
||||
const unsigned int size = grid[0].size();
|
||||
if (remaining_chests == 0) { return 1; }
|
||||
if (curr_empty_row >= size) { return 0; }
|
||||
// clog << "curr_empty_row: " << curr_empty_row << endl;
|
||||
// log_array(col_occupation, "col_occupation");
|
||||
long long ans = 0;
|
||||
for (int col = 0; col < size; col++) { // 这行放
|
||||
if (!grid[curr_empty_row][col]) { continue; }
|
||||
if (col_occupation[col]) { continue; }
|
||||
// vector<bool> new_col_occupation(col_occupation);
|
||||
col_occupation[col] = true;
|
||||
ans += dfs(grid, remaining_chests - 1, curr_empty_row + 1, col_occupation);
|
||||
col_occupation[col] = false;
|
||||
}
|
||||
ans += dfs(grid, remaining_chests, curr_empty_row + 1, col_occupation); // 不在这行放
|
||||
return ans;
|
||||
}
|
||||
|
||||
long long dfs(const vector<vector<bool>>& grid,
|
||||
const int remaining_chests,
|
||||
const int curr_empty_row = 0) {
|
||||
vector<bool> col_occupation(grid[0].size(), false);
|
||||
return dfs(grid, remaining_chests, curr_empty_row, col_occupation);
|
||||
}
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
int size, chest_count;
|
||||
while (cin >> size >> chest_count) {
|
||||
if (size < 0) { break; }
|
||||
vector<vector<bool>> grid = get_grid(size);
|
||||
cout << dfs(grid, chest_count) << endl;
|
||||
}
|
||||
// cin >> size;
|
||||
// chest_count = size;
|
||||
// const vector<vector<bool>> grid = get_grid(size);
|
||||
// cout << dfs(grid, chest_count) << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
|
||||
double other_leg(const double leg, const double diag) {
|
||||
return sqrt(diag * diag - leg * leg);
|
||||
}
|
||||
|
||||
double diag(const double leg1, const double leg2) {
|
||||
return sqrt(leg1 * leg1 + leg2 * leg2);
|
||||
}
|
||||
|
||||
vector<pair<double, double>> target_ranges(vector<pair<int, int>> islands, const int distance) {
|
||||
vector<pair<double, double>> ranges;
|
||||
for (auto& [island_x, island_y] : islands) {
|
||||
if (island_y > distance) { throw std::runtime_error("Island is too far away from the radar."); }
|
||||
const double offset = other_leg(island_y, distance);
|
||||
ranges.emplace_back(island_x - offset, island_x + offset);
|
||||
}
|
||||
sort(ranges.begin(), ranges.end(),
|
||||
[](const auto& a, const auto& b) { return a.second < b.second; });
|
||||
return ranges;
|
||||
}
|
||||
|
||||
int required_radars(const vector<pair<double, double>>& ranges) {
|
||||
if (ranges.empty()) { return 0; }
|
||||
int answer = 1;
|
||||
double current_max_x = ranges[0].second;
|
||||
for (const auto& [left,right] : ranges) {
|
||||
if (left > current_max_x) { answer++, current_max_x = right; } // 放不下,加雷达
|
||||
else if (right < current_max_x) { current_max_x = right; } // 放下,需要左移雷达
|
||||
clog << "current_max_x: " << current_max_x << " answer: " << answer << endl;
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
int n, distance, case_id = 0;
|
||||
while (cin >> n >> distance) {
|
||||
if (n == 0 && distance == 0) { break; }
|
||||
vector<pair<int, int>> islands(n);
|
||||
for (int i = 0; i < n; i++) {
|
||||
cin >> islands[i].first >> islands[i].second;
|
||||
}
|
||||
// cout << "Case " << ++case_id << ": ";
|
||||
try {
|
||||
cout << required_radars(target_ranges(islands, distance)) << endl;
|
||||
} catch (std::runtime_error&) {
|
||||
cout << -1 << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
double other_leg(const double leg, const double diag) {
|
||||
return sqrt(diag * diag - leg * leg);
|
||||
}
|
||||
|
||||
double diag(const double leg1, const double leg2) {
|
||||
return sqrt(leg1 * leg1 + leg2 * leg2);
|
||||
}
|
||||
|
||||
int required_radars(vector<pair<int, int>> islands, int distance) {
|
||||
for (auto& [island_x, island_y] : islands) {
|
||||
if (island_y > distance) { return -1; }
|
||||
}
|
||||
sort(islands.begin(), islands.end());
|
||||
int answer = 0;
|
||||
while (!islands.empty()) {
|
||||
answer++;
|
||||
const auto current_island = islands.back();
|
||||
islands.pop_back();
|
||||
double min_x = current_island.first
|
||||
- other_leg(current_island.second, distance)
|
||||
- current_island.second;
|
||||
vector<pair<int, int>> uncovered_islands;
|
||||
while (!islands.empty() && islands.back().first >= min_x) {
|
||||
// 右移雷达
|
||||
const double offset = other_leg(islands.back().second, distance);
|
||||
if (islands.back().first - offset >= min_x) {
|
||||
min_x = islands.back().first - offset;
|
||||
} else {
|
||||
uncovered_islands.push_back(islands.back());
|
||||
}
|
||||
islands.pop_back();
|
||||
}
|
||||
for (int i = uncovered_islands.size() - 1; i >= 0; i--) { // NOLINT(*-narrowing-conversions)
|
||||
islands.push_back(uncovered_islands[i]);
|
||||
}
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
int n, distance, case_id = 0;
|
||||
while (cin >> n >> distance) {
|
||||
if (n == 0 && distance == 0) { break; }
|
||||
vector<pair<int, int>> islands(n);
|
||||
for (int i = 0; i < n; i++) {
|
||||
cin >> islands[i].first >> islands[i].second;
|
||||
}
|
||||
cout << "Case " << ++case_id << ": " << required_radars(islands, distance) << endl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int shortest_fall_time(const int length, vector<int> ant_pos) {
|
||||
sort(ant_pos.begin(), ant_pos.end(),
|
||||
[length](const int pos1, const int pos2) {
|
||||
return abs(pos1 - length / 2) < abs(pos2 - length / 2); // 到中点距离最短者
|
||||
});
|
||||
return min(ant_pos[0], length - ant_pos[0]);
|
||||
}
|
||||
|
||||
int longest_fall_time(const int length, vector<int> ant_pos) {
|
||||
sort(ant_pos.begin(), ant_pos.end(),
|
||||
[length](const int pos1, const int pos2) {
|
||||
return abs(pos1 - length / 2) > abs(pos2 - length / 2); // 到中点距离最长者
|
||||
});
|
||||
return max(ant_pos[0], length - ant_pos[0]);
|
||||
}
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
int group_count;
|
||||
cin >> group_count;
|
||||
for (int _ = 0; _ < group_count; _++) {
|
||||
int length, ant_count;
|
||||
cin >> length >> ant_count;
|
||||
vector<int> ant_pos(ant_count);
|
||||
for (int i = 0; i < ant_count; i++) {
|
||||
cin >> ant_pos[i];
|
||||
}
|
||||
cout << shortest_fall_time(length, ant_pos) << " " << longest_fall_time(length, ant_pos) << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef pair<int, int> Rider;
|
||||
|
||||
constexpr int FULL_DISTANCE = 4500 * 3.6;
|
||||
|
||||
int ride_time(const Rider& rider, const int distance = FULL_DISTANCE) {
|
||||
return static_cast<int>(ceil(static_cast<double>(distance) / rider.first)) + rider.second;
|
||||
}
|
||||
|
||||
int start_pos(const Rider& rider) {
|
||||
if (rider.second >= 0) { return 0; }
|
||||
return rider.first * -rider.second;
|
||||
}
|
||||
|
||||
int arrival_time(const vector<Rider>& riders, const int distance = FULL_DISTANCE) {
|
||||
vector<Rider> early_riders, late_riders;
|
||||
for (const auto& rider : riders) {
|
||||
if (rider.second >= 0) {
|
||||
late_riders.push_back(rider);
|
||||
} else {
|
||||
// early_riders.push_back(rider);
|
||||
}
|
||||
}
|
||||
double min_time = ride_time(*min_element(
|
||||
late_riders.begin(), late_riders.end(),
|
||||
[distance](const Rider& a, const Rider& b) {
|
||||
return ride_time(a, distance) < ride_time(b, distance);
|
||||
}));
|
||||
clog << "min_time: " << min_time << endl;
|
||||
// for (const auto& rider : early_riders) {
|
||||
// if (-rider.second > min_time) { continue; }
|
||||
// min_time = min(min_time, ride_time(rider, distance));
|
||||
// }
|
||||
return static_cast<int>(ceil(min_time));
|
||||
}
|
||||
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
int rider_count;
|
||||
while (cin >> rider_count && rider_count) {
|
||||
vector<Rider> riders(rider_count);
|
||||
for (int i = 0; i < rider_count; i++) {
|
||||
cin >> riders[i].first >> riders[i].second;
|
||||
// riders[i].first /= 3.6;
|
||||
}
|
||||
cout << arrival_time(riders) << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
using namespace std;
|
||||
|
||||
string decrypt_snakey(string encrypted, int col) {
|
||||
string decrypted;
|
||||
for (int i = 0; i < col; i++) {
|
||||
for (int offset = 0;; offset++) {
|
||||
try {
|
||||
decrypted += encrypted.at(i + offset * 2 * col);
|
||||
decrypted += encrypted.at((offset + 1) * 2 * col - i - 1);
|
||||
} catch (out_of_range&) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return decrypted;
|
||||
}
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
string encrypted;
|
||||
int col;
|
||||
cin >> col >> encrypted;
|
||||
cout << decrypt_snakey(encrypted, col) << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef pair<int, int> Range;
|
||||
typedef pair<int, int> FuelStop;
|
||||
|
||||
vector<Range> covered_ranges(const vector<FuelStop>& fuel_stops, const int full_distance, const int initial_fuel) {
|
||||
vector<Range> ranges{{0, initial_fuel}};
|
||||
ranges.reserve(fuel_stops.size());
|
||||
for (const auto& [distance, fuel_amount] : fuel_stops) {
|
||||
ranges.emplace_back(full_distance - distance, full_distance - distance + fuel_amount);
|
||||
}
|
||||
return ranges;
|
||||
}
|
||||
|
||||
int min_stops(vector<Range> ranges, const int full_distance) {
|
||||
sort(ranges.begin(), ranges.end());
|
||||
int answer = 0;
|
||||
int current_pos = 0, max_r = -1;
|
||||
for (int i = 0; i < ranges.size();) {
|
||||
if (ranges[i].first <= current_pos) {
|
||||
max_r = max(max_r, ranges[i].second);
|
||||
if (max_r >= full_distance) { return answer - 1; }
|
||||
i++;
|
||||
} else {
|
||||
if (max_r < current_pos) { return -1; }
|
||||
answer++, current_pos = max_r, max_r = -1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
int fuel_stop_count, full_distance, initial_fuel;
|
||||
cin >> fuel_stop_count;
|
||||
vector<FuelStop> fuel_stops(fuel_stop_count);
|
||||
for (int i = 0; i < fuel_stop_count; i++) {
|
||||
cin >> fuel_stops[i].first >> fuel_stops[i].second;
|
||||
}
|
||||
cin >> full_distance >> initial_fuel;
|
||||
const vector<Range> ranges = covered_ranges(fuel_stops, full_distance, initial_fuel);
|
||||
for (const auto& [l, r] : ranges) {
|
||||
clog << "[" << l << "," << r << "] ";
|
||||
}
|
||||
clog << endl;
|
||||
|
||||
cout << min_stops(ranges, full_distance) << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Dsu {
|
||||
public:
|
||||
struct Node {
|
||||
size_t parent, size;
|
||||
};
|
||||
|
||||
vector<Node> nodes;
|
||||
|
||||
explicit Dsu(const size_t size) : nodes(size) {
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
nodes[i] = {.parent = i, .size = 0};
|
||||
}
|
||||
}
|
||||
|
||||
size_t find(const size_t x) {
|
||||
if (nodes[x].parent == x) { return x; }
|
||||
return nodes[x].parent = find(nodes[x].parent);
|
||||
}
|
||||
|
||||
void unite(size_t x, size_t y) {
|
||||
if ((x = find(x)) == (y = find(y))) { return; }
|
||||
if (nodes[x].size > nodes[y].size) { swap(x, y); }
|
||||
nodes[x].parent = y;
|
||||
nodes[y].size += nodes[x].size;
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
size_t students_count, pairs_count;
|
||||
for (int case_id = 1; cin >> students_count >> pairs_count && students_count; case_id++) {
|
||||
cout << "Case " << case_id << ": ";
|
||||
Dsu dsu(students_count);
|
||||
size_t x, y, ans = 0;
|
||||
for (int _ = 0; _ < pairs_count; _++) {
|
||||
cin >> x >> y;
|
||||
dsu.unite(x - 1, y - 1);
|
||||
}
|
||||
for (size_t node_id = 0; node_id < students_count; node_id++) {
|
||||
ans += node_id == dsu.find(node_id);
|
||||
}
|
||||
cout << ans << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
#include <variant>
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <cstdio>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
class NotationTree {
|
||||
public:
|
||||
using Data = variant<double, char>;
|
||||
|
||||
struct TreeNode {
|
||||
Data data;
|
||||
optional<size_t> left_idx, right_idx;
|
||||
|
||||
explicit TreeNode(const string& value) { data = parse_string(value); }
|
||||
explicit TreeNode(const Data value) { data = value; }
|
||||
|
||||
[[nodiscard]] bool is_operator() const {
|
||||
return std::holds_alternative<char>(data);
|
||||
}
|
||||
|
||||
[[nodiscard]] char get_operator() const {
|
||||
if (!is_operator()) { throw invalid_argument("Node is not operator"); }
|
||||
return get<char>(data);
|
||||
}
|
||||
|
||||
[[nodiscard]] double get_number() const {
|
||||
if (is_operator()) { throw invalid_argument("Node is operator"); }
|
||||
return get<double>(data);
|
||||
}
|
||||
};
|
||||
|
||||
static Data parse_string(const string& value) {
|
||||
if (value == "+" || value == "-" || value == "*" || value == "/") {
|
||||
return value[0];
|
||||
}
|
||||
return stod(value);
|
||||
}
|
||||
|
||||
vector<TreeNode> nodes;
|
||||
|
||||
tuple<size_t, size_t> build_from_poland(const vector<Data>& datas, const size_t start_idx = 0) {
|
||||
size_t this_idx = nodes.size();
|
||||
nodes.emplace_back(datas[start_idx]);
|
||||
if (!nodes.back().is_operator()) { return make_tuple(this_idx, start_idx + 1); }
|
||||
auto [left_idx, right_start_idx] = build_from_poland(datas, start_idx + 1);
|
||||
nodes[this_idx].left_idx = left_idx;
|
||||
auto [right_idx, right_end_idx] = build_from_poland(datas, right_start_idx);
|
||||
nodes[this_idx].right_idx = right_idx;
|
||||
return make_tuple(this_idx, right_end_idx);
|
||||
}
|
||||
|
||||
double calculate(const size_t idx = 0) {
|
||||
if (!nodes[idx].is_operator()) {
|
||||
return nodes[idx].get_number();
|
||||
}
|
||||
if (!nodes[idx].left_idx.has_value() || !nodes[idx].right_idx.has_value()) {
|
||||
throw invalid_argument("Tree is not complete");
|
||||
}
|
||||
const double left_result = calculate(nodes[idx].left_idx.value()),
|
||||
right_result = calculate(nodes[idx].right_idx.value());
|
||||
switch (nodes[idx].get_operator()) {
|
||||
case '+': return left_result + right_result;
|
||||
case '-': return left_result - right_result;
|
||||
case '*': return left_result * right_result;
|
||||
case '/': return left_result / right_result;
|
||||
default: throw invalid_argument("Invalid operator");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
string poland_notation, token;
|
||||
vector<NotationTree::Data> datas;
|
||||
getline(cin, poland_notation);
|
||||
stringstream ss(poland_notation);
|
||||
while (ss >> token) {
|
||||
datas.push_back(NotationTree::parse_string(token));
|
||||
}
|
||||
NotationTree tree;
|
||||
tree.build_from_poland(datas);
|
||||
printf("%f\n", tree.calculate());
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user