'commit'
This commit is contained in:
22
TangDou/LanQiaoBei/LanQiaoBei13ShengSai_ZJ_II/BaBa.cpp
Normal file
22
TangDou/LanQiaoBei/LanQiaoBei13ShengSai_ZJ_II/BaBa.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user