You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
487 B
22 lines
487 B
#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;
|
|
} |