From c389246cc42e0c37f85945a07bb93f66b2699238 Mon Sep 17 00:00:00 2001 From: Nyeogmi Date: Sat, 9 Mar 2024 22:31:13 -0800 Subject: [PATCH] Fix bugs caused by me, add .idea --- .idea/.gitignore | 3 +++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/megasort.iml | 10 ++++++++++ .idea/misc.xml | 4 ++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ main.py | 3 ++- 7 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/megasort.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/megasort.iml b/.idea/megasort.iml new file mode 100644 index 0000000..74d515a --- /dev/null +++ b/.idea/megasort.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..3c7a4b6 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..df5d72d --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/main.py b/main.py index 6fb1b4e..50f6997 100644 --- a/main.py +++ b/main.py @@ -100,8 +100,9 @@ def sort(options): def main(): with open("input.txt", "rt") as f_in: - lines_in = [i.strip() for i in f_in.split("\n") if i.strip()] + lines_in = [i.strip() for i in f_in.read().split("\n") if i.strip()] + random.shuffle(lines_in) results = sort(lines_in) with open("output.txt", "wt") as f_out: