<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>y-kamiya</author_name>
  <author_url>https://blog.hatena.ne.jp/y-kamiya/</author_url>
  <blog_title>MEMOcho-</blog_title>
  <blog_url>https://jsapachehtml.hatenablog.com/</blog_url>
  <categories>
    <anon>競技プログラミング</anon>
    <anon>c++</anon>
  </categories>
  <description>前回このような記事を書いたのでついでにTLEとなったしまった例をもう一つ備忘録としてメモ。 https://jsapachehtml.hatenablog.com/entry/2022/06/05/163223 以下のコードはMを超える最小の2の指数を求める処理。無限ループに陥る場合があるがどのようなケースか思いつくだろうか？ using ll = long long; ll M = &lt;問題の入力値&gt; int m = 0; while ((1&lt;&lt;m) &lt;= M) ++m; cout &lt;&lt; m &lt;&lt; endl; 答えは、(1&lt;&lt;m)がintの最大値を超えた場合。つまりMの値がintの最大値を超え…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjsapachehtml.hatenablog.com%2Fentry%2F2022%2F06%2F07%2F090955&quot; title=&quot;whileでハマってTLE - MEMOcho-&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>2022-06-07 09:09:55</published>
  <title>whileでハマってTLE</title>
  <type>rich</type>
  <url>https://jsapachehtml.hatenablog.com/entry/2022/06/07/090955</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
