主页

程序填空小测试

不知道为什么,和标准答案对比,我应该得12分,而我的最终分数(评测分)为3分。 Why? Why? Why? 题目的源代码可以在这里查看 第一题 螺旋矩阵输出(5小题) 注:vis是visit的简称 (1)正确 (2)错误 原题: 2 处应填: A. vis[x][y] = 1 B. print(x, y, flag + 1) C. print(x, y+1, flag) D. vis[x][y] = 0 正确答案:A 在cout << a[x][y] << " ";之后需要将a[x][y]标记为已访问过,即vis[x][y] = 1;。23,25行已经调用过下层递归了(即print(x, y, flag)),在这里再调用一次就有点不太像话了...

阅读更多

Welcome

If you see this page, that means you have setup your site. enjoy! :ghost: :ghost: :ghost: You may want to config the site or writing a post next. Please feel free to create an issue or send me email if you have any questions.

阅读更多