From 3f1f70182a80fb6ff109db783b1af97af784cbf8 Mon Sep 17 00:00:00 2001 From: Omar Magdy Date: Thu, 2 Jun 2022 14:08:03 +0200 Subject: Edited some scripts --- scripts/.scripts/cpp_ps.sh | 2 +- scripts/.scripts/pscontests.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/.scripts/cpp_ps.sh b/scripts/.scripts/cpp_ps.sh index edf6312..ac0eb2d 100755 --- a/scripts/.scripts/cpp_ps.sh +++ b/scripts/.scripts/cpp_ps.sh @@ -6,7 +6,7 @@ if [ "$input" = "y" ]; then cd $1 touch main.cpp echo -e "#include\n\nusing namespace std;\n\nint main () {\n\tios_base::sync_with_stdio(false);\n\tcin.tie(NULL);\n\tint tt;\n\tcin >> tt;\n\twhile(tt--){\n\n\t}\n}" > main.cpp - touch input.txt + touch inp nvim main.cpp fi diff --git a/scripts/.scripts/pscontests.sh b/scripts/.scripts/pscontests.sh index cfadcb1..ab35076 100755 --- a/scripts/.scripts/pscontests.sh +++ b/scripts/.scripts/pscontests.sh @@ -7,6 +7,10 @@ mkdir ${REPLY} cd ${REPLY} for p in $PROBLEMS do - touch $p.cpp - echo -e "#include\n\nusing namespace; std\n\nint main () {ios_base::sync_with_stdio(false);\ncin.tie(NULL);\nint tt;\nwhile(tt--){\n}}" > $p.cpp + mkdir $p + cd $p + touch main.cpp + echo -e "#include\n\nusing namespace std;\n\nint main () {\n\tios_base::sync_with_stdio(false);\n\tcin.tie(NULL);\n\tint tt;\n\tcin >> tt;\n\twhile(tt--){\n\n\t}\n}" > main.cpp + touch inp + cd .. done -- cgit v1.2.3