From 9636a9a8189e064e281520f98a1e0166686b5a0a Mon Sep 17 00:00:00 2001 From: Valentyn Kolesnikov Date: Thu, 29 Aug 2024 03:09:17 +0300 Subject: [PATCH] Improved tasks 3264, 3265, 3266, 3267 --- .../Solution.kt | 3 ++- .../g3201_3300/s3265_count_almost_equal_pairs_i/Solution.kt | 3 ++- .../Solution.kt | 3 ++- .../g3201_3300/s3267_count_almost_equal_pairs_ii/Solution.kt | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/g3201_3300/s3264_final_array_state_after_k_multiplication_operations_i/Solution.kt b/src/main/kotlin/g3201_3300/s3264_final_array_state_after_k_multiplication_operations_i/Solution.kt index 8124904b..a3b24621 100644 --- a/src/main/kotlin/g3201_3300/s3264_final_array_state_after_k_multiplication_operations_i/Solution.kt +++ b/src/main/kotlin/g3201_3300/s3264_final_array_state_after_k_multiplication_operations_i/Solution.kt @@ -1,6 +1,7 @@ package g3201_3300.s3264_final_array_state_after_k_multiplication_operations_i -// #Easy #2024_08_28_Time_226_ms_(68.00%)_Space_38.5_MB_(66.00%) +// #Easy #Array #Math #Heap_Priority_Queue #Simulation +// #2024_08_29_Time_237_ms_(55.55%)_Space_39.5_MB_(51.85%) @Suppress("NAME_SHADOWING") class Solution { diff --git a/src/main/kotlin/g3201_3300/s3265_count_almost_equal_pairs_i/Solution.kt b/src/main/kotlin/g3201_3300/s3265_count_almost_equal_pairs_i/Solution.kt index c71e5009..5ab1aaac 100644 --- a/src/main/kotlin/g3201_3300/s3265_count_almost_equal_pairs_i/Solution.kt +++ b/src/main/kotlin/g3201_3300/s3265_count_almost_equal_pairs_i/Solution.kt @@ -1,6 +1,7 @@ package g3201_3300.s3265_count_almost_equal_pairs_i -// #Medium #2024_08_28_Time_188_ms_(100.00%)_Space_37.5_MB_(100.00%) +// #Medium #Array #Hash_Table #Sorting #Counting #Enumeration +// #2024_08_29_Time_184_ms_(100.00%)_Space_41.7_MB_(53.33%) @Suppress("NAME_SHADOWING") class Solution { diff --git a/src/main/kotlin/g3201_3300/s3266_final_array_state_after_k_multiplication_operations_ii/Solution.kt b/src/main/kotlin/g3201_3300/s3266_final_array_state_after_k_multiplication_operations_ii/Solution.kt index 0b200ceb..fedfd1c7 100644 --- a/src/main/kotlin/g3201_3300/s3266_final_array_state_after_k_multiplication_operations_ii/Solution.kt +++ b/src/main/kotlin/g3201_3300/s3266_final_array_state_after_k_multiplication_operations_ii/Solution.kt @@ -1,6 +1,7 @@ package g3201_3300.s3266_final_array_state_after_k_multiplication_operations_ii -// #Hard #2024_08_28_Time_546_ms_(100.00%)_Space_60.8_MB_(66.67%) +// #Hard #Array #Heap_Priority_Queue #Simulation +// #2024_08_29_Time_500_ms_(100.00%)_Space_45_MB_(100.00%) import java.util.PriorityQueue import kotlin.math.max diff --git a/src/main/kotlin/g3201_3300/s3267_count_almost_equal_pairs_ii/Solution.kt b/src/main/kotlin/g3201_3300/s3267_count_almost_equal_pairs_ii/Solution.kt index 9aa72bfe..65aa8f73 100644 --- a/src/main/kotlin/g3201_3300/s3267_count_almost_equal_pairs_ii/Solution.kt +++ b/src/main/kotlin/g3201_3300/s3267_count_almost_equal_pairs_ii/Solution.kt @@ -1,6 +1,7 @@ package g3201_3300.s3267_count_almost_equal_pairs_ii -// #Hard #2024_08_28_Time_791_ms_(100.00%)_Space_50.7_MB_(57.14%) +// #Hard #Array #Hash_Table #Sorting #Counting #Enumeration +// #2024_08_29_Time_814_ms_(100.00%)_Space_51.6_MB_(60.00%) class Solution { fun countPairs(nums: IntArray): Int {