game-engineer:classes:2022:game-programing-2:first-term:1:01-16-xx09

#include <iostream>
#include <vector>
 
 
using std::cout;
using std::cin;
using std::endl;
using std::vector;
//Guess.Construct.Repair.
 
int main()
{
	vector<int> An;
	int tmpN,tmpAn;
	cin >> tmpN;
	cin >> tmpAn;
	An.push_back(tmpAn);
	cin >> tmpAn;
	An.push_back(tmpAn);
	for (int i = 1; i < tmpN-1; i++)
	{
		An.push_back(An[i] - An[i - 1]);
	}
	for (auto n : An)
	{
		cout << n << " ";
	}
}
  • game-engineer/classes/2022/game-programing-2/first-term/1/01-16-xx09.txt
  • 最終更新: 3年前
  • by root