diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 13566b8..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 79b3c94..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index a7e6ad5..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/operatSystem.iml b/.idea/operatSystem.iml
deleted file mode 100644
index f08604b..0000000
--- a/.idea/operatSystem.iml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Assignment_1_120040077/source/.vscode/c_cpp_properties.json b/Assignment_1_120040077/source/.vscode/c_cpp_properties.json
deleted file mode 100644
index 8357f90..0000000
--- a/Assignment_1_120040077/source/.vscode/c_cpp_properties.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "configurations": [
- {
- "name": "Linux",
- "includePath": [
- "${workspaceFolder}/**"
- ],
- "defines": [],
- "compilerPath": "/usr/bin/gcc",
- "cStandard": "gnu11",
- "cppStandard": "gnu++98",
- "intelliSenseMode": "linux-gcc-x64"
- }
- ],
- "version": 4
-}
\ No newline at end of file
diff --git a/Assignment_2_120040077/source/hw2.cpp b/Assignment_2_120040077/source/hw2.cpp
index c4dd641..5daaaf4 100644
--- a/Assignment_2_120040077/source/hw2.cpp
+++ b/Assignment_2_120040077/source/hw2.cpp
@@ -9,24 +9,24 @@
#include
#define ROW 10
-#define COLUMN 50
-#define THREADNUM 11
+#define COLUMN 50
+#define THREADNUM 10
bool isWin = 0;
bool isLose = 0;
bool isExit = 0;
pthread_mutex_t mutex;
pthread_cond_t cond;
-int logs_speed[ROW - 1];
-int logs_size[ROW -1];
-int left_end[ROW - 1];
-int right_end[ROW - 1];
+int logs_speed[ROW + 10];
+int logs_size[ROW + 10];
+int left_end[ROW + 10];
+int right_end[ROW + 10];
struct Node{
int x , y;
Node( int _x , int _y ) : x( _x ) , y( _y ) {};
Node(){} ;
-} frog ;
+} frog, speed;
char map[ROW+10][COLUMN] ;
@@ -65,135 +65,124 @@ int kbhit(void){
void *logs_move( void *t ){
/* initilize the setting of logs*/
- int *log_id = (int*) t;
+ long log_id;
+ log_id = (long) t;
+
+ while (isExit == 0 && isWin == 0 && isLose == 0) {
- while (!isExit) {
- pthread_mutex_lock(&mutex);
- /* draw the river*/
- for (int i = 0; i < COLUMN - 1; i++) {
- map[*log_id][i] = ' ';
- }
- if (*log_id % 2){
+
+ if (log_id % 2){
/* odd row move from left to right*/
- right_end[*log_id] = (right_end[*log_id] + 1) % (COLUMN - 1);
- left_end[*log_id] = (left_end[*log_id] + 1) % (COLUMN - 1);
+ left_end[log_id] = (left_end[log_id] + 1) % (COLUMN - 1);
}
else {
/* even row move from right to left*/
- left_end[*log_id] = (left_end[*log_id] - 1) % (COLUMN - 1);
- right_end[*log_id] = (right_end[*log_id] - 1) % (COLUMN - 1);
+ left_end[log_id] = left_end[log_id] - 1;
+ if (left_end[log_id] < 0) left_end[log_id] += COLUMN - 1;
}
- if (right_end[*log_id] > left_end[*log_id]) { // the log is crossing the right boundary
- for (int j = left_end[*log_id]; j < logs_size[*log_id]; j ++) {
- map[*log_id][j] = '=';
- }
- }else { // the log is crossing the boundary
- for (int j = left_end[*log_id]; j < COLUMN - 1; j ++) {
- map[*log_id][j] = '=';
- }
- for (int k = 0; k < right_end[*log_id]; k++) {
- map[*log_id][k] = '=';
- }
- }
+ pthread_mutex_lock(&mutex);
- /* draw the two sides*/
- for (int j = 0; j < COLUMN - 1; j ++) {
- map[ROW][j] = '|';
- map[0][j] = '|';
+ /* draw the river*/
+ for (int j = 0; j < COLUMN - 1; ++j) {
+ map[log_id][j] = ' ';
}
- /* Check keyboard hits, to change frog's position or quit the game. */
- if (kbhit()) {
- char dir = getchar();
- if ( dir == 'w' || dir == 'W') {
- frog.x = frog.x + 1;
- }
- if ( dir == 'a' || dir == 'A') {
- frog.y = frog.y - 1;
- }
- if ( (dir == 's' || dir == 'S') && frog.x != ROW) {
- frog.x = frog.x - 1;
- }
- if (dir == 'd' || dir == 'D') {
- frog.y = frog.y + 1;
- }
- if (dir == 'q' || dir == 'Q') {
- isExit = 1;
- }
+ for (int i = 0, j = left_end[log_id]; i < logs_size[log_id]; ++j, ++i) {
+ map[log_id][j%(COLUMN - 1)] = '=';
}
- map[frog.x][frog.y] = '0';
+ /* draw the two sides*/
+ for (int j = 0; j < COLUMN - 1; j ++) {
+ map[ROW][j] = map[0][j] = '|' ;
+ }
- /* Check game's status */
- if (map[frog.x][frog.y] == ' ') { // the flog falls to the river
- isExit = 1;
- }
+ for( int j = 0; j < COLUMN - 1; ++j )
+ map[ROW + 1][j] = '-';
- if (frog.y <= 0) { //touches the right boundary
- isExit = 1;
- isLose = 1;
- }
- if (frog.y >= COLUMN - 1) { //touches the left boundary
- isExit = 1;
- isLose = 1;
- }
- if (frog.x == 0) {
- isExit = 1;
- isWin = 1;
- }
- /* Print the map on the screen */
+ /* Check keyboard hits, to change frog's position or quit the game. */
+ if (kbhit()) {
+ char dir = getchar();
+ if ( dir == 'w' || dir == 'W') {
+ frog.x = frog.x - 1;
+ }
+ if ( (dir == 'a' || dir == 'A') && frog.y != 0) {
+ frog.y = frog.y - 1;
+ }
+ if ( (dir == 's' || dir == 'S') && frog.x != ROW) {
+ frog.x = frog.x + 1;
+ }
+ if ((dir == 'd' || dir == 'D') && frog.y!= COLUMN - 2) {
+ frog.y = frog.y + 1;
+ }
+ if (dir == 'q' || dir == 'Q') {
+ isExit = 1;
+ }
+
+ /* switch the speed*/
+ if ((dir == 'j' || dir == 'J') && speed.y != 0) {
+ speed.y = speed.y - 1;
+ }
+ if ((dir == 'k' || dir == 'K') && speed.y != COLUMN - 2) {
+ speed.y = speed.y + 1;
+ }
+ }
+
+ /* Check game's status */
+ if (map[frog.x][frog.y] == ' ') { // the flog falls to the river
+ isLose = 1;
+ }
- printf("\033c");
- //Print the map into screen
- for( int i = 0; i <= ROW; ++i) {
- puts( map[i] );
- }
- usleep(1000);
- }
- pthread_mutex_unlock(&mutex);
- usleep(logs_speed[*log_id] * 6000);
- pthread_exit(NULL);
-}
+ if (frog.y <= 0) { //touches the left boundary
+ isLose = 1;
+ }
-void *log_ini() {
- /* initilize the setting of logs*/
- srand((unsigned int)time(NULL));
+ if (frog.y >= COLUMN - 1) { //touches the right boundary
+ isLose = 1;
+ }
- for (int i = 1; i < ROW; i ++) {
- logs_speed[i] = rand()%20 + 10;
- logs_size[i] = rand()%5 + 13;
- left_end[i] = rand() % (COLUMN - 1);
- right_end[i] = (left_end[i] + logs_size[i]) % (COLUMN - 1);
+ if (frog.x == 0) {
+ isWin = 1;
+ }
- if (right_end[i] > left_end[i]) {
- for (int k = left_end[i]; k < right_end[i]; k++) {
- map[i][k] = '=';
- }
- }else {
- for (int k = left_end[i]; k < COLUMN - 1; k ++) {
- map[i][k] = '=';
+ if (isExit == 0 && isWin == 0 && isLose == 0) {
+ /* Print the map on the screen */
+ if (frog.x == log_id && map[frog.x][frog.y] == '=') {
+ if (frog.x % 2) frog.y ++;
+ else frog.y --;
}
- for (int j = 0; j < right_end[i]; j ++) {
- map[i][j] = '=';
- }
- }
- }
+ // printf("\033[0;0h\033[2J");
+ printf("\033[H\033[2J");
+ //Print the map into screen
+ usleep(1000);
+ map[frog.x][frog.y] = '0';
+ map[speed.x][speed.y] = '>';
+ for( int i = 0; i <= ROW + 1; ++i) {
+ puts( map[i] );
+ }
+ }
+
+ pthread_mutex_unlock(&mutex);
+ usleep(logs_speed[log_id] * 6000 * (COLUMN - 1 - speed.y)/ (COLUMN - 1));
+ }
+ pthread_exit(NULL);
}
+
+
int main( int argc, char *argv[] ){
pthread_t threads[THREADNUM];
pthread_mutex_init(&mutex, NULL);
- pthread_cond_init(&cond, NULL);
+ srand((unsigned int)time(NULL));
// Initialize the river map and frog's starting position
memset( map , 0, sizeof( map ) ) ;
@@ -203,22 +192,35 @@ int main( int argc, char *argv[] ){
for( i = 1; i < ROW; ++i ){
for( j = 0; j < COLUMN - 1; ++j )
map[i][j] = ' ' ;
+ logs_speed[i] = rand()%20 + 10;
+ logs_size[i] = rand()%5 + 13;
+ left_end[i] = rand() % (COLUMN - 1);
}
+
+ /* initilize the setting of logs*/
+
+
for( j = 0; j < COLUMN - 1; ++j )
map[ROW][j] = map[0][j] = '|' ;
+
+ /* set the speed changing slide bar*/
for( j = 0; j < COLUMN - 1; ++j )
- map[0][j] = map[0][j] = '|' ;
+ map[ROW + 1][j] = '-';
+
+ speed = Node(ROW + 1, 1);
+ map[speed.x][speed.y] = '>';
frog = Node( ROW, (COLUMN-1) / 2 ) ;
map[frog.x][frog.y] = '0' ;
- /* initialize the logs*/
- log_ini();
+ /* set the speed changing slide bar*/
+
+
//Print the map into screen
- for( i = 0; i <= ROW; ++i) {
+ for( i = 0; i <= ROW + 1; ++i) {
puts( map[i] );
}
@@ -226,13 +228,19 @@ int main( int argc, char *argv[] ){
/* Create pthreads for logs move and frog control. */
for (int i = 1; i < THREADNUM; ++ i) {
- pthread_create(&threads[i], NULL, logs_move, (void*) i);
+ int rc;
+ rc = pthread_create(&threads[i], NULL, logs_move, (void*)i);
+ if (rc) {
+ printf("ERROR: return code from pthread_create() is %d",rc);
+ exit(1);
+ }
usleep(200);
}
for (int i = 1; i < THREADNUM; ++i) {
pthread_join(threads[i], NULL);
}
+
printf("\033[0;0H\033[2J\033[?25h");
usleep(1000) ;
@@ -253,7 +261,6 @@ int main( int argc, char *argv[] ){
pthread_mutex_destroy(&mutex);
- pthread_cond_destroy(&cond);
pthread_exit(NULL);
return 0;
diff --git a/ass2report/Report.aux b/ass2report/Report.aux
new file mode 100644
index 0000000..00fc0d7
--- /dev/null
+++ b/ass2report/Report.aux
@@ -0,0 +1,5 @@
+\relax
+\@writefile{toc}{\contentsline {section}{\numberline {1}What I Learnt From the task}{1}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}-lpthread}{1}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}pthread\_join}{1}{}\protected@file@percent }
+\gdef \@abspage@last{1}
diff --git a/ass2report/Report.fdb_latexmk b/ass2report/Report.fdb_latexmk
new file mode 100644
index 0000000..550a077
--- /dev/null
+++ b/ass2report/Report.fdb_latexmk
@@ -0,0 +1,54 @@
+# Fdb version 3
+["pdflatex"] 1634300679 "d:/operatSystem/ass2report/Report.tex" "Report.pdf" "Report" 1634300680
+ "Report.aux" 1634300680 249 570e78352da2bc99f68e72a4b14ed91a "pdflatex"
+ "Report.tex" 1634300678 921 177ce2380925ab5bd26de818ce57b8ab ""
+ "d:/operatSystem/ass2report/Report.tex" 1634300678 921 177ce2380925ab5bd26de818ce57b8ab ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/map/fontname/texfonts.map" 1627029291 3524 cb3e574dea2d1052e39280babc910dc8 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm" 1627027669 1004 54797486969f23fa377b128694d548df ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm" 1627027669 988 bdf658c3bfc2d96d3c8b02cfc1c94c20 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm" 1627028375 1324 c910af8c371558dc20f2d7822f66fe64 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmex10.tfm" 1627028375 992 662f679a0b3d2d53c1b94050fdaa3f50 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm" 1627028375 1524 4414a8315f39513458b80dfc63bff03a ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm" 1627028375 1512 f21f83efb36853c0b70002322c1ab3ad ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm" 1627028375 1520 eccf95517727cb11801f4f1aee3a21b4 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmr12.tfm" 1627028375 1288 655e228510b4c2a1abe905c368440826 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmr17.tfm" 1627028375 1292 296a67155bdbfc32aa9c636f21e91433 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmr6.tfm" 1627028375 1300 b62933e007d01cfd073f79b963c01526 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmr8.tfm" 1627028375 1292 21c1c5bfeaebccffdb478fd231a0997d ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm" 1627028375 1124 6c73e740cf17375f03eec0ee63599741 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1627028375 1116 933a60c408fc0a863a92debe84b2d294 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1627028375 1120 8b7d695260f3cff42e636090a8002094 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb" 1627027669 32080 340ef9bf63678554ee606688e7b5339d ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb" 1627027669 36299 5f9df58c2139e7edcf37c8fca4bd384d ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1627027669 35752 024fb6c41858982481f6968b5fc26508 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb" 1627027669 32722 d7379af29a190c3f453aba36302ff5a9 ""
+ "d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb" 1627027669 32362 bc3f3eec7ab7d65fe700963d4017d32c ""
+ "d:/tex/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii" 1627030673 71627 94eb9990bed73c364d7f53f960cc8c5b ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty" 1627027673 2222 da905dc1db75412efd2d8f67739f0596 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty" 1627027673 4173 bc0410bcccdff806d6132d3c1ef35481 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty" 1627027673 87375 a806706bbc32b3e8482f6d87aeffbf76 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty" 1627027673 4128 c11da5c2df397f39d5783fc9307689d0 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty" 1627027673 2444 b015525572ea0d0165d6ce81ba5e5259 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls" 1627029979 20144 0fe9067680219956678b52f12bdce8ee ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty" 1627029979 5049 969aec05d5f39c43f8005910498fcf90 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/base/size10.clo" 1627029979 8448 05e1c6a8fc5db344ed9d7aeb299acbce ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty" 1627028221 9865 f4184f7819aee103905908cd33492412 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty" 1627029012 13886 d1306dcf79a944f6988e688c1785f9ce ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/color.cfg" 1627029495 1213 620bba36b25224fa9b7e1ccb4ecb76fd ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg" 1627029495 1224 978390e9c2234eab29404bc21b268d1e ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-def/pdftex.def" 1627029496 19103 48d29b6e2a64cb717117ef65f107b404 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty" 1627029494 7153 17c23e5e586ebbdf5d269e7867e53cef ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty" 1627029494 18399 7e40f80366dffb22c0e7b70517db5cb4 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty" 1627029494 7972 81ea1752666dc7c1e93f0b4c10665ca1 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty" 1627029494 2671 4de6781a30211fe0ea4c672e4a2a8166 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty" 1627029494 4007 3bccccf8f35e1bc1ef0f7c55ceeb7713 ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def" 1627029943 27390 e56d07ec4c21b9dfc83acf3baec1b83c ""
+ "d:/tex/texlive/2021/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1627030044 678 4792914a8f45be57bb98413425e4c7af ""
+ "d:/tex/texlive/2021/texmf-dist/web2c/texmf.cnf" 1627029919 40042 fe981136cbb5f3715ab1b0e46e3d3892 ""
+ "d:/tex/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map" 1627032862 5227242 bd90361a11e4a4bf88f70a677fa2a119 ""
+ "d:/tex/texlive/2021/texmf-var/web2c/pdftex/pdflatex.fmt" 1627032943 2801599 b79f867d97d78478c632517a6e4ce8ad ""
+ "d:/tex/texlive/2021/texmf.cnf" 1627032842 713 e69b156964470283e0530f5060668171 ""
+ (generated)
+ "Report.log"
+ "Report.aux"
+ "Report.pdf"
diff --git a/ass2report/Report.fls b/ass2report/Report.fls
new file mode 100644
index 0000000..1eef452
--- /dev/null
+++ b/ass2report/Report.fls
@@ -0,0 +1,230 @@
+PWD d:/operatSystem/ass2report
+INPUT d:/tex/texlive/2021/texmf.cnf
+INPUT d:/tex/texlive/2021/texmf-dist/web2c/texmf.cnf
+INPUT d:/tex/texlive/2021/texmf-var/web2c/pdftex/pdflatex.fmt
+INPUT d:/operatSystem/ass2report/Report.tex
+OUTPUT Report.log
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/size10.clo
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/size10.clo
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/size10.clo
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/size10.clo
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/color.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/color.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/color.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/color.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-def/pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-def/pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-def/pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-def/pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+INPUT ./Report.aux
+INPUT Report.aux
+INPUT Report.aux
+OUTPUT Report.aux
+INPUT d:/tex/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
+INPUT d:/tex/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
+INPUT d:/tex/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
+INPUT d:/tex/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/map/fontname/texfonts.map
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmr17.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmr8.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmr6.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmex10.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm
+OUTPUT Report.pdf
+INPUT d:/tex/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map
+INPUT Report.aux
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb
+INPUT d:/tex/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb
diff --git a/ass2report/Report.log b/ass2report/Report.log
new file mode 100644
index 0000000..6705d75
--- /dev/null
+++ b/ass2report/Report.log
@@ -0,0 +1,193 @@
+This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/W32TeX) (preloaded format=pdflatex 2021.7.23) 16 OCT 2021 17:24
+entering extended mode
+ restricted \write18 enabled.
+ %&-line parsing enabled.
+**Report.tex
+(./Report.tex
+LaTeX2e <2021-06-01> patch level 1
+L3 programming layer <2021-07-12>
+(d:/tex/texlive/2021/texmf-dist/tex/latex/base/article.cls
+Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
+(d:/tex/texlive/2021/texmf-dist/tex/latex/base/size10.clo
+File: size10.clo 2021/02/12 v1.4n Standard LaTeX file (size option)
+)
+\c@part=\count182
+\c@section=\count183
+\c@subsection=\count184
+\c@subsubsection=\count185
+\c@paragraph=\count186
+\c@subparagraph=\count187
+\c@figure=\count188
+\c@table=\count189
+\abovecaptionskip=\skip47
+\belowcaptionskip=\skip48
+\bibindent=\dimen138
+)
+(d:/tex/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty
+Package: inputenc 2021/02/14 v1.3d Input encoding file
+\inpenc@prehook=\toks16
+\inpenc@posthook=\toks17
+)
+(d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty
+Package: amsmath 2021/04/20 v2.17j AMS math features
+\@mathmargin=\skip49
+
+For additional information on amsmath, use the `?' option.
+(d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
+Package: amstext 2000/06/29 v2.01 AMS text
+
+(d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty
+File: amsgen.sty 1999/11/30 v2.0 generic functions
+\@emptytoks=\toks18
+\ex@=\dimen139
+))
+(d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty
+Package: amsbsy 1999/11/29 v1.2d Bold Symbols
+\pmbraise@=\dimen140
+)
+(d:/tex/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty
+Package: amsopn 2016/03/08 v2.02 operator names
+)
+\inf@bad=\count190
+LaTeX Info: Redefining \frac on input line 234.
+\uproot@=\count191
+\leftroot@=\count192
+LaTeX Info: Redefining \overline on input line 399.
+\classnum@=\count193
+\DOTSCASE@=\count194
+LaTeX Info: Redefining \ldots on input line 496.
+LaTeX Info: Redefining \dots on input line 499.
+LaTeX Info: Redefining \cdots on input line 620.
+\Mathstrutbox@=\box50
+\strutbox@=\box51
+\big@size=\dimen141
+LaTeX Font Info: Redeclaring font encoding OML on input line 743.
+LaTeX Font Info: Redeclaring font encoding OMS on input line 744.
+\macc@depth=\count195
+\c@MaxMatrixCols=\count196
+\dotsspace@=\muskip16
+\c@parentequation=\count197
+\dspbrk@lvl=\count198
+\tag@help=\toks19
+\row@=\count199
+\column@=\count266
+\maxfields@=\count267
+\andhelp@=\toks20
+\eqnshift@=\dimen142
+\alignsep@=\dimen143
+\tagshift@=\dimen144
+\tagwidth@=\dimen145
+\totwidth@=\dimen146
+\lineht@=\dimen147
+\@envbody=\toks21
+\multlinegap=\skip50
+\multlinetaggap=\skip51
+\mathdisplay@stack=\toks22
+LaTeX Info: Redefining \[ on input line 2923.
+LaTeX Info: Redefining \] on input line 2924.
+)
+(d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/color.sty
+Package: color 2020/02/24 v1.2b Standard LaTeX Color (DPC)
+
+(d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/color.cfg
+File: color.cfg 2016/01/02 v1.6 sample color configuration
+)
+Package color Info: Driver file: pdftex.def on input line 149.
+
+(d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-def/pdftex.def
+File: pdftex.def 2020/10/05 v1.2a Graphics/color driver for pdftex
+))
+(d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty
+Package: graphicx 2020/12/05 v1.2c Enhanced LaTeX Graphics (DPC,SPQR)
+
+(d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty
+Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
+\KV@toks@=\toks23
+)
+(d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
+Package: graphics 2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR)
+
+(d:/tex/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty
+Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
+)
+(d:/tex/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
+File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
+)
+Package graphics Info: Driver file: pdftex.def on input line 107.
+)
+\Gin@req@height=\dimen148
+\Gin@req@width=\dimen149
+)
+(d:/tex/texlive/2021/texmf-dist/tex/latex/cases/cases.sty
+Package: cases 2020/03/29 ver 3.2
+\numc@numwid=\dimen150
+)
+(d:/tex/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
+File: l3backend-pdftex.def 2021-07-12 L3 backend support: PDF output (pdfTeX)
+\l__color_backend_stack_int=\count268
+\l__pdf_internal_box=\box52
+)
+(./Report.aux)
+\openout1 = `Report.aux'.
+
+LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
+LaTeX Font Info: ... okay on input line 11.
+LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
+LaTeX Font Info: ... okay on input line 11.
+LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
+LaTeX Font Info: ... okay on input line 11.
+LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
+LaTeX Font Info: ... okay on input line 11.
+LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 11.
+LaTeX Font Info: ... okay on input line 11.
+LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
+LaTeX Font Info: ... okay on input line 11.
+LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
+LaTeX Font Info: ... okay on input line 11.
+
+(d:/tex/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
+[Loading MPS to PDF converter (version 2006.09.02).]
+\scratchcounter=\count269
+\scratchdimen=\dimen151
+\scratchbox=\box53
+\nofMPsegments=\count270
+\nofMParguments=\count271
+\everyMPshowfont=\toks24
+\MPscratchCnt=\count272
+\MPscratchDim=\dimen152
+\MPnumerator=\count273
+\makeMPintoPDFobject=\count274
+\everyMPtoPDFconversion=\toks25
+) (d:/tex/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
+Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
+Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
+85.
+
+(d:/tex/texlive/2021/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
+File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
+e
+))
+[1
+
+{d:/tex/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
+(./Report.aux) )
+Here is how much of TeX's memory you used:
+ 1970 strings out of 478542
+ 27827 string characters out of 5852398
+ 327617 words of memory out of 5000000
+ 19918 multiletter control sequences out of 15000+600000
+ 408505 words of font info for 45 fonts, out of 8000000 for 9000
+ 1141 hyphenation exceptions out of 8191
+ 57i,6n,66p,467b,193s stack positions out of 5000i,500n,10000p,200000b,80000s
+
+
+Output written on Report.pdf (1 page, 62087 bytes).
+PDF statistics:
+ 33 PDF objects out of 1000 (max. 8388607)
+ 19 compressed objects within 1 object stream
+ 0 named destinations out of 1000 (max. 500000)
+ 1 words of extra memory for PDF output out of 10000 (max. 10000000)
+
diff --git a/ass2report/Report.pdf b/ass2report/Report.pdf
new file mode 100644
index 0000000..21a984e
Binary files /dev/null and b/ass2report/Report.pdf differ
diff --git a/ass2report/Report.synctex.gz b/ass2report/Report.synctex.gz
new file mode 100644
index 0000000..4e00331
Binary files /dev/null and b/ass2report/Report.synctex.gz differ
diff --git a/ass2report/Report.tex b/ass2report/Report.tex
new file mode 100644
index 0000000..a1380f5
--- /dev/null
+++ b/ass2report/Report.tex
@@ -0,0 +1,30 @@
+\documentclass{article}
+\usepackage[utf8]{inputenc}
+\usepackage{amsmath}
+\usepackage{color}
+\usepackage{graphicx}
+\usepackage{cases}
+\title{CSC3150 Assignment2}
+\author{Yu, Zhouliang 120040077 }
+\date{October 2021}
+
+\begin{document}
+
+\maketitle
+
+
+
+\section{What I Learnt From the task}
+\subsection{-lpthread}
+Q: Why gcc does not link to the pthread by "\#include$<$pthread.h$>$", while we must use "-lpthread"
+to compile the program
+\\
+A:
+
+Having \#include $<$pthread.h$>$ in your code doesn't link in the library; it only includes the header for compilation. That allows the compiler to see the various structures, function declarations, etc. included. Having -lpthread actually causes the linking to be done by the linker. So the include tells the compiler what's available, and the -lpthread actually allows the program to call the functions within the library at runtime.
+\subsection{pthread\_join}
+Q: Why do we use pthread\_join in multiple thread programming
+\\
+A: if your main thread(the thread executed by the main), exits before other threads, then it will cause bugs. With pthread\_join, the main thread is waiting until other thread exit.
+
+\end{document}
\ No newline at end of file