当前位置:网站首页>6.1-wy16 no two
6.1-wy16 no two
2022-07-21 16:36:00 【syc596】
No two _ Niuke Tiba _ Cattle from (nowcoder.com)
//row For the line ,col Column
//x1=x2,y1=y2+2
//(x2,y2+2),(x2,y2);
//x1=x2+2,y1=y2
//(x2+2,y2),(x2,y2)
//(x,y)
//(x,y+2),(x+2,y)
import java.util.*;
public class Main{
public static void main(String[] args){
// Process input
Scanner sc=new Scanner(System.in);
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);
}
}
边栏推荐
- Difference between service and systemctl / method of modifying path / a command to view IP address, gateway and DNS server
- L'ipaylinks, un service d'intégration des paiements transfrontaliers, a remporté le prix 3A Asia de l'actif!
- 一文解析Ansible配置管理文件
- In the standard mode, the SQL node of the production environment can perform routine_ sql_ test_ Tianyi conducts sel
- Installing C3d v1.0
- Dama Chapter 5 (data modeling and Design)
- Zhaocai meow | jade meow, brother Tai pours ten thousand Liang, a pear flower, a summer rain
- 2022 the 5th China (Jinan) International Youth eye health industry exhibition was held in September
- The difference between soft link and hard link and how the file system takes files
- Jz69 jumping steps
猜你喜欢
Devaxpress treelist enables the selection of parent node column values and all its child nodes
Vr virtual reality display of industrial manufacturing plant, real three-dimensional presentation to customers
[stc15 controls ws2812 RGB color lamp cascade]
[JS] event communication
Let's go - Recruitment book for reading activities in 2022 (issue 1)
30 times performance improvement -- implementation of MyTT index library based on dolphin DB
How cloud primitives support enterprise IT governance | Alibaba cloud user group
[dip/ implementation of simple digital image processing system] high score course design paper sharing
Code implementation sequence traversal binary tree (C language)
Cluster deployment of Apache Druid 0.22 real-time analysis database on CentOS 7
随机推荐
Win64 driver kernel programming -30 Enumerating and deleting thread callbacks
JZ5 替换空格
Which is the best multilingual mall system? Comparison of three famous cross-border e-commerce manufacturers
Dama Chapter 12 (metadata management)
Solve the problem of error reporting in NPM installation NRM syntaxerror: unexpected token import
Dama Chapter 9 (document and content management)
Installing C3d v1.0
JZ24 反转链表
JZ6 从尾到头打印链表
How to ensure data security while saving 30% disk space DB · insight
Origin 2022 download nanny level installation tutorial
Is it safe for GF futures to open an account online? Are there any account opening guidelines?
Change dimension style text fill color
Visual studio easy to use plug-in sharing
How can do while call the ODPs SQL written?
一文解析Ansible配置管理文件
I2C client Drive
Jz69 jumping steps
nodejs md5 加盐值
Imitate the widget control of VTK, and make the control that draws a rectangle