当前位置:网站首页>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);
}
}
}
边栏推荐
猜你喜欢
随机推荐
E. XOR Tree(树形dp/异或/最近公共祖先)
Sorry, it's hard for you to earn middle-aged money
防火墙——SNAT和DNAT策略的原理及应用、防火墙规则的备份和还原
AI全流程开发难题破解之钥
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
撰写英文文献有哪些技巧?
给图片左上角加logo标识、左下角加时间和地址、地址到达指定长度换行
小程序预览pdf
百度智能云章淼:详解企业级七层负载均衡开源软件BFE
解决reudx中的异步问题 applyMiddleware thunk
结合布林线理解现货白银走势图的方法
GTK进行rgb绘图
研究生怎么申请专利,流程是什么?
viewpager fragment data refresh
【luogu P8354】多边形(容斥)(NTT优化DP)
微信小程序如何开通支付功能?
十一、HikariCP源码分析之HouseKeeper
Small program WeChat positioning is not accurate
刀具更换策略问题(完工)
四、HikariCP源码分析之初始化分析一