Files
python/TangDou/LanQiaoBei/LanQiaoBei13ShengSai_ZJ_II/BaBa.cpp

22 lines
487 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#include <bits/stdc++.h>
using namespace std;
int cnt;
const int N = 1010;
int f[N];
int main() {
int n = 1000, m = 1000;
for (int x = 1; x <= n; x++)
for (int y = 1; y <= m; y++)
for (int len = 1;; len++) {
int tx = x + len - 1, ty = y + len - 1;
if (tx > n || ty > m) break;
f[len]++;
}
for (int i = 1; i <= min(n, m); i++)
cout << f[i] << " ";
return 0;
}