<?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/%eb%b0%98%ec%98%ac%eb%a6%bc/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Wed, 12 Jul 2023 01:13:43 +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>반올림 Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>백준 18110번 (solved.ac, C++) [BAEKJOON]</title>
		<link>https://lycos7560.com/cpp/baekjoon_online_judge/%eb%b0%b1%ec%a4%80-18110%eb%b2%88-solved-ac-c-baekjoon/35885/</link>
					<comments>https://lycos7560.com/cpp/baekjoon_online_judge/%eb%b0%b1%ec%a4%80-18110%eb%b2%88-solved-ac-c-baekjoon/35885/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Sun, 12 Feb 2023 01:13:34 +0000</pubDate>
				<category><![CDATA[BaekjoonOnlineJudge]]></category>
		<category><![CDATA[C++/CPP]]></category>
		<category><![CDATA[11000번]]></category>
		<category><![CDATA[18110]]></category>
		<category><![CDATA[18110번]]></category>
		<category><![CDATA[Baekjoon]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[cmath]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[solved.ac]]></category>
		<category><![CDATA[study]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[구현]]></category>
		<category><![CDATA[기초]]></category>
		<category><![CDATA[반올림]]></category>
		<category><![CDATA[백준]]></category>
		<category><![CDATA[백준 18110]]></category>
		<category><![CDATA[백준 18110번]]></category>
		<category><![CDATA[수학]]></category>
		<category><![CDATA[알고리즘]]></category>
		<category><![CDATA[정렬]]></category>
		<category><![CDATA[코딩테스트]]></category>
		<category><![CDATA[코테]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=35885</guid>

					<description><![CDATA[<p>백준 18110번 'solved.ac' 문제에 대한 글입니다. 단순한 구현 문제 입니다. (This article is about the question of Baekjoon Number 18110 'solved.ac '. It's a simple implementation problem.)</p>
<p>The post <a href="https://lycos7560.com/cpp/baekjoon_online_judge/%eb%b0%b1%ec%a4%80-18110%eb%b2%88-solved-ac-c-baekjoon/35885/">백준 18110번 (solved.ac, 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:62px" 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-ab1cded6      "
					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="#solvedac" class="uagb-toc-link__trigger">solved.ac</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#통과된-코드" class="uagb-toc-link__trigger">통과된 코드</a></ul></ol>					</div>
									</div>
				</div>
			


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



<h1 class="wp-block-heading">solved.ac</h1>



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



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



<figure 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">1024 MB</td><td class="has-text-align-left" data-align="left">8645</td><td class="has-text-align-left" data-align="left">2335</td><td class="has-text-align-left" data-align="left">2010</td><td class="has-text-align-left" data-align="left">27.328%</td></tr></tbody></table></figure>



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



<h3 class="wp-block-heading has-large-font-size">문제</h3>



<p class="wp-block-paragraph"><a href="http://solved.ac/" target="_blank" rel="noreferrer noopener">solved.ac</a>는 Sogang ICPC Team 학회원들의 알고리즘 공부에 도움을 주고자 만든 서비스이다. </p>



<p class="wp-block-paragraph">지금은 서강대뿐만 아니라 수많은 사람들이 solved.ac의 도움을 받아 알고리즘 공부를 하고 있다.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="523" height="134" src="https://lycos7560.com/wp-content/uploads/2023/07/image-22.png" alt="" class="wp-image-35886" srcset="https://lycos7560.com/wp-content/uploads/2023/07/image-22.png 523w, https://lycos7560.com/wp-content/uploads/2023/07/image-22-300x77.png 300w" sizes="(max-width: 523px) 100vw, 523px" /></figure>



<p class="wp-block-paragraph">ICPC Team은 백준 온라인 저지에서 문제풀이를 연습하는데, 백준 온라인 저지의 문제들에는 난이도 표기가 없어서, </p>



<p class="wp-block-paragraph">지금까지는 다양한 문제를 풀어 보고 싶더라도 난이도를 가늠하기 어려워 무슨 문제를 풀어야 할지 판단하기 곤란했기 때문에 solved.ac가 만들어졌다. </p>



<p class="wp-block-paragraph">solved.ac가 생긴 이후 전국에서 200명 이상의 기여자 분들께서 소중한 난이도 의견을 공유해 주셨고, 지금은 약 7,000문제에 난이도 표기가 붙게 되었다.</p>



<p class="wp-block-paragraph">어떤 문제의 난이도는 그 문제를 푼 사람들이 제출한 <strong>난이도 의견</strong>을 바탕으로 결정한다. </p>



<p class="wp-block-paragraph">난이도 의견은 그 사용자가 생각한 난이도를 의미하는 정수 하나로 주어진다. solved.ac가 사용자들의 의견을 바탕으로 난이도를 결정하는 방식은 다음과 같다.</p>



<ul class="wp-block-list">
<li>아직 아무 의견이 없다면 문제의 난이도는 0으로 결정한다.</li>



<li>의견이 하나 이상 있다면, 문제의 난이도는 모든 사람의 난이도 의견의 30% 절사평균으로 결정한다.</li>
</ul>



<p class="wp-block-paragraph">절사평균이란 극단적인 값들이 평균을 왜곡하는 것을 막기 위해 가장 큰 값들과 가장 작은 값들을 제외하고 평균을 내는 것을 말한다. </p>



<p class="wp-block-paragraph">30% 절사평균의 경우 위에서 15%, 아래에서 15%를 각각 제외하고 평균을 계산한다. </p>



<p class="wp-block-paragraph">따라서 20명이 투표했다면, 가장 높은 난이도에 투표한 3명과 가장 낮은 난이도에 투표한 3명의 투표는 평균 계산에 반영하지 않는다는 것이다.</p>



<p class="wp-block-paragraph">제외되는 사람의 수는 위, 아래에서 각각 반올림한다. </p>



<p class="wp-block-paragraph">25명이 투표한 경우 위, 아래에서 각각 3.75명을 제외해야 하는데, 이 경우 반올림해 4명씩을 제외한다.</p>



<p class="wp-block-paragraph">마지막으로, 계산된 평균도 정수로 반올림된다. </p>



<p class="wp-block-paragraph">절사평균이 16.7이었다면 최종 난이도는 17이 된다.</p>



<p class="wp-block-paragraph">사용자들이 어떤 문제에 제출한 난이도 의견 목록이 주어질 때, solved.ac가 결정한 문제의 난이도를 계산하는 프로그램을 작성하시오.</p>



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



<h3 class="wp-block-heading has-large-font-size">입력</h3>



<p class="wp-block-paragraph">첫 번째 줄에 난이도 의견의 개수&nbsp;<em>n</em>이 주어진다. (0&nbsp;≤&nbsp;<em>n</em>&nbsp;≤ 3 × 10<sup>5</sup>)</p>



<p class="wp-block-paragraph">이후 두 번째 줄부터 1 +&nbsp;<em>n</em>번째 줄까지 사용자들이 제출한 난이도 의견&nbsp;<em>n</em>개가 한 줄에 하나씩 주어진다. 모든 난이도 의견은 1 이상 30 이하이다.</p>



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



<h3 class="wp-block-heading has-large-font-size">출력</h3>



<p class="wp-block-paragraph">solved.ac가 계산한 문제의 난이도를 출력한다.</p>



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



<h3 class="wp-block-heading has-large-font-size">예제 입력 1</h3>



<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
1
5
5
7
8</pre>



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



<h3 class="wp-block-heading has-large-font-size">예제 출력 1</h3>



<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="">6</pre>



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



<p class="wp-block-paragraph">5명의 15%는 0.75명으로, 이를 반올림하면 1명이다. </p>



<p class="wp-block-paragraph">따라서 solved.ac는 가장 높은 난이도 의견과 가장 낮은 난이도 의견을 하나씩 제외하고, {5, 5, 7}에 대한 평균으로 문제 난이도를 결정한다.</p>



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



<h3 class="wp-block-heading has-large-font-size">예제 입력 2</h3>



<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="">10
1
13
12
15
3
16
13
12
14
15</pre>



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



<h3 class="wp-block-heading has-large-font-size">예제 출력 2</h3>



<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="">13</pre>



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



<h3 class="wp-block-heading has-large-font-size">출처</h3>



<p class="wp-block-paragraph"><a href="https://www.acmicpc.net/category/5" target="_blank" rel="noreferrer noopener">University</a> > <a href="https://www.acmicpc.net/category/83" target="_blank" rel="noreferrer noopener">서강대학교</a> > <a href="https://www.acmicpc.net/category/693" target="_blank" rel="noreferrer noopener">2019 Sogang Programming Contest</a> > <a href="https://www.acmicpc.net/category/detail/2128" target="_blank" rel="noreferrer noopener">Champion</a> A번</p>



<ul class="wp-block-list">
<li>문제를 검수한 사람: <a href="https://www.acmicpc.net/user/jh05013" target="_blank" rel="noreferrer noopener">jh05013</a>, <a href="https://www.acmicpc.net/user/kipa00" target="_blank" rel="noreferrer noopener">kipa00</a></li>



<li>데이터를 추가한 사람: <a href="https://www.acmicpc.net/user/sait2000" target="_blank" rel="noreferrer noopener">sait2000</a></li>



<li>문제를 만든 사람: <a href="https://www.acmicpc.net/user/shiftpsh" target="_blank" rel="noreferrer noopener">shiftpsh</a></li>
</ul>



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



<h3 class="wp-block-heading has-large-font-size">알고리즘 분류</h3>



<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/102" target="_blank" rel="noreferrer noopener">구현</a></li>



<li><a href="https://www.acmicpc.net/problem/tag/97" target="_blank" rel="noreferrer noopener">정렬</a></li>
</ul>



<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)"/>



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



<p class="wp-block-paragraph">단순 수학을 이용한 구현 문제입니다.</p>



<p class="wp-block-paragraph">N = 0 일 경우를 꼭 처리해줘야 합니다. (0을 나누면 큰일납니다.)</p>



<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;algorithm>
#include &lt;cmath>
using namespace std;
int _N, _Sum, _Arr[300000];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin >> _N;
	for (int i = 0; i &lt; _N; i++)
		cin >> _Arr[i];
	sort(_Arr, _Arr + _N);
	int _Temp = round((float)_N * 0.15f);
	for (int i = _Temp; i &lt; _N - _Temp; i++)
		_Sum += _Arr[i];
	if (_N == 0) cout &lt;&lt; "0";
	else cout &lt;&lt; round((float)_Sum / (float)(_N - 2 * _Temp));
	return 0;
}</pre>



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



<figure class="wp-block-image size-full"><img decoding="async" width="1066" height="124" src="https://lycos7560.com/wp-content/uploads/2023/07/image-23.png" alt="" class="wp-image-35900" srcset="https://lycos7560.com/wp-content/uploads/2023/07/image-23.png 1066w, https://lycos7560.com/wp-content/uploads/2023/07/image-23-300x35.png 300w, https://lycos7560.com/wp-content/uploads/2023/07/image-23-768x89.png 768w" sizes="(max-width: 1066px) 100vw, 1066px" /></figure>



<div style="height:100px" 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-18110%eb%b2%88-solved-ac-c-baekjoon/35885/">백준 18110번 (solved.ac, 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-18110%eb%b2%88-solved-ac-c-baekjoon/35885/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
