#include<bits/stdc++.h> using namespace std; #define ll long long #define pi (4*atan(1.0)) #define eps 1e-14 ,M=4e6+,inf=1e9+,mod=1e9+; ; struct is { int x; int pos; }a[N]; int cmp1(is a,is b) { if(a.x!=b.x) return a.x<b.x; return a.pos<b.pos;…
Stock Prices Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 987 Accepted Submission(s): 397 Problem Description Buy low, sell high. That is what one should do to make profit in the stock ma…
洛谷 CF1234A Equalize Prices Again 洛谷传送门 题目描述 You are both a shop keeper and a shop assistant at a small nearby shop. You have nn goods, the ii -th good costs a_i*a**i* coins. You got tired of remembering the price of each product when customers ask fo…
链接: https://codeforces.com/contest/1234/problem/A 题意: You are both a shop keeper and a shop assistant at a small nearby shop. You have n goods, the i-th good costs ai coins. You got tired of remembering the price of each product when customers ask fo…
There are n products in the shop. The price of the ii-th product is aiai. The owner of the shop wants to equalize the prices of all products. However, he wants to change prices smoothly. In fact, the owner of the shop can change the price of some pro…