{"version":"1.0","width":"100%","blog_url":"https://dosei.hatenadiary.jp/","url":"https://dosei.hatenadiary.jp/entry/20110225/p1","description":"\u6368\u3066\u30b3\u30fc\u30c9\u3060\u3068\u3001\u753b\u50cf\u306e\u753b\u7d20\u5024\u3092\u683c\u7d0d\u3057\u305f\u5909\u6570\u3068\u3057\u3066\u3001 int I[2000][1000] = { {0} }; \u306a\u3093\u3066\u3084\u3063\u3061\u3083\u3046\u3088\u306d\u3002\u3093\u3067\u3001\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3044\u3068\u30e1\u30e2\u30ea\u304c\u30b9\u30bf\u30c3\u30af\u306b\u78ba\u4fdd\u3067\u304d\u306a\u3044\u3067\u3001\u30bb\u30b0\u30d5\u30a9\u304c\u51fa\u3061\u3083\u3046\u3002 \u3057\u3087\u3046\u304c\u306a\u3044\u304b\u3089\u3001\u521d\u5fc3\u306b\u5e30\u3063\u3066\u3001 int* I = new int[2000*1000]; \u3068\u304b\u3059\u308b\u3068\u601d\u3046\u3093\u3060\u3051\u3069\u3001\u3053\u3046\u3059\u308b\u3068\u3001 I[x][y] = 100; // NG! => should be I[x*1000+y] \u307f\u305f\u3044\u306a\u30a2\u30af\u30bb\u30b9\u304c\u3067\u304d\u306a\u304f\u3066\u3001\u30b3\u30fc\u30c9\u304c\u7f8e\u3057\u304f\u306a\u3044\u3002\u3053\u3093\u306a\u6642\u306f\u3001 int (*I)[1000] = reinterpret_cast<int(*)[1000]>(new\u2026","provider_name":"Hatena Blog","published":"2011-02-25 00:00:00","author_url":"https://blog.hatena.ne.jp/DOSEI/","title":" \u591a\u6b21\u5143\u914d\u5217","blog_title":"DOSEI\u306e\u65e5\u8a18","height":"190","categories":["\u30e1\u30e2","C++"],"provider_url":"https://hatena.blog","type":"rich","author_name":"DOSEI","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdosei.hatenadiary.jp%2Fentry%2F20110225%2Fp1\" title=\" \u591a\u6b21\u5143\u914d\u5217 - DOSEI\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null}