<?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.22 括弧の対応 - yukicoderk番目の文字が「(」なら右へ、「)」なら左へ探すことになる 最初の文字も含めて、「)」に遭遇したら+1、「(」に遭遇したら-1として、初めて0になった箇所が求める位置 int main(){ int n,i,t=0; char s[10010]; scanf(&quot;%*d%d&quot;,&amp;i); scanf(&quot;%s&quot;,s+1); n=s[i]; //最初の文字を保存 t=n*2-81; //')'は41,'('は40なので2倍して81を引くことで±1を作れる while(t)t+=s[n=='('?++i:--i]*2-81; //0になるまで動…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsugarknri.hatenablog.com%2Fentry%2F2016%2F04%2F05%2F214109&quot; title=&quot;yukicoder No.22 括弧の対応 - メモ&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-04-05 21:41:09</published>
  <title>yukicoder No.22 括弧の対応</title>
  <type>rich</type>
  <url>https://sugarknri.hatenablog.com/entry/2016/04/05/214109</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
