<?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>cogwheel Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<atom:link href="https://lycos7560.com/tag/cogwheel/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Thu, 23 Feb 2023 00:13:01 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://lycos7560.com/wp-content/uploads/2022/11/cropped-cropped-cropped-log-1-150x150-1-80x80.png</url>
	<title>cogwheel Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>백준 14891번 (톱니바퀴, C++, Simulation) / 추가 반례 [BAEKJOON]</title>
		<link>https://lycos7560.com/cpp/baekjoon_online_judge/baekjoon-14891-cog-c-simulation/3552/</link>
					<comments>https://lycos7560.com/cpp/baekjoon_online_judge/baekjoon-14891-cog-c-simulation/3552/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Sat, 24 Dec 2022 09:35:46 +0000</pubDate>
				<category><![CDATA[BaekjoonOnlineJudge]]></category>
		<category><![CDATA[C++/CPP]]></category>
		<category><![CDATA[14891]]></category>
		<category><![CDATA[14891번]]></category>
		<category><![CDATA[Baekjoon]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[cogwheel]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[구현]]></category>
		<category><![CDATA[반례]]></category>
		<category><![CDATA[백준]]></category>
		<category><![CDATA[백준 14891]]></category>
		<category><![CDATA[백준 14891번]]></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=3552</guid>

					<description><![CDATA[<p>백준(BAEKJOON) 14891번 톱니바퀴 문제에 대한 글입니다. 추가적인 반례도 제시합니다. (Baekjun (BAEKJOON) #14891 This article is about the cog problem. It also provides additional counter-examples.)</p>
<p>The post <a href="https://lycos7560.com/cpp/baekjoon_online_judge/baekjoon-14891-cog-c-simulation/3552/">백준 14891번 (톱니바퀴, C++, Simulation) / 추가 반례 [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>
<ins class="adsbygoogle"
     style="display:block; text-align:center;"
     data-ad-layout="in-article"
     data-ad-format="fluid"
     data-ad-client="ca-pub-5698326622209671"
     data-ad-slot="5078714126"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>



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



<h1 class="wp-block-heading">톱니바퀴</h1>



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



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



<figure id="problem-info" class="wp-block-table"><table><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">2 초</td><td class="has-text-align-left" data-align="left">512 MB</td><td class="has-text-align-left" data-align="left">29206</td><td class="has-text-align-left" data-align="left">15688</td><td class="has-text-align-left" data-align="left">11469</td><td class="has-text-align-left" data-align="left">54.325%</td></tr></tbody></table></figure>



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



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



<p class="has-medium-font-size wp-block-paragraph">총 8개의 톱니를 가지고 있는 톱니바퀴 4개가 아래 그림과 같이 일렬로 놓여져 있다. </p>



<p class="has-medium-font-size wp-block-paragraph">또,&nbsp;톱니는 N극 또는 S극 중 하나를 나타내고 있다. </p>



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴에는 번호가 매겨져 있는데, 가장 왼쪽 톱니바퀴가 1번, 그 오른쪽은 2번, 그 오른쪽은 3번, 가장 오른쪽 톱니바퀴는 4번이다.</p>



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



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1105" height="221" src="https://lycos7560.com/wp-content/uploads/image-743.png" alt="" class="wp-image-3554" srcset="https://lycos7560.com/wp-content/uploads/image-743.png 1105w, https://lycos7560.com/wp-content/uploads/image-743-300x60.png 300w, https://lycos7560.com/wp-content/uploads/image-743-768x154.png 768w" sizes="(max-width: 1105px) 100vw, 1105px" /></figure>



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



<p class="has-medium-font-size wp-block-paragraph">이때, 톱니바퀴를 총 K번 회전시키려고 한다. </p>



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴의 회전은 한 칸을 기준으로 한다. </p>



<p class="has-medium-font-size wp-block-paragraph">회전은 시계 방향과 반시계 방향이 있고, 아래 그림과 같이 회전한다.</p>



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



<figure class="wp-block-image size-full"><img decoding="async" width="1141" height="530" src="https://lycos7560.com/wp-content/uploads/image-744.png" alt="" class="wp-image-3555" srcset="https://lycos7560.com/wp-content/uploads/image-744.png 1141w, https://lycos7560.com/wp-content/uploads/image-744-300x139.png 300w, https://lycos7560.com/wp-content/uploads/image-744-768x357.png 768w" sizes="(max-width: 1141px) 100vw, 1141px" /></figure>



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



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴를 회전시키려면, 회전시킬 톱니바퀴와&nbsp;회전시킬 방향을 결정해야 한다. </p>



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴가 회전할 때, 서로 맞닿은 극에 따라서 옆에 있는 톱니바퀴를 회전시킬 수도 있고, 회전시키지 않을 수도 있다. </p>



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴 A를 회전할 때, 그 옆에 있는 톱니바퀴 B와 서로 맞닿은 톱니의 극이 다르다면, B는 A가 회전한 방향과 반대방향으로 회전하게 된다. </p>



<p class="has-medium-font-size wp-block-paragraph">예를 들어, 아래와 같은 경우를 살펴보자.</p>



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



<figure class="wp-block-image size-full"><img decoding="async" width="1145" height="243" src="https://lycos7560.com/wp-content/uploads/image-745.png" alt="" class="wp-image-3556" srcset="https://lycos7560.com/wp-content/uploads/image-745.png 1145w, https://lycos7560.com/wp-content/uploads/image-745-300x64.png 300w, https://lycos7560.com/wp-content/uploads/image-745-768x163.png 768w" sizes="(max-width: 1145px) 100vw, 1145px" /></figure>



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



<p class="has-medium-font-size wp-block-paragraph">두 톱니바퀴의 맞닿은 부분은 초록색 점선으로 묶여있는 부분이다. </p>



<p class="has-medium-font-size wp-block-paragraph">여기서, 3번 톱니바퀴를&nbsp;반시계 방향으로 회전했다면, 4번 톱니바퀴는 시계 방향으로 회전하게 된다. </p>



<p class="has-medium-font-size wp-block-paragraph">2번 톱니바퀴는 맞닿은 부분이 S극으로 서로 같기 때문에, 회전하지 않게 되고, 1번 톱니바퀴는 2번이 회전하지 않았기 때문에, 회전하지 않게 된다. </p>



<p class="has-medium-font-size wp-block-paragraph">따라서, 아래 그림과 같은 모양을 만들게 된다.</p>



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



<figure class="wp-block-image size-full"><img decoding="async" width="1146" height="244" src="https://lycos7560.com/wp-content/uploads/image-746.png" alt="" class="wp-image-3557" srcset="https://lycos7560.com/wp-content/uploads/image-746.png 1146w, https://lycos7560.com/wp-content/uploads/image-746-300x64.png 300w, https://lycos7560.com/wp-content/uploads/image-746-768x164.png 768w" sizes="(max-width: 1146px) 100vw, 1146px" /></figure>



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



<p class="has-medium-font-size wp-block-paragraph">위와 같은&nbsp;상태에서 1번 톱니바퀴를 시계 방향으로 회전시키면, 2번 톱니바퀴가 반시계 방향으로 회전하게 되고, 2번이 회전하기 때문에, 3번도 동시에 시계 방향으로 회전하게 된다. </p>



<p class="has-medium-font-size wp-block-paragraph">4번은 3번이 회전하지만, 맞닿은 극이 같기 때문에 회전하지 않는다. 따라서, 아래와 같은 상태가 된다.</p>



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



<figure class="wp-block-image size-full"><img decoding="async" width="1157" height="237" src="https://lycos7560.com/wp-content/uploads/image-747.png" alt="" class="wp-image-3558" srcset="https://lycos7560.com/wp-content/uploads/image-747.png 1157w, https://lycos7560.com/wp-content/uploads/image-747-300x61.png 300w, https://lycos7560.com/wp-content/uploads/image-747-768x157.png 768w" sizes="(max-width: 1157px) 100vw, 1157px" /></figure>



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



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴의 초기 상태와 톱니바퀴를 회전시킨 방법이 주어졌을 때, 최종 톱니바퀴의 상태를 구하는 프로그램을 작성하시오.</p>



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



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



<p class="has-medium-font-size wp-block-paragraph">첫째 줄에 1번 톱니바퀴의 상태, 둘째 줄에 2번 톱니바퀴의 상태, 셋째 줄에 3번 톱니바퀴의 상태, 넷째 줄에 4번 톱니바퀴의 상태가 주어진다. </p>



<p class="has-medium-font-size wp-block-paragraph">상태는 8개의 정수로 이루어져 있고, 12시방향부터 시계방향 순서대로 주어진다. N극은 0, S극은 1로 나타나있다.</p>



<p class="has-medium-font-size wp-block-paragraph">다섯째 줄에는 회전 횟수 K(1 ≤ K ≤ 100)가 주어진다. </p>



<p class="has-medium-font-size wp-block-paragraph">다음 K개 줄에는 회전시킨 방법이 순서대로 주어진다. </p>



<p class="has-medium-font-size wp-block-paragraph">각 방법은 두 개의 정수로 이루어져 있고, 첫 번째 정수는 회전시킨 톱니바퀴의 번호, 두 번째 정수는 방향이다. </p>



<p class="has-medium-font-size wp-block-paragraph">방향이 1인 경우는 시계 방향이고, -1인 경우는 반시계 방향이다.</p>



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



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



<p class="has-medium-font-size wp-block-paragraph">총 K번 회전시킨 이후에 네 톱니바퀴의 점수의 합을&nbsp;출력한다. 점수란 다음과 같이 계산한다.</p>



<p class="has-medium-font-size wp-block-paragraph">1번 톱니바퀴의 12시방향이 N극이면 0점, S극이면 1점<br>2번 톱니바퀴의 12시방향이 N극이면 0점, S극이면 2점<br>3번 톱니바퀴의 12시방향이 N극이면 0점, S극이면 4점<br>4번 톱니바퀴의 12시방향이 N극이면 0점, S극이면 8점</p>



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



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



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



<div style="height:47px" 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/102" target="_blank" rel="noreferrer noopener">구현</a></li>



<li><a href="https://www.acmicpc.net/problem/tag/141" target="_blank" rel="noreferrer noopener">시뮬레이션</a></li>
</ul>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">10101111
01111101
11001110
00000010
2
3 -1
1 1</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">7</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">11111111
11111111
11111111
11111111
3
1 1
2 1
3 1</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">15</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">10001011
10000011
01011011
00111101
5
1 1
2 1
3 1
4 1
1 -1</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">6</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">10010011
01010011
11100011
01010101
8
1 1
2 1
3 1
4 1
1 -1
2 -1
3 -1
4 -1</pre>



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



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



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



<div style="height:55px" 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:67px" aria-hidden="true" class="wp-block-spacer"></div>



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">11111110
00000000
11111111
11111111
1
2 -1</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">12</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">11001110
10000101
01111110
01101111
4
2 -1
2 -1
2 1
2 1</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">10</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">01000100
00100010
01000100
00100010
2
2 -1
3 -1</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">0</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">01010101
10100010
11010101
00101010
6
3 -1
1 1
2 1
2 1
1 1
4 -1</pre>



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



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



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">7</pre>



<div style="height:55px" 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)"/>



<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>



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



<h2 class="wp-block-heading">입력 확인 코드</h2>



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴의 상태는 string 배열을 이용하여 구현</p>



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴의 회전은 List&lt;int, int&gt; 에 저장하여 처리할 예정 </p>



<p class="has-medium-font-size wp-block-paragraph">first : 톱니바퀴의 번호, second : 톱니바퀴가 회전하는 방향</p>



<p class="has-medium-font-size wp-block-paragraph">1 -&gt; 시계 </p>



<p class="has-medium-font-size wp-block-paragraph">-1 -&gt; 반시계</p>



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



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



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

using namespace std;

// 톱니바퀴의 회전 횟수
int N, tempOne, tempTwo;

list&lt;pair&lt;int, int>> rotationList;
list&lt;pair&lt;int, int>>::iterator iter;

// 톱니 바퀴의 톱니
string cogWheel[4];

bool debug = true;

void DebugPrint()
{
	cout &lt;&lt; "\n" &lt;&lt; "입력받은 톱니바퀴의 상태" &lt;&lt; "\n";
	for (int i = 0; i &lt; 4; i++) {
		cout &lt;&lt; cogWheel[i] &lt;&lt; "\n";
	}
	cout &lt;&lt; "\n" &lt;&lt; "톱니바퀴의 회전" &lt;&lt; "\n";
	for (iter = rotationList.begin(); iter != rotationList.end(); iter++) {
	cout &lt;&lt; "iter->first : " &lt;&lt; iter->first &lt;&lt; " iter->second : " &lt;&lt; iter->second  &lt;&lt; "\n";
	}

}

void GetInput()
{
	for (int i = 0; i &lt; 4; i++) {
		cin >> cogWheel[i];
	}
	cin >> N;

	// 톱니바퀴의 회전수 만큼 입력을 받습니다.
	while (N > 0) {
		cin >> tempOne >> tempTwo;
		rotationList.push_back(make_pair(tempOne, tempTwo));
		N--;
	}
}

int main()
{
	GetInput();
	if (debug) { DebugPrint(); }
	return 0;
}</pre>



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



<figure class="wp-block-image size-full"><img decoding="async" width="1339" height="456" src="https://lycos7560.com/wp-content/uploads/image-748.png" alt="" class="wp-image-3561" srcset="https://lycos7560.com/wp-content/uploads/image-748.png 1339w, https://lycos7560.com/wp-content/uploads/image-748-300x102.png 300w, https://lycos7560.com/wp-content/uploads/image-748-768x262.png 768w" sizes="(max-width: 1339px) 100vw, 1339px" /></figure>



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



<h2 class="wp-block-heading">톱니바퀴의 회전 구현</h2>



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴는 String으로 구현되어 있다</p>



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴가 시계방향으로 회전할 경우 string의 마지막 인덱스를 0번 인덱스로 바꾸어주고 나머지는 인덱스 +1</p>



<p class="has-medium-font-size wp-block-paragraph">톱니바퀴가 시계방향으로 회전할 경우 string의 마지막 인덱스를 7번 인덱스로 바꾸어주고 나머지는 인덱스 -1</p>



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



<figure class="wp-block-image size-full"><img decoding="async" width="861" height="424" src="https://lycos7560.com/wp-content/uploads/image-753.png" alt="" class="wp-image-3576" srcset="https://lycos7560.com/wp-content/uploads/image-753.png 861w, https://lycos7560.com/wp-content/uploads/image-753-300x148.png 300w, https://lycos7560.com/wp-content/uploads/image-753-768x378.png 768w" sizes="(max-width: 861px) 100vw, 861px" /></figure>



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



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

using namespace std;

// 톱니바퀴의 회전 횟수
int N, tempOne, tempTwo;

list&lt;pair&lt;int, int>> rotationList;
list&lt;pair&lt;int, int>>::iterator iter;

// 톱니 바퀴의 톱니
string cogWheel[4];

bool debug = true;

void DebugPrint()
{
	cout &lt;&lt; "\n" &lt;&lt; "회전 후 입력받은 톱니바퀴의 상태" &lt;&lt; "\n";
	for (int i = 0; i &lt; 4; i++) {
		cout &lt;&lt; cogWheel[i] &lt;&lt; "\n";
	}
}

void GetInput()
{
	for (int i = 0; i &lt; 4; i++) {
		cin >> cogWheel[i];
	}
	cin >> N;

	// 톱니바퀴의 회전수 만큼 입력을 받습니다.
	while (N > 0) {
		cin >> tempOne >> tempTwo;
		rotationList.push_back(make_pair(tempOne, tempTwo));
		N--;
	}
}

void CogwheelRotation(int number, int dir)
{
	string tempString;
	// 톱니를 시계 방향으로 회전
	if (dir == 1) {
		tempString.push_back(cogWheel[number - 1][7]);
		for (int i = 0; i &lt; 7; i++) {
			tempString.push_back(cogWheel[number - 1][i]);
		}
		if (debug) { cout &lt;&lt; number &lt;&lt; "번 톱니 " &lt;&lt; "시계 방향 회전 : " &lt;&lt; cogWheel[number - 1] &lt;&lt; " -> "; }
		cogWheel[number - 1] = tempString;
		if (debug) { cout &lt;&lt; tempString &lt;&lt; "\n"; }
	}
	else { 	// 톱니를 반시계 방향으로 회전
		for (int i = 1; i &lt; 8; i++) {
			tempString.push_back(cogWheel[number - 1][i]);
		}

		tempString.push_back(cogWheel[number - 1][0]);
		if (debug) { cout &lt;&lt; number &lt;&lt; "번 톱니 " &lt;&lt; "반시계 방향 회전: "  &lt;&lt; cogWheel[number - 1] &lt;&lt; " -> "; }
		cogWheel[number - 1] = tempString;
		if (debug) { cout &lt;&lt; tempString &lt;&lt; "\n"; }
	}
}

int main()
{
	GetInput();
	for (iter = rotationList.begin(); iter != rotationList.end(); iter++) {
		CogwheelRotation(iter->first, iter->second);
	}
	if (debug) { DebugPrint(); }
	return 0;
}</pre>



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



<figure class="wp-block-image size-full"><img decoding="async" width="1375" height="470" src="https://lycos7560.com/wp-content/uploads/image-750.png" alt="" class="wp-image-3570" srcset="https://lycos7560.com/wp-content/uploads/image-750.png 1375w, https://lycos7560.com/wp-content/uploads/image-750-300x103.png 300w, https://lycos7560.com/wp-content/uploads/image-750-768x263.png 768w" sizes="(max-width: 1375px) 100vw, 1375px" /></figure>



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



<h2 class="wp-block-heading">톱니의 상호작용 구현</h2>



<p class="has-medium-font-size wp-block-paragraph">해당 톱니를 회전시킨 후 </p>



<p class="has-medium-font-size wp-block-paragraph">우측은 회전한 톱니의 2번 인덱스와 우측 톱니의 6번 인덱스를 비교 -&gt; 극이 같다면 정지 / 다르다면 회전 방향과 반대로 회전</p>



<p class="has-medium-font-size wp-block-paragraph">좌측은 회전한 톱니의 6번 인덱스와 우측 톱니의 2번 인덱스를 비교 -&gt; 극이 같다면 정지 / 다르다면 회전 방향과 반대로 회전 </p>



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



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

using namespace std;

// 톱니바퀴의 회전 횟수
int N, tempOne, tempTwo;

list&lt;pair&lt;int, int>> rotationList;
list&lt;pair&lt;int, int>>::iterator iter;

// 톱니 바퀴의 톱니
string cogWheel[4];

bool check[3];

bool debug = false;

int score = 0;

void DebugPrint()
{
	cout &lt;&lt; "\n" &lt;&lt; "톱니바퀴의 상태" &lt;&lt; "\n";
	for (int i = 0; i &lt; 4; i++) {
		cout &lt;&lt; cogWheel[i] &lt;&lt; "\n";
	}
	cout &lt;&lt; "\n";
}

void GetInput()
{
	for (int i = 0; i &lt; 4; i++) {
		cin >> cogWheel[i];
	}
	cin >> N;

	// 톱니바퀴의 회전수 만큼 입력을 받습니다.
	while (N > 0) {
		cin >> tempOne >> tempTwo;
		rotationList.push_back(make_pair(tempOne, tempTwo));
		N--;
	}
}

void CogwheelRotation(int number, int dir)
{
	string tempString;

	// 톱니를 시계 방향으로 회전
	if (dir == 1) {
		tempString.push_back(cogWheel[number - 1][7]);
		for (int i = 0; i &lt; 7; i++) {
			tempString.push_back(cogWheel[number - 1][i]);
		}
		if (debug) { cout &lt;&lt; number &lt;&lt; "번 톱니 " &lt;&lt; "시계 방향 회전 : " &lt;&lt; cogWheel[number - 1] &lt;&lt; " -> "; }
		cogWheel[number - 1] = tempString;
		if (debug) { cout &lt;&lt; tempString &lt;&lt; "\n"; }
	}
	else { 	// 톱니를 반시계 방향으로 회전
		for (int i = 1; i &lt; 8; i++) {
			tempString.push_back(cogWheel[number - 1][i]);
		}

		tempString.push_back(cogWheel[number - 1][0]);
		if (debug) { cout &lt;&lt; number &lt;&lt; "번 톱니 " &lt;&lt; "반시계 방향 회전: " &lt;&lt; cogWheel[number - 1] &lt;&lt; " -> "; }
		cogWheel[number - 1] = tempString;
		if (debug) { cout &lt;&lt; tempString &lt;&lt; "\n"; }
	}

}

void RotationCheck(int number, int dir)
{
	for (int i = 0; i &lt; 3; i++) {
		cogWheel[i + 1][6] != cogWheel[i][2] ? check[i] = true : check[i] = false;
	}

	CogwheelRotation(number, dir);

	if (debug) { DebugPrint(); }
	if (debug) { cout &lt;&lt; "상호작용 시작" &lt;&lt; "\n"; }

	switch (number)
	{
		case 1:
			for (int i = 0; i &lt; 3; i++) {
				if (check[i]) { CogwheelRotation(i + 2, dir * pow(-1, i + 1)); }
				else { break; }
			}

			break;

		case 2:
			for (int i = 1; i &lt; 3; i++) {
				if (check[i]) {
					CogwheelRotation(i + 2, dir * pow(-1, i)); }
				else { break; }
			}

			if (check[0]) { CogwheelRotation(1, -dir); }
			break;

		case 3:
			for (int i = 1; i >= 0; i--) {
				if (check[i]) {
					CogwheelRotation(i + 1, dir * pow(-1, i));
				}
				else { break; }
			}
			if (check[2]) { CogwheelRotation(4, -dir); }
			break;

		case 4:
			for (int i = 2; i >= 0; i--) {
				if (check[i]) {
					CogwheelRotation(i + 1, dir * pow(-1, i + 1));
				}
				else { break; }
			}
			break;
	}
}

// 점수를 계산하는 함수
void ScoreCalculation()
{
	for (int i = 0; i &lt; 4; i++) {
		if (cogWheel[i][0] == '1') { score += pow(2, i); }
	}
}

int main()
{
	GetInput();
	for (iter = rotationList.begin(); iter != rotationList.end(); iter++) {
		RotationCheck(iter->first, iter->second);
		if (debug) { DebugPrint(); }
	}

	ScoreCalculation();

	if (debug) { DebugPrint(); }

	cout &lt;&lt; score;

	return 0;
}</pre>



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



<h2 class="wp-block-heading">로직 오류</h2>



<p class="has-medium-font-size wp-block-paragraph">코드를 작성하면서 문제를 다시 살펴보는데 구현이 틀렸다.</p>



<p class="has-medium-font-size wp-block-paragraph">톱니가 회전한 후에 만나는 톱니의 극을 비교하는 것이 아닌 회전하기 전에 미리 회전시킬 톱니를 체크를 해야 한다. </p>



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



<figure class="wp-block-image size-full"><img decoding="async" width="669" height="160" src="https://lycos7560.com/wp-content/uploads/image-752.png" alt="" class="wp-image-3575" srcset="https://lycos7560.com/wp-content/uploads/image-752.png 669w, https://lycos7560.com/wp-content/uploads/image-752-300x72.png 300w" sizes="(max-width: 669px) 100vw, 669px" /></figure>



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



<h2 class="wp-block-heading">예제 3번 디버깅</h2>



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



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">10001011
10000011
01011011
00111101
5
1 1
2 1
3 1
4 1
1 -1

문제의 톱니바퀴 회전
1번 톱니 시계 방향 회전 : 10001011 -> 11000101

톱니바퀴의 상태
11000101
10000011
01011011
00111101

상호작용 시작
2번 톱니 반시계 방향 회전: 10000011 -> 00000111
3번 톱니 시계 방향 회전 : 01011011 -> 10101101

톱니바퀴의 상태
11000101
00000111
10101101
00111101

문제의 톱니바퀴 회전
2번 톱니 시계 방향 회전 : 00000111 -> 10000011

톱니바퀴의 상태
11000101
10000011
10101101
00111101

상호작용 시작
1번 톱니 반시계 방향 회전: 11000101 -> 10001011

톱니바퀴의 상태
10001011
10000011
10101101
00111101

문제의 톱니바퀴 회전
3번 톱니 시계 방향 회전 : 10101101 -> 11010110

톱니바퀴의 상태
10001011
10000011
11010110
00111101

상호작용 시작
4번 톱니 반시계 방향 회전: 00111101 -> 01111010

톱니바퀴의 상태
10001011
10000011
11010110
01111010

문제의 톱니바퀴 회전
4번 톱니 시계 방향 회전 : 01111010 -> 00111101

톱니바퀴의 상태
10001011
10000011
11010110
00111101

상호작용 시작
3번 톱니 반시계 방향 회전: 11010110 -> 10101101
2번 톱니 시계 방향 회전 : 10000011 -> 11000001
1번 톱니 반시계 방향 회전: 10001011 -> 00010111

톱니바퀴의 상태
00010111
11000001
10101101
00111101

문제의 톱니바퀴 회전
1번 톱니 반시계 방향 회전: 00010111 -> 00101110

톱니바퀴의 상태
00101110
11000001
10101101
00111101

상호작용 시작

톱니바퀴의 상태
00101110
11000001
10101101
00111101

톱니바퀴의 상태
00101110
11000001
10101101
00111101

답 : 6</pre>



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



<h2 class="wp-block-heading">예제 4번 디버깅</h2>



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



<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">10010011
01010011
11100011
01010101
8
1 1
2 1
3 1
4 1
1 -1
2 -1
3 -1
4 -1

문제의 톱니바퀴 회전
1번 톱니 시계 방향 회전 : 10010011 -> 11001001

톱니바퀴의 상태
11001001
01010011
11100011
01010101

상호작용 시작
2번 톱니 반시계 방향 회전: 01010011 -> 10100110
3번 톱니 시계 방향 회전 : 11100011 -> 11110001
4번 톱니 반시계 방향 회전: 01010101 -> 10101010

톱니바퀴의 상태
11001001
10100110
11110001
10101010

문제의 톱니바퀴 회전
2번 톱니 시계 방향 회전 : 10100110 -> 01010011

톱니바퀴의 상태
11001001
01010011
11110001
10101010

상호작용 시작
3번 톱니 반시계 방향 회전: 11110001 -> 11100011
1번 톱니 반시계 방향 회전: 11001001 -> 10010011

톱니바퀴의 상태
10010011
01010011
11100011
10101010

문제의 톱니바퀴 회전
3번 톱니 시계 방향 회전 : 11100011 -> 11110001

톱니바퀴의 상태
10010011
01010011
11110001
10101010

상호작용 시작
2번 톱니 반시계 방향 회전: 01010011 -> 10100110
1번 톱니 시계 방향 회전 : 10010011 -> 11001001

톱니바퀴의 상태
11001001
10100110
11110001
10101010

문제의 톱니바퀴 회전
4번 톱니 시계 방향 회전 : 10101010 -> 01010101

톱니바퀴의 상태
11001001
10100110
11110001
01010101

상호작용 시작

톱니바퀴의 상태
11001001
10100110
11110001
01010101

문제의 톱니바퀴 회전
1번 톱니 반시계 방향 회전: 11001001 -> 10010011

톱니바퀴의 상태
10010011
10100110
11110001
01010101

상호작용 시작
2번 톱니 시계 방향 회전 : 10100110 -> 01010011
3번 톱니 반시계 방향 회전: 11110001 -> 11100011
4번 톱니 시계 방향 회전 : 01010101 -> 10101010

톱니바퀴의 상태
10010011
01010011
11100011
10101010

문제의 톱니바퀴 회전
2번 톱니 반시계 방향 회전: 01010011 -> 10100110

톱니바퀴의 상태
10010011
10100110
11100011
10101010

상호작용 시작
3번 톱니 시계 방향 회전 : 11100011 -> 11110001
1번 톱니 시계 방향 회전 : 10010011 -> 11001001

톱니바퀴의 상태
11001001
10100110
11110001
10101010

문제의 톱니바퀴 회전
3번 톱니 반시계 방향 회전: 11110001 -> 11100011

톱니바퀴의 상태
11001001
10100110
11100011
10101010

상호작용 시작
2번 톱니 시계 방향 회전 : 10100110 -> 01010011
1번 톱니 반시계 방향 회전: 11001001 -> 10010011

톱니바퀴의 상태
10010011
01010011
11100011
10101010

문제의 톱니바퀴 회전
4번 톱니 반시계 방향 회전: 10101010 -> 01010101

톱니바퀴의 상태
10010011
01010011
11100011
01010101

상호작용 시작

톱니바퀴의 상태
10010011
01010011
11100011
01010101

톱니바퀴의 상태
10010011
01010011
11100011
01010101

답 : 5</pre>



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



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



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



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

using namespace std;

// 톱니바퀴의 회전 횟수
int N, tempOne, tempTwo;

list&lt;pair&lt;int, int>> rotationList;
list&lt;pair&lt;int, int>>::iterator iter;

// 톱니 바퀴의 톱니
string cogWheel[4];

// 회전할 톱니체크에 필요
bool check[3];

bool debug = false;

// 결과
int score = 0;

// 디버그용 함수
void DebugPrint()
{
	cout &lt;&lt; "\n" &lt;&lt; "톱니바퀴의 상태\n";
	for (int i = 0; i &lt; 4; i++) {
		cout &lt;&lt; cogWheel[i] &lt;&lt; "\n";
	}
}

// 문제의 입력을 받는 함수
void GetInput()
{
	for (int i = 0; i &lt; 4; i++) {
		cin >> cogWheel[i];
	}
	cin >> N;

	// 톱니바퀴의 회전수 만큼 입력을 받습니다.
	while (N > 0) {
		cin >> tempOne >> tempTwo;
		rotationList.push_back(make_pair(tempOne, tempTwo));
		N--;
	}
}

// 톱니를 회전하는 함수
void CogwheelRotation(int number, int dir)
{
	string tempString;

	// 톱니를 시계 방향으로 회전
	if (dir == 1) {
		tempString.push_back(cogWheel[number - 1][7]);
		for (int i = 0; i &lt; 7; i++) {
			tempString.push_back(cogWheel[number - 1][i]);
		}
		if (debug) { cout &lt;&lt; number &lt;&lt; "번 톱니 " &lt;&lt; "시계 방향 회전 : " &lt;&lt; cogWheel[number - 1] &lt;&lt; " -> "; }
		cogWheel[number - 1] = tempString;
		if (debug) { cout &lt;&lt; tempString &lt;&lt; "\n"; }
	}
	else { 	// 톱니를 반시계 방향으로 회전
		for (int i = 1; i &lt; 8; i++) {
			tempString.push_back(cogWheel[number - 1][i]);
		}

		tempString.push_back(cogWheel[number - 1][0]);
		if (debug) { cout &lt;&lt; number &lt;&lt; "번 톱니 " &lt;&lt; "반시계 방향 회전: " &lt;&lt; cogWheel[number - 1] &lt;&lt; " -> "; }
		cogWheel[number - 1] = tempString;
		if (debug) { cout &lt;&lt; tempString &lt;&lt; "\n"; }
	}

}

// 회전할 톱니를 체크
void RotationCheck(int number, int dir)
{

	for (int i = 0; i &lt; 3; i++) {
		cogWheel[i + 1][6] != cogWheel[i][2] ? check[i] = true : check[i] = false;
	}
	if (debug) { cout &lt;&lt; "\n" &lt;&lt; "문제의 톱니바퀴 회전" &lt;&lt; "\n"; }

	CogwheelRotation(number, dir);

	if (debug) { DebugPrint(); }
	if (debug) { cout &lt;&lt; "\n" &lt;&lt; "상호작용 시작" &lt;&lt; "\n"; }

	switch (number)
	{
		case 1: // 2번부터 4번
			for (int i = 0; i &lt; 3; i++) {
				if (check[i]) { CogwheelRotation(i + 2, dir * pow(-1, i + 1)); }
				else { break; }
			}
			break;

		case 2: //3번부터 4번
			for (int i = 1; i &lt; 3; i++) {
				if (check[i]) {
					CogwheelRotation(i + 2, dir * pow(-1, i)); }
				else { break; }
			}

			// 1번
			if (check[0]) { CogwheelRotation(1, -dir); }
			break;

		case 3: // 2번부터 1번
			for (int i = 1; i >= 0; i--) {
				if (check[i]) {
					CogwheelRotation(i + 1, dir * pow(-1, i));
				}
				else { break; }
			}

			// 4번
			if (check[2]) { CogwheelRotation(4, -dir); }
			break;

		case 4: // 3번부터 1번
			for (int i = 2; i >= 0; i--) {
				if (check[i]) {
					CogwheelRotation(i + 1, dir * pow(-1, i + 1));
				}
				else { break; }
			}
			break;
	}
}

// 점수를 계산하는 함수
void ScoreCalculation()
{
	for (int i = 0; i &lt; 4; i++) {
		if (cogWheel[i][0] == '1') { score += pow(2, i); }
	}
}

int main()
{
	GetInput();

	for (iter = rotationList.begin(); iter != rotationList.end(); iter++) {
		RotationCheck(iter->first, iter->second);
		if (debug) { 
			DebugPrint(); 
		}
	}

	// 점수 계산
	ScoreCalculation();

	if (debug) { 
		DebugPrint(); 
		cout &lt;&lt; "\n답 : ";
	}

	cout &lt;&lt; score;

	return 0;
}</pre>



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



<p class="has-medium-font-size wp-block-paragraph">중간에 디버깅 코드를 작성하고 제출할 때 제외하는 것을 잊어서 계속 틀렸다.</p>



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



<figure class="wp-block-image size-full"><img decoding="async" width="823" height="144" src="https://lycos7560.com/wp-content/uploads/image-751.png" alt="" class="wp-image-3572" srcset="https://lycos7560.com/wp-content/uploads/image-751.png 823w, https://lycos7560.com/wp-content/uploads/image-751-300x52.png 300w, https://lycos7560.com/wp-content/uploads/image-751-768x134.png 768w" sizes="(max-width: 823px) 100vw, 823px" /></figure>



<div style="height:34px" 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; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-5698326622209671" data-ad-slot="5078714126"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
<p>The post <a href="https://lycos7560.com/cpp/baekjoon_online_judge/baekjoon-14891-cog-c-simulation/3552/">백준 14891번 (톱니바퀴, C++, Simulation) / 추가 반례 [BAEKJOON]</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/cpp/baekjoon_online_judge/baekjoon-14891-cog-c-simulation/3552/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
