# Lab & HW 9 multiple files & struct ## Lab 9-1: Gacha Simulator ### Lab 9-1 requirnments 1. AC https://oj.cerana.tech/contest/19/problem/132 (15 pt) 2. Choose one to complete & demo (10 pt) * You can ... Find an input data so that your code can run in 1.23~1.34 seconds using Lab 9-1 template. Please note that you can only use the AC code from Lab 9-1 to put the "getNumGoodOperators" function in the template. * OR ... AC [EZtra 3](https://oj.cerana.tech/contest/6/problem/7) to prove that your code can always be run within 1 second. Hint: * Your code must be able to produce the correct answer even if it exceeds the Lab 9-1 specified range. e.g. 50 10001 * If you have no idea about the correct input size, you can refer to this [article](https://hackmd.io/@yKnr4V8OTteOq3zOfplLIQ/rJS_zj9m6?fbclid=IwAR0mvYDjp38fndPaXL63Gt-VyTo0HwZCGuje8twJTbQd36H6o---05HQL4U). * "Ctrl + C" Can interrupt programs that are running for too long. ## Lab 9-2: Kalah game ### Game instructions https://en.wikipedia.org/wiki/Kalah ### Lab 9-2 requirnments 0. Confirm your OS type (windows, mac, linux...) 1. Go to E3 to download the files of Lab 9-2 2. Familiar with compile flow * ![image](https://hackmd.io/_uploads/ry-rCdWSa.png) 2-1 Implement/copy your Makefile 2-2 Implement your main.c 2-3 ./main & play games (15 pt) 3. Win a game on any AI difficulty & demo (10 pt) * ![image](https://hackmd.io/_uploads/SyEO-uZST.png) * Difficulty level 10 or above may take a long time ## Homework 9 ### HW 9-1 (25 pt) Considering that the number of answer lines of HW9-2 is a bit large, HW9-1 only needs to write the Debug report when writing HW9-2. Even if you don't get all the test cases correct, you can still get points by submitting this report. ### HW 9-2 (25 pt) [Question link](https://oj.cerana.tech/contest/20/problem/456) This assignment hopes that students can practice the use of struct. ## Submission Compress your lab & homework to .zip file lab ``` {student_id}_lab9 ├── {student_id}_lab9-1 | └──{student_id}_lab9-1.c └── {student_id}_lab9-2 └──main.c └──Makefile └──game.h └──game.o ``` compress {student_id}_lab9 to {student_id}_lab9.zip and submit to e3 homework ``` {student_id}_hw9 ├── {student_id}_hw9-1 | └──{student_id}_hw9-1.pdf └── {student_id}_hw9-2 └──{student_id}_hw9-2.c ``` compress {student_id}_hw9 to {student_id}_hw9.zip and submit to e3 ![image](https://hackmd.io/_uploads/HycrMYbST.png)