首页 > TAG信息列表 > prea
最长公共前后缀
P2957 数据小直接暴力 遍历字串长度(从大到小),如果满足条件直接输出长度 substr函数使用 #include <bits/stdc++.h> using namespace std; #define MAX 100001 string a, b; int main() { cin >> a; cin >> b; if (a.length() < b.length()) { swap(a, b)NC24622 Brownie Slicing
NC24622 Brownie Slicing 题目 题目描述 Bessie has baked a rectangular brownie that can be thought of as an RxC grid (1 <= R <= 500; 1 <= C <= 500) of little brownie squares. The square at row i, column j contains \(N_{ij}\) (0 <= \(N_{ij}\) &l