Algorithm/Data Structures (3) 썸네일형 리스트형 ITES #include #include #include using namespace std; const unsigned int FIRST_SIGNAL = 1983; int countK(unsigned int k, unsigned int n); struct RNG { unsigned int seed; RNG() : seed(FIRST_SIGNAL) {} unsigned int next() { unsigned int ret = seed; seed = ((seed * 214013u + 2531011u)); return ret % 10000 + 1; } }; int main() { int caseNum = 0; cin >> caseNum; unsigned int k = 0, n = 0; for (int cIter = .. BRACKETS 2 #include #include #include #include using namespace std; bool IsValid(const string str); bool IsOpenSymbol(const char target); bool IsSymmetric(const char source, const char target); int main() { int caseNum = 0; cin >> caseNum; cin.ignore(); for (int cIter = 0; cIter < caseNum; cIter++) { string brackets; std::getline(std::cin, brackets); // Process if (IsValid(brackets)) cout JOSEPHUS #include #include using namespace std; int n = 0, k = 0; void josephus(list &survivors); int main() { int caseNum = 0; cin >> caseNum; for (int cIter = 0; cIter > n >> k; // Initalize list survivors; for (int i = 1; i 이전 1 다음