Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们如何从任意点和指定方向螺旋打印给定矩阵?
例如 ,如果给定的矩阵是
21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 14 13
让当前位置指向 1,所需方向为顺时针方向 正确输出应为 1 2 3 4 5 6 .... 最多 25。 我正在寻找 C 或 C++ 中的逻辑和代码