• Bio

    WinningWinning isntisn't everythingeverything, butbut wantingwanting itit isis. 获胜并不能代表一切,而求胜心则可以。

    QwQCSP-J使studentI AK IOI!\small\texttt{\color{#FA4129}本}\huge\texttt{\color{#FE9019}人}_{\small\texttt{\color{#FFE304}的}^{\large\texttt{\color{#FFEC01}萌\color{#FFF900}新}\small\texttt{\color{#FCFB03}Q\color{#F8FB07}w\color{#F1FB0B}Q}}}^{\large\texttt{\color{#FFB511}是}{\small\texttt{\color{#FFDC07}刚\color{#FFEF00}学}\large\texttt{\color{#FFF600}CSP\color{#FFFA00}-J}}}\huge\texttt{\color{#E6F911}但\color{#92E82F}是}^{\large\texttt{\color{#39D54B}即}{\small\texttt{\color{#03C767}使}}}_{\normalsize\text{\color{#07C964}是\color{#00C789}这\color{#00C7A5}样}}\texttt{\color{#00CBC6}我\color{#00D0EB}也}^{\small\texttt{\color{#00D0F2}要}\normalsize\texttt{\color{#00D0F6}用}\texttt{\color{#03BEF4}stu}_{\texttt{\color{#04AAEF}dent}\large\texttt{\color{#078DE4}的}}}_{\scriptsize\texttt{\color{#01CDF6}声\color{#03C2F5}音\color{#04B4F2}大\color{#04A7EE}声\color{#0791E6}喊\color{#0A7BDD}出}}\mathcal{\color{#125BCD}I\space\color{#3D2AB5}AK\space\color{#A011AD}IOI!}

    该用户的各大OJOJ账号:


    该用户大事记(CCFCCF活动):

    1. 2023202366月,首次GESPGESPC++C++44级认证,也是第一次参加CCFCCF系比赛/考级(因可能的压分5959QwQQwQ)。
    2. 20232023991616日,第11次参加CSPJ/SCSP-J/S,第一轮JJ74.574.5分稳过(也是稳稳的全国一等),SS45.545.5分,差GDGD分数线11分(全国二等都没过CAOCAO)……
    3. 20232023992323日,再战GESPGESPC++C++44级,6969通过
    4. 2023202310102121日,参加pjpj比赛,就会ABAB两题还全炸了……啥奖没有QwQQwQ

    该用户大事记(CCFCCF活动):

    1. 2023202366月,首次GESPGESPC++C++44级认证,也是第一次参加CCFCCF系比赛/考级(因可能的压分5959QwQQwQ)。
    2. 20232023991616日,第11次参加CSPJ/SCSP-J/S,第一轮JJ74.574.5分稳过(也是稳稳的全国一等),SS45.545.5分,差GDGD分数线11分(全国二等都没过CAOCAO)……
    3. 20232023992323日,再战GESPGESPC++C++44级,6969通过

    20232023881414日发生于本站的11bugbug

    #include <bits/stdc++.h>
    
    using namespace std;
    
    const int N = 110, dx[4] = {-1, 1, 0, 0}, dy[4] = {0, 0, -1, 1};
    int n, m, mx, mp[N][N], dp[N][N];
    
    void dfs(int x, int y, int depth) {
    	if (x < 1 || x > n || y < 1 || y > m)
    		return;
    	if (dp[x][y] >= depth)
    		return;
    	dp[x][y] = depth;
    	mx = max(mx, depth);
    	for (int i = 0;i < 4;i++) {
    		int nowx = x + dx[i], nowy = y + dy[i];
    		if (mp[nowx][nowy] < mp[x][y])
    			dfs(nowx, nowy, depth + 1);
    	}
    }
    
    int main() {
    	scanf("%d%d", &n, &m);
    	for (int i = 1;i <= n;i++) {
    		for (int j = 1;j <= m;j++) {
    			scanf("%d", &mp[i][j]);
    		}
    	}
    	for (int i = 1;i <= n;i++) {
    		for (int j = 1;j <= m;j++) {
    			dfs(i, j, 1);
    		}
    	}
    	printf("%d\n", mx);
    	return 0;
    }
    

    结果:image

    #include <bits/stdc++.h>
    
    using namespace std;
    
    const int N = 110, dx[4] = {-1, 1, 0, 0}, dy[4] = {0, 0, -1, 1};
    int n, m, mx, mp[N][N], dp[N][N];
    
    void dfs(int x, int y, int depth) {
    	if (x < 1 || x > n || y < 1 || y > m) {
    		return;
    	}
    	if (dp[x][y] >= depth) {
    		return;
    	}
    	dp[x][y] = depth;
    	if (mx < depth)
    		mx = depth;  // 注意看,我把max函数拆开了
    	for (int i = 0;i < 4;i++) {
    		int nowx = x + dx[i], nowy = y + dy[i];
    		if (mp[nowx][nowy] < mp[x][y]) {
    			dfs(nowx, nowy, depth + 1);
    		}
    	}
    }
    
    int main() {
    	scanf("%d%d", &n, &m);
    	for (int i = 1;i <= n;i++) {
    		for (int j = 1;j <= m;j++) {
    			scanf("%d", &mp[i][j]);
    		}
    	}
    	for (int i = 1;i <= n;i++) {
    		for (int j = 1;j <= m;j++) {
    			dfs(i, j, 1);
    		}
    	}
    	printf("%d\n", mx);
    	return 0;
    }
    

    结果:image

    该用户:CAOCAOTMDTMD老子再也不用什么STLSTL啥的内置函数了……


    第二天

    priority_queue<int> a;

    TheThe End.End.

  • Accepted Problems

  • Recent Activities

    This person is lazy and didn't join any contests or homework.
  • Recent Solutions

    This person is lazy and didn't write any solutions.
  • Stat

  • Rating