全部评论
今天的
if count == m*n { fmt.Println("Yes") fmt.Println(k) return } fmt.Println("No") fmt.Println(m*n-count) }
我也是, 第二题 func main() { var n, m, k int var s string fmt.Scanf("%d %d %d", &n,&m,&k) fmt.Scanf("%s", &s) data := make([][]int, n) for i,_ := range data { data[i] = make([]int, m) } data[0][0] = 1 count := 1 tempi := 0 tempj := 0 for i:=0; i<k; i++ { fmt.Println(tempi, tempj, data[tempi][tempj], s[i], count) if count == m*n { fmt.Println("Yes") fmt.Println(i) return } if s[i] == 'W&(30501)#39; { if tempi > 0 { tempi-- if data[tempi][tempj] == 0 { data[tempi][tempj] = 1 count++ } } } else if s[i] == 'D' { if tempj < m-1 { tempj++ if data[tempi][tempj] == 0 { data[tempi][tempj] = 1 count++ } } } else if s[i] == 'S&(30503)#39; { if tempi < n-1 { tempi++ if data[tempi][tempj] == 0 { data[tempi][tempj] = 1 count++ } } } else { if tempj > 0 { tempj-- if data[tempi][tempj] == 0 { data[tempi][tempj] = 1 count++ } } } }
我用的js 第一题也是过不了... 以为自己错了 看了下别人解法和我一模一样 至今不知道为什么
我也用的go,能过的
用的scan输入还是newreader
相关推荐
书海为家:我来给一点点小建议,因为毕竟还在学校不像工作几年的老鸟有丰富的项目经验,面试官在面试在校生的时候更关注咱们同学的做事逻辑和思路,所以最好在简历中描述下自己做过项目的完整过程,比如需求怎么来的,你对需求的解读,你想到的解决办法,遇到困难如何找人求助,最终项目做成了什么程度,你从中收获了哪些技能,你有什么感悟。 点赞 评论 收藏
分享
点赞 评论 收藏
分享