摘要:
#include #include using namespace std;int main(){ vector p; int x; while (cin>>x) { p.push_back(x); } int p_size=p.size(); ... 阅读全文
posted @ 2014-04-20 15:53
jonathan321
阅读(1261)
评论(0)
推荐(0)
摘要:
一个数组A中存有N(N>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(M>=0)个位置,即将A中的数据由(A0A1……AN-1)变换为(AN-M…… AN-1A0A1……AN-M-1)(最后M个数循环移至最前面的M个位置)。如果需要考虑程序移动数据的次数尽量少,要如何设计移动的方... 阅读全文
posted @ 2014-04-20 14:15
jonathan321
阅读(161)
评论(0)
推荐(0)

浙公网安备 33010602011771号