'commit'
9
TangDou/LanQiaoBei/LanQiao14STEMA202302/1.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
int main() {
|
||||
int n;
|
||||
cin >> n;
|
||||
printf("%d\n", n - 1 + n + 1);
|
||||
return 0;
|
||||
}
|
||||
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/1.jpg
Normal file
|
After Width: | Height: | Size: 243 KiB |
21
TangDou/LanQiaoBei/LanQiao14STEMA202302/2.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
int n, m;
|
||||
int cnt;
|
||||
bool check(int x) {
|
||||
while (x) {
|
||||
int r = x % 10;
|
||||
if (r % 2 == 0) return false;
|
||||
x /= 10;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
int main() {
|
||||
cin >> n >> m;
|
||||
for (int i = n; i <= m; i++)
|
||||
if (check(i)) cnt++;
|
||||
|
||||
printf("%d\n", cnt);
|
||||
return 0;
|
||||
}
|
||||
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/2.jpg
Normal file
|
After Width: | Height: | Size: 224 KiB |
33
TangDou/LanQiaoBei/LanQiao14STEMA202302/3.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <bits/stdc++.h>
|
||||
using namespace std;
|
||||
int n;
|
||||
const int INF = 0x3f3f3f3f;
|
||||
/*
|
||||
手推4
|
||||
0 0 0 0
|
||||
1 1 1 0
|
||||
0 0 1 1
|
||||
0 1 0 0
|
||||
1 1 1 1
|
||||
共4步
|
||||
|
||||
手推5
|
||||
0 0 0 0 0
|
||||
1 1 1 0 0
|
||||
0 0 1 1 0
|
||||
1 1 1 1 1
|
||||
共3步
|
||||
*/
|
||||
void solve(int n) {
|
||||
if (n % 3 == 0)
|
||||
cout << n / 3 << " ";
|
||||
else if (n % 3 == 1)
|
||||
cout << n / 3 - 1 + 4 << " "; // 4是4张手推结果
|
||||
else
|
||||
cout << n / 3 - 1 + 3 << " "; // 3是5张手推结果
|
||||
}
|
||||
|
||||
int main() {
|
||||
for (int i = 1; i <= 20; i++) solve(i);
|
||||
return 0;
|
||||
}
|
||||
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/3.jpg
Normal file
|
After Width: | Height: | Size: 228 KiB |
35
TangDou/LanQiaoBei/LanQiao14STEMA202302/4.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
const int N = 110;
|
||||
int n, m;
|
||||
int a[N][N], s[N][N];
|
||||
int res;
|
||||
/*
|
||||
4 5
|
||||
1 1 0 0 0
|
||||
1 0 1 0 0
|
||||
0 0 0 1 1
|
||||
0 0 0 1 0
|
||||
|
||||
答案:6
|
||||
*/
|
||||
int main() {
|
||||
cin >> n >> m;
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = 1; j <= m; j++) {
|
||||
cin >> a[i][j];
|
||||
s[i][j] = s[i - 1][j] + s[i][j - 1] - s[i - 1][j - 1] + a[i][j];
|
||||
}
|
||||
|
||||
for (int x1 = 1; x1 <= n; x1++)
|
||||
for (int y1 = 1; y1 <= m; y1++)
|
||||
for (int x2 = x1 + 1; x2 <= n; x2++)
|
||||
for (int y2 = y1 + 1; y2 <= m; y2++) {
|
||||
if (s[x2][y2] - s[x1 - 1][y2] - s[x2][y1 - 1] + s[x1 - 1][y1 - 1] == 0)
|
||||
res = max(res, (x2 - x1 + 1) * (y2 - y1 + 1));
|
||||
}
|
||||
|
||||
printf("%d\n", res);
|
||||
return 0;
|
||||
}
|
||||
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/4.jpg
Normal file
|
After Width: | Height: | Size: 252 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/5.jpg
Normal file
|
After Width: | Height: | Size: 223 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC1_1.jpg
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC1_2.jpg
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC2_1.jpg
Normal file
|
After Width: | Height: | Size: 123 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC2_2.jpg
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC3_1.jpg
Normal file
|
After Width: | Height: | Size: 144 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC3_2.jpg
Normal file
|
After Width: | Height: | Size: 174 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC3_3.jpg
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC4_1.jpg
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC4_2.jpg
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
TangDou/LanQiaoBei/LanQiao14STEMA202302/BC4_3.jpg
Normal file
|
After Width: | Height: | Size: 58 KiB |
26
TangDou/LanQiaoBei/LanQiao14STEMA202302/TD.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
const int N = 110;
|
||||
int n, m;
|
||||
int a[N][N], s[N][N];
|
||||
int res;
|
||||
int main() {
|
||||
cin >> n >> m;
|
||||
for (int i = 1; i <= n; i++)
|
||||
for (int j = 1; j <= m; j++) {
|
||||
cin >> a[i][j];
|
||||
a[i][j] = !a[i][j];
|
||||
s[i][j] = s[i - 1][j] + s[i][j - 1] - s[i - 1][j - 1] - a[i][j];
|
||||
}
|
||||
for (int x1 = 1; x1 <= n; x1++)
|
||||
for (int y1 = 1; y1 <= m; y1++)
|
||||
for (int x2 = x1 + 1; x2 <= n; x2++)
|
||||
for (int y2 = y1 + 1; y2 <= m; y2++) {
|
||||
int sum = s[x2][y2] - s[x1 - 1][y2] - s[x2][y1 - 1] + s[x1 - 1][y1 - 1];
|
||||
if ((x2 - x1 + 1) * (y2 - y1 + 1) == sum)
|
||||
res = max(res, sum);
|
||||
}
|
||||
printf("%d\n", res);
|
||||
return 0;
|
||||
}
|
||||