Skip to content

Commit

Permalink
Merry X-mas
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Dec 25, 2023
1 parent 57a430f commit 0b3a354
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 9 deletions.
6 changes: 2 additions & 4 deletions scripts/docker/run-cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ echo

for folder in $FOLDERS; do
[[ -f "${folder}WRONG" ]] && continue
cpp_files="$(find "$folder" -name '*.cpp')"
cpp_files_count="$(wc -l <<< "${cpp_files}")"

if [[ "${cpp_files_count}" -eq 1 ]]; then
if [ "$(find "$folder" -name '*.cpp' | wc -l)" -eq 1 ]; then
echo "$folder"
cd "${folder}" || exit 1

g++ -Werror -std=c++20 -O2 -lm ./*.cpp
Expand Down
2 changes: 1 addition & 1 deletion solutions/beecrowd/1029/1029.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int32_t fib(int16_t n) {
}

int main() {
int16_t i, j;
int16_t i;
int16_t n;

memset(f, 0, sizeof(f));
Expand Down
12 changes: 8 additions & 4 deletions solutions/beecrowd/1029/1029.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,21 @@ std::int32_t fib(std::int32_t n) {
}

int main() {
std::int16_t i, j;
std::int32_t n;
std::int16_t i;
std::int16_t n;

memset(f, 0, sizeof(f));
memset(r, 0, sizeof(r));
f[1] = 1;

scanf("%d", &i);
while (i--) {
scanf("%ld", &n);
printf("fib(%ld) = %ld calls = %ld\n", n, r[n], fib(n));
scanf("%d", &n);

std::int32_t fib_result = fib(n);

printf("fib(%d) = %d calls = %d\n", n, r[n], fib_result);

}

return 0;
Expand Down
Empty file added solutions/beecrowd/1088/WRONG
Empty file.
Empty file added solutions/beecrowd/1196/WRONG
Empty file.
Empty file added solutions/beecrowd/1239/WRONG
Empty file.
Empty file added solutions/beecrowd/1249/WRONG
Empty file.
Empty file added solutions/beecrowd/1252/WRONG
Empty file.
Empty file added solutions/beecrowd/1287/WRONG
Empty file.
Empty file added solutions/beecrowd/2758/WRONG
Empty file.
Empty file.

0 comments on commit 0b3a354

Please sign in to comment.