<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sugarknri</author_name>
  <author_url>https://blog.hatena.ne.jp/sugarknri/</author_url>
  <blog_title>メモ</blog_title>
  <blog_url>https://sugarknri.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>問題はこちら No.275 中央値を求めよ - yukicoderソートして中央値を求めるだけ 要素の個数が偶数の時にちょっと注意が必要 int c(int*a,int*b){return*a-*b;} int main(){ int a[1010]; int n,i; scanf(&quot;%d&quot;,&amp;n); for(i=0;i&lt;n;i++)scanf(&quot;%d&quot;,a+i); qsort(a,n,4,c); printf(&quot;%f&quot;,(a[n/2]+a[(n-1)/2])/2.0); //2で割ると整数型の除算となり切り捨てられるので2.0にする return 0; } n/2と(n-1)/2はnが奇数の…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsugarknri.hatenablog.com%2Fentry%2F2016%2F05%2F23%2F000356&quot; title=&quot;yukicoder No.275 中央値を求めよ - メモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-05-23 00:03:56</published>
  <title>yukicoder No.275 中央値を求めよ</title>
  <type>rich</type>
  <url>https://sugarknri.hatenablog.com/entry/2016/05/23/000356</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
