From 79227295ad0b1b40e97e09415e5378f3c5926fb5 Mon Sep 17 00:00:00 2001 From: unlockable Date: Sat, 20 Jan 2024 21:49:26 +0100 Subject: [PATCH] 90. --- 2023209/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/2023209/main.cpp b/2023209/main.cpp index 5c55be0..4996641 100644 --- a/2023209/main.cpp +++ b/2023209/main.cpp @@ -61,6 +61,10 @@ int main() { scanf("%hu %hu %d", &start, &terminal, &time_limit); dfs(start, 0, 0, 0); + if (current_cheap == 2147483647) { + printf("-1\n"); + return 0; + } printf("%d\n", current_cheap); return 0; } \ No newline at end of file