当前位置:网站首页>WY16 不要二
WY16 不要二
2022-07-29 21:49:00 【syc596】
WY16 不要二
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
int row=sc.nextInt();
int col=sc.nextInt();
int[][] array=new int[row][col];
int count=0;
for(int i=0;i<row;i++){
for(int j=0;j<col;j++){
if(array[i][j]==0){
count++;
if(i+2<row){
array[i+2][j]=1;
}
if(j+2<col){
array[i][j+2]=1;
}
}
}
}
System.out.println(count);
}
}
}边栏推荐
- GBASE 8s 通过临时表提升排序性能
- linux install redis using script
- HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
- Add a logo to the upper left corner of the picture, add time and address to the lower left corner, and wrap the line when the address reaches the specified length
- 啊?现在初级测试招聘都要求会自动化了?
- 高性能数据访问中间件 OBProxy(三):问题排查和服务运维
- 九、HikariCP源码分析之ConcurrentBag二
- 03-树2 List Leaves
- SQL教程之性能不仅仅是查询
- GBASE 8s 如何估算索引使用多少空间
猜你喜欢
随机推荐
三、HikariCP源码分析之获取连接流程三
高性能数据访问中间件 OBProxy(三):问题排查和服务运维
一篇关于Web3.0如何走向安全时代的说明
How to implement your personal knowledge base?
E. XOR Tree(树形dp/异或/最近公共祖先)
Add obsolete flag to pdf
防火墙——SNAT和DNAT策略的原理及应用、防火墙规则的备份和还原
【板栗糖GIS】wps—如何查看表格中的超链接
大陆泽、宁晋泊蓄滞洪区防洪工程与安全建设项目启动实施
chrome集成沙拉查词
OPEN数据 | 新库上线 | CnOpenDataA股上市公司社会责任报告数据
对不起,你很难赚到中年人的钱
力扣解法汇总593-有效的正方形
AI全流程开发难题破解之钥
qt中qstring合并字符串
给图片左上角加logo标识、左下角加时间和地址、地址到达指定长度换行
使用脚本安装mysql
B. Party(图论/暴力/顶点的度数)
全球都热炸了,谷歌服务器已经崩掉了
The implementation of the flood control project and safety construction project in the flood storage and detention areas in Luluze and Ningjinbo was launched









