<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/kyoupuro/">
    <title>kyoupuro @ ウィキ</title>
    <link>http://w.atwiki.jp/kyoupuro/</link>
    <atom:link href="https://w.atwiki.jp/kyoupuro/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>kyoupuro @ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2013-01-22T17:24:19+09:00</dc:date>
    <utime>1358843059</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/79.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/25.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/78.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/77.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/39.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/76.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/57.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/75.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/47.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/kyoupuro/pages/74.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/79.html">
    <title>When Can We Meet?</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/79.html</link>
    <description>
      **1124 : When Can We Meet?

[[問題文&gt;http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1124]]

***解説
なるべく多くの人数が参加できるような日程を探す問題。
何日に何人が参加できるかを記憶しておき、それを元に参加人数が最大でかつ最短の日にちを探索すればいい。

***プログラム
***C

***C++
#region
 #include &lt;iostream&gt;
 using namespace std;
  
 int main() {
     int n, q;
     while (cin &gt;&gt; n &gt;&gt; q) {
         if (n == 0 &amp;&amp; q == 0) break;
      
         int day[100] = {0};
         int m, d;
         for (int i = 0; i &lt; n; ++i) {
             cin &gt;&gt; m;
             for (int j = 0; j &lt; m; ++j) {
                 cin &gt;&gt; d;
                 ++day[d];
             }
         }
  
         int max = 0, max_i = 0;
         for (int i = 0; i &lt; 100; ++i) {
             if (max &lt; day[i]) {
                 max = day[i];
                 max_i = i;
             }
         }
 
         if (max &gt;= q) {
             cout &lt;&lt; max_i &lt;&lt; endl;
         } else {
             cout &lt;&lt; 0 &lt;&lt; endl;
         }
     }
  
     return 0;
 }
#endregion
***Java    </description>
    <dc:date>2013-01-22T17:24:19+09:00</dc:date>
    <utime>1358843059</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/25.html">
    <title>Volume11</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/25.html</link>
    <description>
      **Volume11

|問題番号|問題名|C|C++|Java|
|1100|[[Area of Polygons]]|-|○|-|
|1101||-|-|-|
|1102||-|-|-|
|1103||-|-|-|
|1104||-|-|-|
|1105||-|-|-|
|1106||-|-|-|
|1107||-|-|-|
|1108||-|-|-|
|1109||-|-|-|
|1110||-|-|-|
|1111||-|-|-|
|1112||-|-|-|
|1113||-|-|-|
|1114||-|-|-|
|1115||-|-|-|
|1116||-|-|-|
|1117||-|-|-|
|1118||-|-|-|
|1119|[[Exploring Caves]]|-|○|-|
|1120||-|-|-|
|1121||-|-|-|
|1122||-|-|-|
|1123||-|-|-|
|1124|[[When Can We Meet?]]|-|○|-|
|1125||-|-|-|
|1126||-|-|-|
|1127||-|-|-|
|1128||-|-|-|
|1129||-|-|-|
|1130|[[Red and Black]]|-|○|-|
|1131||-|-|-|
|1132||-|-|-|
|1133||-|-|-|
|1134||-|-|-|
|1135||-|-|-|
|1136||-|-|-|
|1137||-|-|-|
|1138||-|-|-|
|1139||-|-|-|
|1140||-|-|-|
|1141|[[Dirichlet&#039;s Theorem on Arithmetic Progressions]]|-|○|-|
|1142|[[Organize Your Train part II]]|-|○|-|
|1143||-|-|-|
|1144|[[Curling 2.0]]|-|○|-|
|1145||-|-|-|
|1146||-|-|-|
|1147||-|-|-|
|1148||-|-|-|
|1149||-|-|-|
|1150||-|-|-|
|1151||-|-|-|
|1152||-|-|-|
|1153||-|-|-|
|1154||-|-|-|
|1155||-|-|-|
|1156||-|-|-|
|1157||-|-|-|
|1158||-|-|-|
|1159||-|-|-|
|1160||-|-|-|
|1161||-|-|-|
|1162||-|-|-|
|1163||-|-|-|
|1164||-|-|-|
|1165||-|-|-|
|1166||-|-|-|
|1167||-|-|-|
|1168||-|-|-|
|1169||-|-|-|
|1170||-|-|-|
|1171||-|-|-|
|1172||-|-|-|
|1173||-|-|-|
|1174||-|-|-|
|1175||-|-|-|
|1176||-|-|-|
|1177||-|-|-|
|1178||-|-|-|
|1179||-|-|-|
|1180||-|-|-|
|1181||-|-|-|
|1182||-|-|-|
|1183||-|-|-|
|1184||-|-|-|
|1185|Patisserie ACM|-|-|-|    </description>
    <dc:date>2013-01-22T17:19:22+09:00</dc:date>
    <utime>1358842762</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/78.html">
    <title>Exploring Caves</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/78.html</link>
    <description>
      **1119 : Exploring Caves 

[[問題文&gt;http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1119]]

***解説
スタート位置から最も遠い部屋の座標を答える問題。
今の位置からのどれだけ移動するかが入力で与えられるので、その通りに移動して逐一距離を計算すればいい。

英語の勉強しましょう。

***プログラム
***C

***C++
#region
 #include&lt;iostream&gt;
 using namespace std;
 
 int main(){
 	int n;
 	cin &gt;&gt; n;
 	for (int i = 0; i &lt; n; i++) {
 		int x = 0, y = 0;
 		int dx, dy;
 		int max = 0, tx, ty; 
 		while (cin &gt;&gt; dx &gt;&gt; dy, dx || dy) {
 			x += dx;
 			y += dy;
 			int d = x*x + y*y;
 			if (max &lt; d) {
 				max = d;
 				tx = x;
				ty = y;
 			}
 			else if (max == d &amp;&amp; tx &lt; x) {
 				tx = x;
 				ty = y;
 			}
 		}
 
 		cout &lt;&lt; tx &lt;&lt; &quot; &quot; &lt;&lt; ty &lt;&lt; endl;
 	}
 	
 	return 0;
 }
#endregion

***Java    </description>
    <dc:date>2013-01-17T20:06:29+09:00</dc:date>
    <utime>1358420789</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/77.html">
    <title>Flying Jenny</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/77.html</link>
    <description>
      **0082 : Flying Jenny

[[問題文&gt;http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0082]]

***解説
条件に合うようなメリーゴーランドの並べ方を出力する。
メリーゴーランドの並び方は8種類なので、先に並び方を全て配列に格納しておき、
小さいほうから順に調べていけばいい。

ただ、最小値を求めるとき、最初の値が小さいとWAになってしまうので注意([[10000]]でもWAになった)。

***プログラム
***C

***C++
#region
 #include &lt;iostream&gt;
 #include &lt;string&gt;
 #include &lt;climits&gt;
 using namespace std;
 
 string pos[] = {
	&quot;12121414&quot;,
 	&quot;12141412&quot;,
 	&quot;14121214&quot;,
 	&quot;14141212&quot;,
 	&quot;21214141&quot;,
 	&quot;21414121&quot;,
 	&quot;41212141&quot;,
 	&quot;41412121&quot;,
 };
 
 int main() {
 	int n[8];
 	while (cin &gt;&gt; n[0] &gt;&gt; n[1] &gt;&gt; n[2] &gt;&gt; n[3] &gt;&gt; n[4] &gt;&gt; n[5] &gt;&gt; n[6] &gt;&gt; n[7]) {
 		int min = INT_MAX;
 		string ans;
 		for (int i = 0; i &lt; 8; i++) {
 			int sum = 0;
 			for (int j = 0; j &lt; 8; j++) {
				int a = n[j] - (pos[i][j] - &#039;0&#039;);
 				if (a &lt; 0) a = 0;
 				sum += a;
 			}
 
 			if (min &gt; sum) {
 				ans = pos[i];
 				min = sum;
 			}
		}
 
 		cout &lt;&lt; ans[0];
 		for (int i = 1; i &lt; 8; i++) {
 			cout &lt;&lt; &quot; &quot; &lt;&lt; ans[i];
 		}
 		cout &lt;&lt; endl;
 	}
 
 	return 0;
 }
#endregion

***Java    </description>
    <dc:date>2013-01-14T16:28:27+09:00</dc:date>
    <utime>1358148507</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/39.html">
    <title>Volume0</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/39.html</link>
    <description>
      |問題番号|問題名|C|C++|Java|
|0000|[[QQ]]|-|○|-|
|0001|[[List of Top 3 Hills]]|○|○|-|
|0002|[[Digit Number]]|-|○|○|
|0003|[[Is it a Right Triangle?]]|-|○|-|
|0004|[[Simultaneous Equation]]|-|○|-|
|0005|[[GCD and LCM]]|-|○|-|
|0006|[[Reverse Sequence]]|-|○|-|
|0007|[[Debt Hell]]|-|○|-|
|0008|[[Sum of 4 Integers]]|-|○|-|
|0009|[[Prime Number]]|-|○|-|
|0010|[[Circumscribed Circle of a Triangle]]|-|○|-|
|0011|[[Drawing Lots]]|-|○|-|
|0012||-|-|-|
|0013|[[Switching Railroad Cars]]|-|○|-|
|0014||-|-|-|
|0015||-|-|-|
|0016||-|-|-|
|0017||-|-|-|
|0018||-|-|-|
|0019||-|-|-|
|0020||-|-|-|
|0021||-|-|-|
|0022||-|-|-|
|0023||-|-|-|
|0024||-|-|-|
|0025||-|-|-|
|0026||-|-|-|
|0027||-|-|-|
|0028||-|-|-|
|0029||-|-|-|
|0030||-|-|-|
|0031||-|-|-|
|0032||-|-|-|
|0033||-|-|-|
|0034||-|-|-|
|0035|[[Is it Convex?]]|-|○|-|
|0036||-|-|-|
|0037||-|-|-|
|0038||-|-|-|
|0039||-|-|-|
|0040||-|-|-|
|0041||-|-|-|
|0042||-|-|-|
|0043|[[Puzzle]]|-|○|-|
|0044||-|-|-|
|0045||-|-|-|
|0046||-|-|-|
|0047||-|-|-|
|0048||-|-|-|
|0049||-|-|-|
|0050||-|-|-|
|0051||-|-|-|
|0052||-|-|-|
|0053||-|-|-|
|0054||-|-|-|
|0055||-|-|-|
|0056||-|-|-|
|0057||-|-|-|
|0058||-|-|-|
|0059||-|-|-|
|0060||-|-|-|
|0061||-|-|-|
|0062||-|-|-|
|0063||-|-|-|
|0064||-|-|-|
|0065||-|-|-|
|0066||-|-|-|
|0067||-|-|-|
|0068||-|-|-|
|0069||-|-|-|
|0070||-|-|-|
|0071||-|-|-|
|0072||-|-|-|
|0073||-|-|-|
|0074||-|-|-|
|0075||-|-|-|
|0076||-|-|-|
|0077||-|-|-|
|0078||-|-|-|
|0079||-|-|-|
|0080||-|-|-|
|0081||-|-|-|
|0082|[[Flying Jenny]]|-|○|-|
|0083||-|-|-|
|0084||-|-|-|
|0085|[[Joseph&#039;s Potato]]|-|○|-|
|0086||-|-|-|
|0087||-|-|-|
|0088|[[The Code A Doctor Loved]]|-|○|-|
|0089||-|-|-|
|0090||-|-|-|
|0091||-|-|-|
|0092||-|-|-|
|0093|[[Leap Year]]|-|○|-|
|0094||-|-|-|
|0095||-|-|-|
|0096||-|-|-|
|0097||-|-|-|
|0098||-|-|-|
|0099||-|-|-|    </description>
    <dc:date>2013-01-14T16:22:15+09:00</dc:date>
    <utime>1358148135</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/76.html">
    <title>Joseph&#039;s Potato</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/76.html</link>
    <description>
      **0085 : Joseph&#039;s Potato

[[問題文&gt;http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0085]]

***解説
Joseph&#039;s Potatoというゲームのルールに従って、最後に残る人の番号を答える問題。
一人になるまでループを使ってシミュレーションすればいい。
どの番号が残っているかという情報を記憶する配列があると楽。

***プログラム
***C

***C++
#region
 #include &lt;iostream&gt;
 using namespace std;
 
 int main() {
 	int m, n;
 
 	while (cin &gt;&gt; m &gt;&gt; n, m || n) {
 		int p[1000] = {0}, cnt = 1, res = m, num;		
 		for (int i = 0; ; i++) {
 			if (res == 1 &amp;&amp; p[i%m] == 0) {
 				num = i%m;
 				break;
 			}
			if (p[i%m]) continue;
 
 			if (cnt == n) {
  				p[i%m] = 1;
  				res--;
 				cnt = 1;
 			} else {
  				cnt++;
  			}
  		}
  
  		cout &lt;&lt; num+1 &lt;&lt; endl;
  	}
 
  	return 0;
 } 
#endregion

***Java    </description>
    <dc:date>2013-01-14T15:44:09+09:00</dc:date>
    <utime>1358145849</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/57.html">
    <title>Emacs-like Editor</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/57.html</link>
    <description>
      **1021 : Emacs-like Editor

[[問題文&gt;http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1021]]

***解説
コマンドによって何度か文字列の操作を行い、その結果を出力する。
書いてある通りにコーディングすればいい・・・が、よく分からないところでWAになりやすい。
とりあえず、
・最初に与えられる文章を一行ずつ読み込む（空白が含まれている可能性がある）
・コマンドYでバッファに改行があるときの処理に注意する
あたりが気をつけるべきポイントか。

最悪、プログラムを見比べながら間違いを見つけてください・・・

***プログラム
***C

***C++
#region
 #include &lt;iostream&gt;
 #include &lt;string&gt;
 #include &lt;cstdlib&gt;
 #include &lt;algorithm&gt;
 #include &lt;vector&gt;
 using namespace std;
  
 int main() {
     vector&lt;string&gt; v;
  
     for (int i = 0; ; i++) {
         string w;
         getline(cin, w);
         if (w == &quot;END_OF_TEXT&quot;) break;
         v.push_back(w);
     }
  
     string c, buf;
     int x = 0, y = 0;
     while (cin &gt;&gt; c) {
         if (c == &quot;-&quot;) break;
          
         if (c == &quot;a&quot;) {
             x = 0;
         } else if (c == &quot;e&quot;) {
             x = v[y].size();
         } else if (c == &quot;p&quot;) {
             if (y &gt;= 1) y--;
             x = 0;
         } else if (c == &quot;n&quot;) {
             if (y &lt; v.size()-1)  y++;
             x = 0;
         } else if (c == &quot;f&quot;) {
             if (x != v[y].size()) x++;
             else if (y &lt; v.size()-1 &amp;&amp; x == v[y].size()) {
                 y++;
                 x = 0;
             }
         } else if (c == &quot;b&quot;) {
             if (x != 0) x--;
             else {
                 if (y &gt;= 1) {
                     y--;
                     x = v[y].size();
                 }
             }
         } else if (c == &quot;d&quot;) {
             if (x != v[y].size()) {
                 v[y] = v[y].substr(0, x) + v[y].substr(x+1);
             } else {
                 if (y &lt; v.size()-1) {
                     v[y] += v[y+1];
                     for (int i = y+1; i &lt; v.size()-1; i++) v[i] = v[i+1];
                     v.pop_back();
                 }
             }
         } else if (c == &quot;k&quot;) {
             if (x != v[y].size()) {
                 buf = v[y].substr(x);
                 v[y] = v[y].substr(0, x);
             } else {
                 if (y &lt; v.size()-1) {
                     v[y] += v[y+1];
                     for (int i = y+1; i &lt; v.size()-1; i++) v[i] = v[i+1];
                     v.pop_back();
                     buf = &quot;RETURN&quot;;
                 }
             }
         } else if (c == &quot;y&quot;) {
             if (buf.empty()) {
                 // 何もしない
             } else if (buf == &quot;RETURN&quot;) {
                 string w = &quot;&quot;;
                  
                 v.push_back(&quot;&quot;);
                 for (int i = v.size()-1; i &gt; y+1; i--) {
                     v[i] = v[i-1];
                 }
                 if (x != v[y].size()) {
                     w = v[y].substr(x);
                     v[y] = v[y].substr(0, x);
                 }
                 y++;
                 x = 0;
             } else {
                 v[y] = v[y].substr(0, x) + buf + v[y].substr(x);
                 x += buf.size();
             }
         }
     }
  
     for (int i = 0; i &lt; v.size(); i++) {
         cout &lt;&lt; v[i] &lt;&lt; endl;
     }
  
      
  
     return 0;
 }
#endregion

***Java

・WAになったプログラム
#region
 #include&lt;iostream&gt;
 #include &lt;string&gt;
 using namespace std;
 
 const int MAX = 100;
 
 int main(){
 	string s[MAX+1];
 	for (int i = 0; i &lt;= MAX; i++) s[i] = &quot;&quot;;
 
 	for (int i = 0; ; i++) {
 		string w;
		cin &gt;&gt; w;
 		if (w == &quot;END_OF_TEXT&quot;) break;
 		s[i] += w + &quot;!&quot;;
 	}
 
 	string c, buf = &quot;&quot;;
	int x = 0, y = 0;
 	while (cin &gt;&gt; c) {
 		if (c == &quot;-&quot;) break;
 
 		if (c == &quot;a&quot;) {
 			x = 0;
 		} else if (c == &quot;e&quot;) {
 			x = s[y].size()-1;
 		} else if (c == &quot;p&quot;) {
 			x = 0;
			if (y &gt; 0) {
  				y--;
 			}
 		} else if (c == &quot;n&quot;) {
 			x = 0;
 			if (s[y+1] != &quot;&quot;) {
 				y++;
 			}
 		} else if (c == &quot;f&quot;) {
 			if (x == s[y].size()-1) {
 				if (s[y+1] != &quot;&quot;) {
 					x = 0;
 					y++;
 				}
			} else {
 				x++;
 			}
 		} else if (c == &quot;b&quot;) {
 			if (x == 0) {
 				if (y &gt; 0) {
 					y--;
 					x = s[y].size()-1;
 				}
 			} else {
 				x--;
			}
 		} else if (c == &quot;d&quot;) {
 			if (x == s[y].size()-1) { // 行末にある
 				if (s[y+1] != &quot;&quot;) {
 					s[y] = s[y].substr(0, s[y].size()-1) + s[y+1];
 					for (int i = y+1; i &lt;= MAX-1; i++) {
 						s[i] = s[i+1];
 					}
				}
 			} else { // 行末にない
 				s[y] = s[y].substr(0, x) + s[y].substr(x+1);
 			}
 		} else if (c == &quot;k&quot;) {
 			if (x == s[y].size()-1) { // 行末にある
				if (s[y+1] != &quot;&quot;) {
 					s[y] += s[y+1];
 					for (int i = y+1; i &lt;= MAX; i++) {
 						s[i] = s[i+1];
 					}
 					buf = &quot;!&quot;;
 				}
 			} else { // 行末にない
 				buf = s[y].substr(x, s[y].size()-x-1);
 				s[y] = s[y].substr(0, x) + &quot;!&quot;;
 				x = s[y].size()-1;
 			}
			
 		} else if (c == &quot;y&quot;) {
 			if (buf != &quot;&quot;) {
 				if (buf == &quot;!&quot;) { // 改行
 					string w = s[y].substr(x);
 					s[y] = s[y].substr(0, x-1);
 					for (int i = MAX; i &gt;= y+2; i--) s[i] = s[i-1];
 					s[y+1] = w;
 					y = y+1;
 					x = 0;
 				} else {
					s[y] = s[y].substr(0, x) + buf + s[y].substr(x);
 					x += buf.size();
 				}
 			}
 		}
 
 		cout &lt;&lt; &quot;x = &quot; &lt;&lt; x &lt;&lt; endl;
 		cout &lt;&lt; &quot;y = &quot; &lt;&lt; y &lt;&lt; endl;
		cout &lt;&lt; &quot;buf = &quot; &lt;&lt; buf &lt;&lt; endl;
 		for (int i = 0; s[i] != &quot;&quot;; i++) {
 			cout &lt;&lt; s[i] &lt;&lt; endl;
 		}
 		cout &lt;&lt; endl;
 	}
 
 	for (int i = 0; s[i] != &quot;&quot;; i++) {
 		cout &lt;&lt; s[i].substr(0, s[i].size()-1) &lt;&lt; endl;
 	}
 	
 	return 0;
 }
#endregion    </description>
    <dc:date>2013-01-13T16:44:04+09:00</dc:date>
    <utime>1358063044</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/75.html">
    <title>Cleaning Robot</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/75.html</link>
    <description>
      **1020 : Cleaning Robot

[[問題文&gt;http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1020]]

***解説
ロボットが移動した後に指定された場所にいるか確率を答える問題。
全探索しようとすると時間がかかりすぎるので、各部屋ごとにその部屋にいける場合の数をカウントする。

***プログラム
***C

***C++
#region
 #include &lt;iostream&gt;
 #include &lt;cstdio&gt;
 using namespace std;
  
 int main() {
     int n;
     char cs, ct, cb;
  
     while (cin &gt;&gt; n, n) {
         cin &gt;&gt; cs &gt;&gt; ct &gt;&gt; cb;
         int s = cs - &#039;A&#039;, t = ct - &#039;A&#039;, b = cb - &#039;A&#039;;
  
         int count[9] = {0};
         count[s] = 1;
  
         for (int i = 0; i &lt; n; i++) {
             int plus[9] = {0};
             for (int j = 0; j &lt; 9; j++) {
                 // 上に移動             
                 if (j-3 &gt;= 0 &amp;&amp; j-3 != b) {
                     plus[j-3] += count[j];
                 } else {
                    plus[j] += count[j];
                  }
                 // 下に移動             
                 if (j+3 &lt;= 8 &amp;&amp; j+3 != b) {
                    plus[j+3] += count[j];
                 } else {
                     plus[j] += count[j];
                 }
                 // 右に移動             
                 if (j+1 &lt;= 8 &amp;&amp; j != 2 &amp;&amp; j != 5 &amp;&amp; j+1 != b) {
                     plus[j+1] += count[j];
                 } else {
                     plus[j] += count[j];
                 }
                 // 左に移動             
                 if (j-1 &gt;= 0 &amp;&amp; j != 3 &amp;&amp; j != 6 &amp;&amp; j-1 != b) {
                     plus[j-1] += count[j];
                 } else {
                     plus[j] += count[j];
                 }
             }
  
             for (int j = 0; j &lt; 9; j++) {
                 count[j] = plus[j];
             }
         }
  
         int sum = 1;
         for (int i = 0; i &lt; n; i++) sum *= 4;
  
         cout &lt;&lt; (double)count[t]/sum &lt;&lt; endl;
     }
  
     return 0;
 }
#endregion

***Java    </description>
    <dc:date>2013-01-08T16:11:10+09:00</dc:date>
    <utime>1357629070</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/47.html">
    <title>Volume10</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/47.html</link>
    <description>
      |問題番号|問題名|C|C++|Java|
|1000|[[A + B Problem]]|-|○|-|
|1001||-|-|-|
|1002||-|-|-|
|1003||-|-|-|
|1004|[[Pair of Primes]]|-|○|-|
|1005||-|-|-|
|1006||-|-|-|
|1007||-|-|-|
|1008||-|-|-|
|1009||-|-|-|
|1010||-|-|-|
|1011||-|-|-|
|1012||-|-|-|
|1013||-|-|-|
|1014||-|-|-|
|1015||-|-|-|
|1016||-|-|-|
|1017||-|-|-|
|1018||-|-|-|
|1019||-|-|-|
|1020|[[Cleaning Robot]]|-|○|-|
|1021|[[Emacs-like Editor]]|-|-|-|
|1022||-|-|-|
|1023||-|-|-|
|1024||-|-|-|
|1025||-|-|-|
|1026||-|-|-|
|1027|[[A Piece of Cake]]|-|○|-|
|1028||-|-|-|
|1029||-|-|-|
|1030||-|-|-|
|1031||-|-|-|
|1032||-|-|-|
|1033||-|-|-|
|1034||-|-|-|
|1035||-|-|-|
|1036||-|-|-|
|1037||-|-|-|
|1038||-|-|-|
|1039||-|-|-|
|1040||-|-|-|
|1041||-|-|-|
|1042||-|-|-|
|1043||-|-|-|
|1044||-|-|-|
|1045||-|-|-|
|1046||-|-|-|
|1047||-|-|-|
|1048||-|-|-|
|1049||-|-|-|
|1050||-|-|-|
|1051||-|-|-|
|1052||-|-|-|
|1053||-|-|-|
|1054||-|-|-|
|1055||-|-|-|
|1056||-|-|-|
|1057||-|-|-|
|1058||-|-|-|
|1059||-|-|-|
|1060||-|-|-|
|1061||-|-|-|
|1062||-|-|-|
|1063||-|-|-|
|1064||-|-|-|
|1065||-|-|-|
|1066||-|-|-|
|1067||-|-|-|
|1068||-|-|-|
|1069||-|-|-|
|1070||-|-|-|
|1071||-|-|-|
|1072||-|-|-|
|1073||-|-|-|
|1074||-|-|-|
|1075||-|-|-|
|1076||-|-|-|
|1077||-|-|-|
|1078||-|-|-|
|1079||-|-|-|
|1080||-|-|-|
|1081||-|-|-|
|1082||-|-|-|
|1083||-|-|-|
|1084||-|-|-|
|1085||-|-|-|
|1086||-|-|-|
|1087||-|-|-|
|1088||-|-|-|
|1089||-|-|-|
|1090||-|-|-|
|1091||-|-|-|
|1092||-|-|-|
|1093||-|-|-|
|1094||-|-|-|
|1095||-|-|-|
|1096||-|-|-|    </description>
    <dc:date>2013-01-08T16:05:00+09:00</dc:date>
    <utime>1357628700</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/kyoupuro/pages/74.html">
    <title>Switching Railroad Cars</title>
    <link>https://w.atwiki.jp/kyoupuro/pages/74.html</link>
    <description>
      **0013 : Switching Railroad Cars

[[問題文&gt;http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0013]]

***解説
スタックをプログラムで表現すればいい。

***プログラム
***C

***C++
#region
 #include &lt;iostream&gt;
 #include &lt;vector&gt;
 using namespace std;
  
 int main() {
     vector&lt;int&gt; cars;
     int n;
      
     while (cin &gt;&gt; n) {
         if (n != 0) {
             cars.push_back(n);
         } else {
             cout &lt;&lt; cars.back() &lt;&lt; endl;
             cars.pop_back();
         }
     }   
      
     return 0;
 }
#endregion

***Java    </description>
    <dc:date>2013-01-06T17:03:48+09:00</dc:date>
    <utime>1357459428</utime>
  </item>
  </rdf:RDF>
