{"width":"100%","blog_title":"n-diary","title":"\u30bd\u30fc\u30c8\u5f8c\u306e\u79fb\u52d5\u5148\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u6c42\u3081\u308b","author_name":"noriok","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/noriok/","type":"rich","categories":["D\u8a00\u8a9e"],"version":"1.0","published":"2020-04-05 02:01:43","provider_name":"Hatena Blog","blog_url":"https://noriok.hatenablog.com/","image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnoriok.hatenablog.com%2Fentry%2F2020%2F04%2F05%2F020143\" title=\"\u30bd\u30fc\u30c8\u5f8c\u306e\u79fb\u52d5\u5148\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u6c42\u3081\u308b - n-diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","description":"\u914d\u5217\u3092\u30bd\u30fc\u30c8\u3057\u305f\u3068\u304d\u306e\u79fb\u52d5\u5148\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u77e5\u308a\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 D \u8a00\u8a9e\u3060\u3068 topNIndex \u95a2\u6570\u3067\u77e5\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002 import std; void main() { auto a = [99, 1, 100, 2, 150]; auto id = new int[a.length]; a.topNIndex(id, Yes.sortOutput); foreach (i; 0..a.length) { writefln(\"a[%d] = %d\", id[i], a[id[i]]); } } \u5b9f\u884c\u7d50\u679c\u3067\u3059\u3002 a[1] = 1 a[3] = 2 a[0] = 99 a[2] = 1\u2026","url":"https://noriok.hatenablog.com/entry/2020/04/05/020143"}