알고리즘
2021. 10. 4.
<C++ 알고리즘> 진부분집합 구하기
A가 B에 진부분집합인지를 판단하는 함수 정의 #include #include using namespace std; // 배열을 활용 const bool IsProperSubsetOf(const int* ArrSrc, const int SrcSize, const int* ArrDest, const int DestSize, int& Iter) { // 예외처리(DestSize가 SrcSize보다 작다면) if (DestSize < SrcSize) return false; for (int i = 0; i static_cast(SrcSize)) return true; return false; } // 출력 함수 void printIsProperSubsetOf(const int* ArrSrc, const int..