<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>패션왕 신해빈 Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<atom:link href="https://lycos7560.com/tag/%ED%8C%A8%EC%85%98%EC%99%95-%EC%8B%A0%ED%95%B4%EB%B9%88/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Wed, 22 Feb 2023 23:51:36 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://lycos7560.com/wp-content/uploads/2022/11/cropped-cropped-cropped-log-1-150x150-1-80x80.png</url>
	<title>패션왕 신해빈 Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>백준 9375번 (패션왕 신해빈, C++) [BAEKJOON]</title>
		<link>https://lycos7560.com/cpp/baekjoon_online_judge/%eb%b0%b1%ec%a4%80-9375%eb%b2%88-%ed%8c%a8%ec%85%98%ec%99%95-%ec%8b%a0%ed%95%b4%eb%b9%88-c-baekjoon/6032/</link>
					<comments>https://lycos7560.com/cpp/baekjoon_online_judge/%eb%b0%b1%ec%a4%80-9375%eb%b2%88-%ed%8c%a8%ec%85%98%ec%99%95-%ec%8b%a0%ed%95%b4%eb%b9%88-c-baekjoon/6032/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Mon, 06 Feb 2023 08:56:52 +0000</pubDate>
				<category><![CDATA[BaekjoonOnlineJudge]]></category>
		<category><![CDATA[C++/CPP]]></category>
		<category><![CDATA[9375]]></category>
		<category><![CDATA[9375번]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[Baekjoon]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[cin]]></category>
		<category><![CDATA[cin.tie(NULL)]]></category>
		<category><![CDATA[Combination]]></category>
		<category><![CDATA[cout]]></category>
		<category><![CDATA[cout.tie(NULL)]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[ios_base::sync_with_stdio(false)]]></category>
		<category><![CDATA[ios_base::sync_with_stdio(false);]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[unordered map]]></category>
		<category><![CDATA[값]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[기본]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[맵]]></category>
		<category><![CDATA[백준]]></category>
		<category><![CDATA[백준 9375]]></category>
		<category><![CDATA[백준 9375번]]></category>
		<category><![CDATA[수학]]></category>
		<category><![CDATA[알고리즘]]></category>
		<category><![CDATA[자료구조]]></category>
		<category><![CDATA[조합]]></category>
		<category><![CDATA[조합론]]></category>
		<category><![CDATA[집합]]></category>
		<category><![CDATA[코딩테스트]]></category>
		<category><![CDATA[코테]]></category>
		<category><![CDATA[패션왕 신해빈]]></category>
		<category><![CDATA[해시를 사용한 집합과 맵]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=6032</guid>

					<description><![CDATA[<p>백준(BAEKJOON) 9375번 "패션왕 신해빈" 문제에 대한 글입니다. 'unsorted map' 자료구조를 이용하여 해결하였습니다. (This is an article on the issue of "Fashion King Shin Hae-bin" in BAEKJOON No. 9375 . We solved it using the 'unsorted map' data structure.)</p>
<p>The post <a href="https://lycos7560.com/cpp/baekjoon_online_judge/%eb%b0%b1%ec%a4%80-9375%eb%b2%88-%ed%8c%a8%ec%85%98%ec%99%95-%ec%8b%a0%ed%95%b4%eb%b9%88-c-baekjoon/6032/">백준 9375번 (패션왕 신해빈, C++) [BAEKJOON]</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5698326622209671" crossorigin="anonymous"></script>
<!-- HorizontalAD -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5698326622209671" data-ad-slot="6908948342" data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>


				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-304e0eb5      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차 테이블						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#패션왕-신해빈" class="uagb-toc-link__trigger">패션왕 신해빈</a><li class="uagb-toc__list"><a href="#접근-방법" class="uagb-toc-link__trigger">접근 방법</a><li class="uagb-toc__list"><a href="#통과된-코드" class="uagb-toc-link__trigger">통과된 코드</a></ol>					</div>
									</div>
				</div>
			


<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h1 class="wp-block-heading">패션왕 신해빈</h1>



<p class="has-medium-font-size"><a href="https://www.acmicpc.net/problem/9375" target="_blank" rel="noreferrer noopener">https://www.acmicpc.net/problem/9375</a></p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<figure id="problem-info" class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th class="has-text-align-left" data-align="left">시간 제한</th><th class="has-text-align-left" data-align="left">메모리 제한</th><th class="has-text-align-left" data-align="left">제출</th><th class="has-text-align-left" data-align="left">정답</th><th class="has-text-align-left" data-align="left">맞힌 사람</th><th class="has-text-align-left" data-align="left">정답 비율</th></tr></thead><tbody><tr><td class="has-text-align-left" data-align="left">1 초</td><td class="has-text-align-left" data-align="left">128 MB</td><td class="has-text-align-left" data-align="left">27013</td><td class="has-text-align-left" data-align="left">14762</td><td class="has-text-align-left" data-align="left">12643</td><td class="has-text-align-left" data-align="left">54.824%</td></tr></tbody></table></figure>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">문제</h2>



<p class="has-medium-font-size">해빈이는 패션에 매우 민감해서 한번 입었던 옷들의 조합을 절대 다시 입지 않는다. </p>



<p class="has-medium-font-size">예를 들어 오늘 해빈이가 안경, 코트, 상의, 신발을 입었다면, </p>



<p class="has-medium-font-size">다음날은 바지를 추가로 입거나 안경대신 렌즈를 착용하거나 해야한다. </p>



<p class="has-medium-font-size">해빈이가 가진 의상들이 주어졌을때 과연 해빈이는 알몸이 아닌 상태로 며칠동안 밖에 돌아다닐 수 있을까?</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">입력</h2>



<p class="has-medium-font-size">첫째 줄에 테스트 케이스가 주어진다. 테스트 케이스는 최대 100이다.</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size">각 테스트 케이스의 첫째 줄에는 해빈이가 가진 의상의 수 n(0 ≤ n ≤ 30)이&nbsp;주어진다.</p>



<p class="has-medium-font-size">다음 n개에는 해빈이가 가진&nbsp;의상의 이름과 의상의 종류가 공백으로 구분되어 주어진다. </p>



<p class="has-medium-font-size">같은 종류의 의상은 하나만 입을 수 있다.</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="has-medium-font-size">모든 문자열은 1이상 20이하의 알파벳 소문자로 이루어져있으며 같은 이름을 가진 의상은 존재하지 않는다.</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">출력</h2>



<p class="has-medium-font-size">각 테스트 케이스에 대해 해빈이가 알몸이 아닌 상태로 의상을 입을 수 있는 경우를 출력하시오.</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">예제 입력 1</h2>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">2
3
hat headgear
sunglasses eyewear
turban headgear
3
mask face
sunglasses face
makeup face</pre>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">예제 출력 1</h2>



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">5
3</pre>



<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">힌트</h2>



<p class="has-medium-font-size">첫 번째 테스트 케이스는 headgear에 해당하는 의상이 hat, turban이며 </p>



<p class="has-medium-font-size">eyewear에 해당하는 의상이 sunglasses이므로 &nbsp;</p>



<p class="has-medium-font-size">(hat), (turban), (sunglasses), (hat,sunglasses), (turban,sunglasses)로 총 5가지 이다.</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">출처</h2>



<p><a href="https://www.acmicpc.net/category/1" target="_blank" rel="noreferrer noopener">ICPC</a>&nbsp;&gt;&nbsp;<a href="https://www.acmicpc.net/category/7" target="_blank" rel="noreferrer noopener">Regionals</a>&nbsp;&gt;&nbsp;<a href="https://www.acmicpc.net/category/10" target="_blank" rel="noreferrer noopener">Europe</a>&nbsp;&gt;&nbsp;<a href="https://www.acmicpc.net/category/15" target="_blank" rel="noreferrer noopener">Northwestern European Regional Contest</a>&nbsp;&gt;&nbsp;<a href="https://www.acmicpc.net/category/89" target="_blank" rel="noreferrer noopener">Benelux Algorithm Programming Contest</a>&nbsp;&gt;&nbsp;<a href="https://www.acmicpc.net/category/detail/1160" target="_blank" rel="noreferrer noopener">BAPC 2013</a>&nbsp;I번</p>



<ul class="wp-block-list">
<li>문제를 번역한 사람:&nbsp;<a href="https://www.acmicpc.net/user/lll4592" target="_blank" rel="noreferrer noopener">lll4592</a></li>



<li>문제의 오타를 찾은 사람:&nbsp;<a href="https://www.acmicpc.net/user/sunsal0704" target="_blank" rel="noreferrer noopener">sunsal0704</a></li>
</ul>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">알고리즘 분류</h2>



<ul class="wp-block-list">
<li><a href="https://www.acmicpc.net/problem/tag/124" target="_blank" rel="noreferrer noopener">수학</a></li>



<li><a href="https://www.acmicpc.net/problem/tag/175" target="_blank" rel="noreferrer noopener">자료 구조</a></li>



<li><a href="https://www.acmicpc.net/problem/tag/6" target="_blank" rel="noreferrer noopener">조합론</a></li>



<li><a href="https://www.acmicpc.net/problem/tag/136" target="_blank" rel="noreferrer noopener">해시를 사용한 집합과 맵</a></li>
</ul>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide" style="margin-top:var(--wp--preset--spacing--80);margin-bottom:var(--wp--preset--spacing--80)"/>



<h1 class="wp-block-heading">접근 방법</h1>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1600" height="1455" src="https://lycos7560.com/wp-content/uploads/2023/02/KakaoTalk_20230206_174945505.jpg" alt="" class="wp-image-6038" srcset="https://lycos7560.com/wp-content/uploads/2023/02/KakaoTalk_20230206_174945505.jpg 1600w, https://lycos7560.com/wp-content/uploads/2023/02/KakaoTalk_20230206_174945505-300x273.jpg 300w, https://lycos7560.com/wp-content/uploads/2023/02/KakaoTalk_20230206_174945505-768x698.jpg 768w, https://lycos7560.com/wp-content/uploads/2023/02/KakaoTalk_20230206_174945505-1536x1397.jpg 1536w" sizes="(max-width: 1600px) 100vw, 1600px" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h1 class="wp-block-heading">통과된 코드</h1>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">#include &lt;iostream>
#include &lt;unordered_map>

using namespace std;

unordered_map&lt;string, int> myMap;

int T , N, result;

string tempO, tempT;

// 조합 n C r 을 계산하는 함수
int Combination(int n, int r)
{
	if (n == r || r == 0) return 1;
	else return Combination(n - 1, r - 1) + Combination(n - 1, r);
}

int main()
{
	ios_base::sync_with_stdio(false); // scanf와 동기화를 비활성화
	//cin.tie(null); 코드는 cin과 cout의 묶음을 풀어줍니다.
	cin.tie(NULL);
	std::cout.tie(NULL);

	cin >> T;

	while (T--) {

		myMap.clear();

		cin >> N;

		while (N--) {

			cin >> tempO >> tempT;

			auto it = myMap.find(tempT);
			
			// 만약 map에 있다면 개수를 + 1
			// 없다면 개수를 1로 새로 넣어준다.
			if (it != myMap.end()) it->second++;
			else myMap.insert(make_pair(tempT, 1));
			
		}

		result = 1;

		for (auto it = myMap.begin(); it != myMap.end(); it++) {
			result *= Combination(it->second + 1, 1); // 아무것도 뽑지 않는다 하나 추가
		}

		cout &lt;&lt; result - 1 &lt;&lt; "\n"; // 모든 의상의 종류를 안뽑는다는 경우를 뺴준다.

	}

	return 0;
}</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="1035" height="94" src="https://lycos7560.com/wp-content/uploads/2023/02/image-36.png" alt="" class="wp-image-6039" srcset="https://lycos7560.com/wp-content/uploads/2023/02/image-36.png 1035w, https://lycos7560.com/wp-content/uploads/2023/02/image-36-300x27.png 300w, https://lycos7560.com/wp-content/uploads/2023/02/image-36-768x70.png 768w" sizes="(max-width: 1035px) 100vw, 1035px" /></figure>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5698326622209671" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5698326622209671" data-ad-slot="4245812909"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
<p>The post <a href="https://lycos7560.com/cpp/baekjoon_online_judge/%eb%b0%b1%ec%a4%80-9375%eb%b2%88-%ed%8c%a8%ec%85%98%ec%99%95-%ec%8b%a0%ed%95%b4%eb%b9%88-c-baekjoon/6032/">백준 9375번 (패션왕 신해빈, C++) [BAEKJOON]</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/cpp/baekjoon_online_judge/%eb%b0%b1%ec%a4%80-9375%eb%b2%88-%ed%8c%a8%ec%85%98%ec%99%95-%ec%8b%a0%ed%95%b4%eb%b9%88-c-baekjoon/6032/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
