<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>C++: From Zero to Error by 顏永進</title>
      <link>https://padlet.com/letranger1/i1visu0cdqg0wzhx</link>
      <description>TNFSH高一程式設計問答區</description>
      <language>en-us</language>
      <pubDate>2022-09-26 05:18:45 UTC</pubDate>
      <lastBuildDate>2025-11-25 02:37:34 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title>Wolfy in Taxi作業提問</title>
         <author></author>
         <link>https://padlet.com/letranger1/i1visu0cdqg0wzhx/wish/2521662689</link>
         <description><![CDATA[<div>老師好：超過10000公尺輸出睡在學校，那請問低於0有限制嗎？</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/1996433868/18539b7f1bf8908a1fdbf99119044f88/_______2023_03_18_204817.png" />
         <pubDate>2023-03-18 12:55:48 UTC</pubDate>
         <guid>https://padlet.com/letranger1/i1visu0cdqg0wzhx/wish/2521662689</guid>
      </item>
      <item>
         <title>壞掉的鍵盤作業提問</title>
         <author></author>
         <link>https://padlet.com/letranger1/i1visu0cdqg0wzhx/wish/2629208289</link>
         <description><![CDATA[<div>請問那個灰點點是什麼意思？&nbsp;</div>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/2077882395/f949bf7c672a042e5c06fc420ec059d4/_______2023_06_21_214053.png" />
         <pubDate>2023-06-21 13:45:36 UTC</pubDate>
         <guid>https://padlet.com/letranger1/i1visu0cdqg0wzhx/wish/2629208289</guid>
      </item>
      <item>
         <title>物聯網</title>
         <author>b310627</author>
         <link>https://padlet.com/letranger1/i1visu0cdqg0wzhx/wish/3167360509</link>
         <description><![CDATA[<p><a rel="noopener noreferrer nofollow" href="https://docs.google.com/document/d/1rBwmCoPb282l2MbA9kPNI6Jipr90udmg3v5r0UoI68Y/edit?usp=sharing">https://docs.google.com/document/d/1rBwmCoPb282l2MbA9kPNI6Jipr90udmg3v5r0UoI68Y/edit?usp=sharing</a></p>]]></description>
         <enclosure url="https://docs.google.com/document/d/1rBwmCoPb282l2MbA9kPNI6Jipr90udmg3v5r0UoI68Y/edit?usp=sharing" />
         <pubDate>2024-10-14 02:57:55 UTC</pubDate>
         <guid>https://padlet.com/letranger1/i1visu0cdqg0wzhx/wish/3167360509</guid>
      </item>
      <item>
         <title>test</title>
         <author>letranger1</author>
         <link>https://padlet.com/letranger1/i1visu0cdqg0wzhx/wish/3180790196</link>
         <description><![CDATA[<p>#include&lt;bits/stdc++.h&gt;</p><p>#define int long long</p><p>using namespace std;</p><p>struct node{</p><p>    int x, y;</p><p>};</p><p>int m, n, q, a[505][505], tx, ty, stp[505][505];</p><p>int dx[4] = {0, 1, 0, -1};</p><p>int dy[4] = {1, 0, -1, 0};</p><p>bool used[505][505];</p><p>int bound(int x, int y){</p><p>    return x&gt;=0 &amp;&amp; x&lt;m &amp;&amp; y&gt;=0 &amp;&amp; y&lt;n;</p><p>}</p><p>int bfs(int r){</p><p>    queue&lt;node&gt; qq;</p><p>    int res = 0;</p><p>    stp[tx][ty] = r;</p><p>    qq.push({tx, ty});</p><p>    while(qq.size()){</p><p>        if (res &gt;= q) break;</p><p>        int cx = qq.front().x;</p><p>        int cy = qq.front().y;</p><p>        qq.pop();</p><p>        if(!used[cx][cy]) res++;</p><p>        used[cx][cy] = 1;</p><p>        if(stp[cx][cy] == 0) continue;</p><p>        for(int i=0; i&lt;4; i++){</p><p>            int nx = cx+dx[i];</p><p>            int ny = cy+dy[i];</p><p>            if(bound(nx, ny) &amp;&amp; !used[nx][ny] &amp;&amp; a[nx][ny] &gt; -1){</p><p>                if(max(stp[cx][cy]-1, a[nx][ny]) &gt; stp[nx][ny]){</p><p>                    stp[nx][ny] = max(stp[cx][cy]-1, a[nx][ny]);</p><p>                    qq.push({nx, ny});</p><p>                }</p><p>            }</p><p>        }</p><p>    }</p><p>    return res;</p><p>}</p><p>signed main(){</p><p>    ios::sync_with_stdio(0);</p><p>    cin.tie(0);</p><p>    cin &gt;&gt; m &gt;&gt; n &gt;&gt; q;</p><p>    for(int i=0; i&lt;m; i++){</p><p>        for(int j=0; j&lt;n; j++){</p><p>            cin &gt;&gt; a[i][j];</p><p>            if(a[i][j] == -2){</p><p>                tx = i;</p><p>                ty = j;</p><p>            }</p><p>        }</p><p>    }</p><p>    int l=0, r=n*m, ans=0;</p><p>    while(l &lt;= r){</p><p>        int mid = (l+r)/2;</p><p>        memset(used, 0, sizeof(used));</p><p>        memset(stp, -1, sizeof(stp));</p><p>        if(bfs(mid) &gt;= q){</p><p>            r = mid-1;</p><p>            ans = mid;</p><p>        }</p><p>        else{</p><p>            l = mid+1;</p><p>        }</p><p>    }</p><p>    cout &lt;&lt; ans &lt;&lt; '\n';</p><p>    return 0;</p><p>}</p><p><br/></p>]]></description>
         <enclosure url="" />
         <pubDate>2024-10-22 03:41:30 UTC</pubDate>
         <guid>https://padlet.com/letranger1/i1visu0cdqg0wzhx/wish/3180790196</guid>
      </item>
   </channel>
</rss>
