From 3aabda4b4377ba014c7e69991836b8ff04b62086 Mon Sep 17 00:00:00 2001 From: unlockable Date: Sun, 5 Nov 2023 13:36:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E6=9C=8960=E5=88=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2023204/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/2023204/main.cpp b/2023204/main.cpp index 120703b..d2a1a9d 100644 --- a/2023204/main.cpp +++ b/2023204/main.cpp @@ -38,6 +38,7 @@ SearchResult find_node(int target, int start_num, int next_dead_node_num_ptr, current_line_len++; } else { + all_dead = false; int total_spawned_after = spawned_node_max_num + upper_line[upper_line_iter].length * 2; while (dead_nodes_num[next_dead_node_num_ptr] <= total_spawned_after && next_dead_node_num_ptr < total_dead_nodes) { @@ -45,7 +46,6 @@ SearchResult find_node(int target, int start_num, int next_dead_node_num_ptr, current_line_node[current_line_len] = SeveralContinuedDeadNode{ ALIVE, dead_nodes_num[next_dead_node_num_ptr] - spawned_node_max_num - 1}; current_line_len++; // things before this new dead node - all_dead = false; } current_line_node[current_line_len] = SeveralContinuedDeadNode{DEAD, 1}; // this new dead node @@ -59,7 +59,6 @@ SearchResult find_node(int target, int start_num, int next_dead_node_num_ptr, current_line_node[current_line_len] = SeveralContinuedDeadNode{ALIVE, total_spawned_after - spawned_node_max_num}; current_line_len++; - all_dead = false; } spawned_node_max_num = total_spawned_after;