How to write code to realize stock trading
This article introduces the relevant knowledge of "how to write code to achieve stock trading". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
As long as you can make a profit, buy one day and sell the next day.
# include#include#include#includeusing namespace std;const int N = 100010 int nmittint price [N]; int res;int main () {scanf ("% d", & n); for (int item0)