4 条题解
-
1
202502cj14 (张子瑞) LV 8 @ 2025-03-20 19:23:45
#include<bits/stdc++.h>
#define N 110
using namespace std;
char c[N][N], d[N][N];
int main(){
ios::sync_with_stdio(false);
int cnt = 0, n, m;
cin >> n;
for(int i = n+1; i >= 0; i--){
for(int j = n+1; j >= 0; j--)d[i][j] = '#';
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++)cin >> c[i][j];
}
cin >> m;
for(int ii = 1; ii < m; ii++){
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
if(c[i][j] == '@'){
if(c[i][j-1] == '.')d[i][j-1] = 'q';
if(c[i][j+1] == '.')d[i][j+1] = 'q';
if(c[i-1][j] == '.')d[i-1][j] = 'q';
if(c[i+1][j] == '.')d[i+1][j] = 'q';
}
}
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
if(d[i][j] == 'q')c[i][j] = '@';
}
}
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
if(c[i][j] == '@')cnt++;
}
}
cout << cnt;
return 0;
} -
12025-03-15 19:29:46@
你以为我们会被你骗到吗?
-
-12025-03-15 19:30:37@
深井冰
-
-12025-03-15 12:56:06@
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int N,f,z=0,i=1;
cin>>N;
for(;i<=N;i++)
{
cin>>f;
if(f<60)
z++;
}
cout<<z;
return 0;
}//专坑双胞胎
- 1
信息
- ID
- 1108
- 难度
- 2
- 分类
- (无)
- 标签
- 递交数
- 42
- 已通过
- 27
- 通过率
- 64%
- 上传者