From 767138005426dfc5936ebcf377b487e0d075805f Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 18 Aug 2021 12:36:57 +0900 Subject: [PATCH] Init skeleton c_impl and problem description --- c_impl/.gitignore | 3 +++ c_impl/CMakeLists.txt | 16 ++++++++++++++++ c_impl/src/main.c | 3 +++ problemDesc.txt | 9 +++++++++ problemLink.txt | 1 + 5 files changed, 32 insertions(+) create mode 100644 c_impl/.gitignore create mode 100644 c_impl/CMakeLists.txt create mode 100644 c_impl/src/main.c create mode 100644 problemDesc.txt create mode 100644 problemLink.txt diff --git a/c_impl/.gitignore b/c_impl/.gitignore new file mode 100644 index 0000000..8aed69b --- /dev/null +++ b/c_impl/.gitignore @@ -0,0 +1,3 @@ +build*/ +.cache/ +compile_commands.json diff --git a/c_impl/CMakeLists.txt b/c_impl/CMakeLists.txt new file mode 100644 index 0000000..1a7fdda --- /dev/null +++ b/c_impl/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.9) +project(AronsonsSequencePractice) + +set(ASP_SOURCES + src/main.c) + +set(CMAKE_C_FLAGS "-Wall -Wextra -Wpedantic") +set(CMAKE_C_FLAGS_DEBUG "-g -O0") +set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG") + +if(NOT CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" MATCHES ^$) + set(CMAKE_BUILD_TYPE "Debug") + message("Set defualt build type to Debug") +endif() + +add_executable(aronsonsSequence ${ASP_SOURCES}) diff --git a/c_impl/src/main.c b/c_impl/src/main.c new file mode 100644 index 0000000..11b7fad --- /dev/null +++ b/c_impl/src/main.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/problemDesc.txt b/problemDesc.txt new file mode 100644 index 0000000..370df90 --- /dev/null +++ b/problemDesc.txt @@ -0,0 +1,9 @@ +Aronson\u2019s sequence 1, 4, 11, 16, 24, 29, 33, 35, 39, \u2026 (A005224) is +an infinite self-referential sequence defined as: + + T is the first, fourth, eleventh, \u2026 letter in this sentence. + +Your task is to write a program that generates Aronson\u2019s sequence and use +it to compute the first hundred members of the sequence. When you are finished, +you are welcome to read or run a suggested solution, or to post your own +solution or discuss the exercise in the comments below. diff --git a/problemLink.txt b/problemLink.txt new file mode 100644 index 0000000..83dffd8 --- /dev/null +++ b/problemLink.txt @@ -0,0 +1 @@ +https://programmingpraxis.com/2021/06/22/aronsons-sequence/