М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
иимром
иимром
14.01.2021 16:17 •  Информатика

организовать FAT-таблицы с именем файла, с расширением и размером, и вывод таблицы файлов с заданным расширением. (Прога с++)

👇
Открыть все ответы
Ответ:
Anastasia2003272
Anastasia2003272
14.01.2021
Uses graphabc;
 const
  W = 600;
  H = 600;

 function F(x: real): real;
begin
  F := sqr(x);
end;

 var
  x0, y0, x, y, xLeft, yLeft, xRight, yRight: integer;
  a, b, fmin, fmax, x1, y1, mx, my: real;
 begin

  window.Init(0, 0, 800, 500, clwhite);
  window.IsFixedSize := true;
  xRight := 590;
  yRight := 590;
  a := -15;
  b := 6;
  fmin := -10;
  fmax := 20;
  mx := (xRight - xLeft) / (b - a);
  my := (yRight - yLeft) / (fmax - fmin);
   x0 := 380;
  y0 := 490;
  x1 := a;
   while x1 <= b do
  begin
     y1 := F(x1);
     x := x0 + round(x1 * mx);
     y := y0 - round(y1 * my);
     if (y >= 10) and (y <= 590) then SetPixel(x, y, clblack);
     x1 := x1 + 0.001 ;
  end;
end.
4,5(20 оценок)
Ответ:
playerkeks
playerkeks
14.01.2021
Код#include <iostream>#include <utility>#include <numeric>#include <vector>class Beast {    int trigger;    double aggression;    double rage_aggression;public:    Beast() = default;    Beast(int trigger, double aggression, double range_aggression)    : trigger(trigger), aggression(aggression), rage_aggression(range_aggression)    { }    Beast(const Beast&) = default;    Beast(Beast&&) = default;    Beast& operator=(const Beast&) = default;    Beast& operator=(Beast&&) = default;    [[nodiscard]] double calculate_aggression(unsigned long amount) const {        return amount > trigger ? rage_aggression : aggression;    }    void ReadFrom (std::istream& is) {        is >> aggression >> rage_aggression >> trigger;    }    void WriteTo(std::ostream &os) const {        os << aggression << " " << rage_aggression << " " << trigger;    }};std::istream& operator >>(std::istream &is, Beast &cls) {    cls.ReadFrom(is);    return is;}std::ostream& operator <<(std::ostream &os, const Beast &cls) {    cls.WriteTo(os);    return os;}class Cage {    double durability;    std::vector<Beast> container;public:    explicit Cage(double durability, std::vector<Beast> container)    : durability(durability), container(std::move(container))    { }    Cage(const Cage&) = default;    Cage(Cage&&) = default;    Cage& operator=(const Cage&) = default;    Cage& operator=(Cage&&) = default;    [[nodiscard]] double calculate_aggressive() const {        auto amount = container.size();        if (amount == 0) return 0;        return std::accumulate(container.begin(), container.end(), 0.0,        [amount](double total_aggressive, const Beast & beast){            return total_aggressive + beast.calculate_aggression(amount);        });    }    [[nodiscard]] bool is_it_normal() const {        auto aggressive = calculate_aggressive();        return aggressive <= durability;    }    [[nodiscard]] int get_capacity() const {        return container.size();    }    [[nodiscard]] double get_durability() const {        return durability;    }};template <typename T>void subsetsUtil(std::vector<T>& A, std::vector<std::vector<T> >& res,                 std::vector<T>& subset, int index){    res.push_back(subset);    for (int i = index; i < A.size(); i++) {        // include the A[i] in subset.        subset.push_back(A[i]);        // move onto the next element.        subsetsUtil(A, res, subset, i + 1);        // exclude the A[i] from subset and triggers        // backtracking.        subset.pop_back();    }}template <typename T>std::vector<std::vector<T>> P(std::vector<T>& A){    std::vector<T> subset;    std::vector<std::vector<T>> res;    int index = 0;    subsetsUtil(A, res, subset, index);    return res;}int main () {    int n, s;    Beast noname{};    std::vector<Beast> set_of_beasts;    std::cin >> n >> s;    for (auto i = 0; i < n; ++i) {        std::cin >> noname;        set_of_beasts.push_back(noname);    }    auto selections = P(set_of_beasts);    std::vector<Cage> variants;    std::transform(selections.begin(), selections.end(), std::back_inserter(variants), [s](std::vector<Beast> &selection){        return Cage(s, selection);    });    std::vector<Cage> true_variants;    std::copy_if(variants.begin(), variants.end(), std::back_inserter(true_variants), [](Cage& x) {return x.is_it_normal();});    auto the_best_of_the_best_variant = *std::max_element(true_variants.begin(), true_variants.end(), [](Cage & s1, Cage & s2){        return s1.get_capacity() < s2.get_capacity();    });    std::cout << the_best_of_the_best_variant.get_capacity();    return 0;}
У Арсения есть n зверьков. Каждый из них обладает характером, поэтому, если в клетке, где находится
У Арсения есть n зверьков. Каждый из них обладает характером, поэтому, если в клетке, где находится
4,6(73 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
Полный доступ к MOGZ
Живи умнее Безлимитный доступ к MOGZ Оформи подписку
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ