發表文章

程競資源 台中女中OJ(難度偏易) http://tcgs.tc.edu.tw:1218/ Zero Judge(難度中間) https://zerojudge.tw/ 建中OJ(難度中上) https://tioj.ck.tp.edu.tw/ 建中資訊培訓講義 ->內容完整,每一年都有不同講義,內容可相互補充,推爆 http://pisces.ck.tp.edu.tw/~peng/index.php?year=2009 (特推2009那一年的講義,內容很充實) 資訊之芽OJ(難度中上) https://neoj.sprout.tw/ ->可搭配自學網站,每一年內容差不多,可以交換看一下 資芽算法2017 https://www.csie.ntu.edu.tw/~sprout/algo2017/ 資芽算法2018 https://www.csie.ntu.edu.tw/~sprout/algo2018/ 線上程式競賽: https://codeforces.com/contests  通常⼀段時間會有⽐賽,可以爬世界排名 https://www.codechef.com/  ⼀個⽉有⼀到兩場⽐賽,題⽬有簡單有難,也有無解的神祕題
TIOJ1097 營地 題幹: 給一個0,1,2組成的平面 求0組成的最大正方形 連結: https://tioj.ck.tp.edu.tw/problems/1097 題解: 當時看到覺得頗神奇 建表當遇到0算1遇其他則算0 dp(i,j)=max(dp(i-1,j),dp(i,j-1),dp(i-1,j-1)) 空間限制要滾一下 #include <iostream> #include <algorithm> using namespace std; int d[ 2 ][ 5005 ]; int main() {     int m,n,t,mx;     while (scanf( "%d%d" ,&m,&n)== 2 &&m&&n){         mx= 0 ;         for ( int i= 0 ;i<n;i++) {             cin>>t;             d[ 0 ][i]=t== 2 ? 0 : 1 ;             if (t!= 2 )mx= 1 ;         }         for ( int i= 1 ;i<m;i++){             cin>>t;             d[ 1 ][ 0 ]=t== 2 ? 0 : 1 ;             for ( int j= 1 ;...