Abstract

This is a program designed for finding the determinant of any matrix.
It uses depth-first search to find the Laplace expansion form of each matrix.

#include<bits/stdc++.h>
using namespace std;
struct mx{
	int m,n;
	int qu[100][100];
};
int det(mx U){
	if(U.m==1){
		return U.qu[1][1];
	}
	if(U.m==2){
		int mid;
		mid=U.qu[1][1]*U.qu[2][2]-U.qu[1][2]*U.qu[2][1];
		return mid;
	}
	if(U.m>=3){
		int allmid=0;
		for(int i=1;i<=U.n;i++){
			mx subU;
			subU.m=U.m-1;
			subU.n=U.n-1;
			int flag=0;
			for(int ii=2;ii<=U.m;ii++){
				flag=0;
				for(int jj=1;jj<=U.n;jj++){	
					if(jj==i)
						continue;
					flag++;
					subU.qu[ii-1][flag]=U.qu[ii][jj];
				}
			}
			if(i%2==0) 
				allmid-=det(subU)*U.qu[1][i];
			else 
				allmid+=det(subU)*U.qu[1][i];
		}
		return allmid;
	}
}
int main(){
	mx A;
	cout<<"Please enter the size of the determinant."<<endl;
	cout<<"Please enter a space between them."<<endl;
	cin>>A.m>>A.n;
	cout<<"Please enter the elements (matrix form)."<<endl;
	for(int i=1;i<=A.m;i++){
		for(int j=1;j<=A.n;j++){
			cin>>A.qu[i][j];
		}
	}
	for(int i=1;i<=A.m;i++){
		cout<<"| ";
		for(int j=1;j<=A.n;j++){
			cout<<A.qu[i][j]<<" ";
		}	
		if(i!=A.m) 
			cout<<"|"<<endl;
		else 
			cout<<"|";	
	} 
	cout<<"  =  ";
	if(A.m!=A.n) cout<<"no result !!!"<<endl;
	else cout<<det(A)<<endl;
	return 0;
}

A confirmatory program about one example from school's mathematical modeling class.
C++.

Read more »

Abstract

I heard about LaTeX from Ben. He told me our school’s previous Calculus 3 teacher stipulated that students in his class must use LaTeX to write their homework. At the beginning of summer vacation, I started to learn some basic knowledge about LaTeX. Thanks to my C++ knowledge, I have learned some of the rudimentary knowledge about LaTeX. However, if some complex demands appear, I could only use it as a Google-based language(LOL). This is my AP Statistics Course Summer Homework. Made by LaTeX, edited by VS code.

Read more »

我有的时候,太过于善良了,这不好。

明天就要考托福了,这个成绩很大程度上决定了这个学期一开始的心态是如何。

我确实要减少使用手机的时间,手机带来了太多的:碎片化的,超前的,无意义的,只会带来紧张焦虑和分心的无意义内容。导致我的不能长时间集中注意力去做一件事情。

我意识到了,我现在的失败是由我内心的浮躁造成的。无法自律,无法持续,无法精心。在各种现代电子平台和设备下迷失在了浮躁的电子流中。 我需要找到我的inner peace