Tag:men and women

  • Netease 2020 / 9 / 12 written examination

    Time:2021-9-17

    Question 1 gender characteristics BFS:`var line; var j = 0; var arr = []; while(line=readline()){ var a = [];// Two dimensional array for(var k = 0; k<line; k++){ a.push(readline()); } } function init(j) { //Depth first search if(j===line){ console.log(arr.join(“-“)); return; } for(var i = 0;i<a[j].length;i++){ //Principle of reactor arr.push(aj); init(j+1); arr.pop(); } } init(j);` Question […]