我一定要认真读题 #2
2025-09-21 22:11:48
发布于:广东
23阅读
0回复
0点赞
赛时代码:
#include <iostream>
#include <cstdio>
#include <algorithm>
#define int long long
using namespace std;
int a[105][105];
int n, m, k, s, x, y;
signed main(){
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
cin >> n >> m >> k >> s >> x >> y;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
cin >> a[i][j];
}
}
int val = max({a[x][y], a[x - 1][y], a[x][y - 1], a[x + 1][y], a[x][y + 1]});
if(m * s <= val * k) cout << "yes";
else cout << "See you again";
return 0;
}
AC代码:
#include <iostream>
#include <cstdio>
#include <algorithm>
#define int long long
using namespace std;
int a[105][105];
int n, m, k, s, x, y;
signed main(){
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
cin >> n >> m >> k >> s >> x >> y;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
cin >> a[i][j];
}
}
int val = max({a[x][y], a[x - 1][y], a[x][y - 1], a[x + 1][y], a[x][y + 1]});
if(m * s <= val * k) cout << "yes";
else cout << "See you again.";
return 0;
}
全部评论 4
受着
4分钟前 来自 浙江
0到底是这两段都一模一样,还是我眼瞎。
20小时前 来自 江西
0注意到again后面的点
20小时前 来自 广东
06
1小时前 来自 江西
0
d
20小时前 来自 广东
0666
20小时前 来自 香港
0
有帮助,赞一个