admin管理员组文章数量:1487745
使用鼠标点击矩阵上下左右的数字初始化为1 计算所需总共点击次数矩阵所有数字变成1的时间算法
代码语言:txt复制import java.util.ArrayList;
public class HuaweiTest2 {
public static void main(String[] args) {
// System.out.println("Hello World!");
}
public static Integer getMilliSecondsForInputInicialize2One(String inputStr){
String trim = inputStr.trim();
if (trim==null){
return null;
}
if (trim.isEmpty()){
return null;
}
String[] split = trim.split("\\s");
String s = split[0];
String trim1 = s.trim();
Integer i1 = Integer.valueOf(trim1);
String s1 = split[1];
String trim2 = s1.trim();
Integer i2 = Integer.valueOf(trim2);
ArrayList<ArrayList<Integer>> arrayLists = new ArrayList<>();
ArrayList<Integer> integers = new ArrayList<>();
for (int i = 0; i < split.length; i++) {
if ((integers.size()+1)%i2==0){
continue;
}else {
ArrayList<Integer> integers1 = new ArrayList<>();
String s2 = split[i+2];
integers1.add(Integer.valueOf(s2));
String s3 = split[i+3];
integers1.add(Integer.valueOf(s3));
String s4 = split[i+4];
integers1.add(Integer.valueOf(s4));
arrayLists.add(integers1);
integers=integers1;
}
}
return null;
}
}
class MetrixSynchronizedInput{
private String id;
private Integer mLine;
private Integer nColmn;
private Integer dataInt;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getmLine() {
return mLine;
}
public void setmLine(Integer mLine) {
this.mLine = mLine;
}
public Integer getnColmn() {
return nColmn;
}
public void setnColmn(Integer nColmn) {
this.nColmn = nColmn;
}
public Integer getDataInt() {
return dataInt;
}
public void setDataInt(Integer dataInt) {
this.dataInt = dataInt;
}
}
class MetrixCordination{
private String id;
private Integer inicializeIIndex;
private Integer inicializeJIndex;
private Integer anotherExpandKIndex;
private Integer anotherExpandLIndex;
private String metixSynchronizedInputId;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getInicializeIIndex() {
return inicializeIIndex;
}
public void setInicializeIIndex(Integer inicializeIIndex) {
this.inicializeIIndex = inicializeIIndex;
}
public Integer getInicializeJIndex() {
return inicializeJIndex;
}
public void setInicializeJIndex(Integer inicializeJIndex) {
this.inicializeJIndex = inicializeJIndex;
}
public Integer getAnotherExpandKIndex() {
return anotherExpandKIndex;
}
public void setAnotherExpandKIndex(Integer anotherExpandKIndex) {
this.anotherExpandKIndex = anotherExpandKIndex;
}
public Integer getAnotherExpandLIndex() {
return anotherExpandLIndex;
}
public void setAnotherExpandLIndex(Integer anotherExpandLIndex) {
this.anotherExpandLIndex = anotherExpandLIndex;
}
public String getMetixSynchronizedInputId() {
return metixSynchronizedInputId;
}
public void setMetixSynchronizedInputId(String metixSynchronizedInputId) {
this.metixSynchronizedInputId = metixSynchronizedInputId;
}
}
本文标签: 使用鼠标点击矩阵上下左右的数字初始化为1 计算所需总共点击次数矩阵所有数字变成1的时间算法
版权声明:本文标题:使用鼠标点击矩阵上下左右的数字初始化为1 计算所需总共点击次数矩阵所有数字变成1的时间算法 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/shuma/1755024684a3182608.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论