B. Valera and Fruits time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Valera loves his garden, where n fruit trees grow. This year he will enjoy a great harvest! On the i-th tree bi fruit gr…
#include <iostream> #include <vector> #include <algorithm> #include <map> using namespace std; int main(){ int n,v; cin >> n >>v; map<int,int> fruit; ; i < n; ++ i ){ int a,b; cin >>a >> b; if(fruit…
A. Valera and X time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Valera is a little boy. Yesterday he got a huge Math hometask at school, so Valera didn't have enough time to properly learn…
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ int n,k,l,r,s_n,s_k; cin >> n >> k >> l >> r >> s_n >> s_k; int s_n_k = s_n-s_k; int average_k = s_k/k,left_k…