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

Укажите логический тип величины : 1)инверсия 2)1 3) нет 4)true 5)ложь 6)наверное

👇
Ответ:
Мой ответ могут удалить, но там сто проц 5
5)ложь
4,7(16 оценок)
Открыть все ответы
Ответ:
герман136
герман136
14.05.2023

#include <iostream>

#include <map>

#include <vector>

#include <set>

#include <stack>

#include <bitset>

#include <queue>

#include <algorithm>

#include <iomanip>

#include <unordered_map>

#include <unordered_set>

#include <cmath>

#include <cassert>

#include <random>

#pragma GCC target("avx,avx2,sse3,ssse3,sse4.1,sse4.2,tune=native")

#pragma GCC optimize(3)

#pragma GCC optimize("O3")

#pragma GCC optimize("inline")

#pragma GCC optimize("-fgcse")

#pragma GCC optimize("-fgcse-lm")

#pragma GCC optimize("-fipa-sra")

#pragma GCC optimize("-ftree-pre")

#pragma GCC optimize("-ftree-vrp")

#pragma GCC optimize("-fpeephole2")

#pragma GCC optimize("-fsched-spec")

#pragma GCC optimize("-falign-jumps")

#pragma GCC optimize("-falign-loops")

#pragma GCC optimize("-falign-labels")

#pragma GCC optimize("-fdevirtualize")

#pragma GCC optimize("-fcaller-saves")

#pragma GCC optimize("-fcrossjumping")

#pragma GCC optimize("-fthread-jumps")

#pragma GCC optimize("-freorder-blocks")

#pragma GCC optimize("-fschedule-insns")

#pragma GCC optimize("inline-functions")

#pragma GCC optimize("-ftree-tail-merge")

#pragma GCC optimize("-fschedule-insns2")

#pragma GCC optimize("-fstrict-aliasing")

#pragma GCC optimize("-falign-functions")

#pragma GCC optimize("-fcse-follow-jumps")

#pragma GCC optimize("-fsched-interblock")

#pragma GCC optimize("-fpartial-inlining")

#pragma GCC optimize("no-stack-protector")

#pragma GCC optimize("-freorder-functions")

#pragma GCC optimize("-findirect-inlining")

#pragma GCC optimize("-fhoist-adjacent-loads")

#pragma GCC optimize("-frerun-cse-after-loop")

#pragma GCC optimize("inline-small-functions")

#pragma GCC optimize("-finline-small-functions")

#pragma GCC optimize("-ftree-switch-conversion")

#pragma GCC optimize("-foptimize-sibling-calls")

#pragma GCC optimize("-fexpensive-optimizations")

#pragma GCC optimize("inline-functions-called-once")

#pragma GCC optimize("-fdelete-null-pointer-checks")

using namespace std;

const int N = 3e5 + 100, A = 2e5 + 100, MOD = 1e9 + 7, INF = 1e18;

template <typename A, typename B>

string to_string(pair<A, B> p);

template <typename A, typename B, typename C>

string to_string(tuple<A, B, C> p);

template <typename A, typename B, typename C, typename D>

string to_string(tuple<A, B, C, D> p);

string to_string(const string& s) {

   return '"' + s + '"';

}

string to_string(const char* s) {

   return to_string((string) s);

}

string to_string(bool b) {

   return (b ? "true" : "false");

}

string to_string(vector<bool> v) {

   bool first = true;

   string res = "{";

   for (int i = 0; i < static_cast<int>(v.size()); i++) {

       if (!first) {

           res += ", ";

       }

       first = false;

       res += to_string(v[i]);

   }

   res += "}";

   return res;

}

template <size_t N>

string to_string(bitset<N> v) {

   string res = "";

   for (size_t i = 0; i < N; i++) {

       res += static_cast<char>('0' + v[i]);

   }

   return res;

}

template <typename A>

string to_string(A v) {

   bool first = true;

   string res = "{";

   for (const auto &x : v) {

       if (!first) {

           res += ", ";

       }

       first = false;

       res += to_string(x);

   }

   res += "}";

   return res;

}

void solve();

int main() {

   ios::sync_with_stdio(0);

   cin.tie(0);

#ifdef DEBUG

   freopen("input.txt", "r", stdin);

#endif

   solve();

}

template <typename A, typename B>

string to_string(pair<A, B> p) {

   return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";

}

template <typename A, typename B, typename C>

string to_string(tuple<A, B, C> p) {

   return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";

}

void solve() {

   int n;

   cin >> n;

   vector < int > a;

   a.resize(n);

   mt19937 mt(time(0));

   for (int i = 0; i < n; i++) {

       a[i] = mt();

   }

   int mx = -INF;

   for (int i = 0; i < n / 2; i++) {

       mx = max(mx, a[i]);

   }

   for (int i = 0; i < n / 2; i++) {

       a[i] -= mx;

   }

   for (int i = n / 2 - 1; i >= 0; i--) {

       cout << a[i] << " ";

   }

   cout << '\n';

   mx = -INF;

   for (int i = n / 2; i < n; i++) {

       mx = max(mx, a[i]);

   }

   for (int i = n / 2; i < n; i++) {

       a[i] -= mx;

       cout << a[i] << " ";

   }

   cout << '\n';

}

template <typename A, typename B, typename C, typename D>

string to_string(tuple<A, B, C, D> p) {

   return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";

}

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>

void debug_out(Head H, Tail... T) {

   cerr << " " << to_string(H);

   debug_out(T...);

}

4,7(27 оценок)
Ответ:
favorit19971
favorit19971
14.05.2023
Следует отметить, что 1 условие выполняется во всех цепочках, а значит его можно не рассматривать.
Рассмотрим каждую комбинацию отдельно:
HDEE
2 условие - true
3 условие - true
4 условие - true
Подходит
HHAE
2 условие - true
3 условие - false(H на 2 месте)
HEAE
2 условие - true
3 условие - true
4 условие - true
Подходит
AHAH
2 условие - true
3 условие - true
4 условие - true
Подходит
AEAD
2 условие - true
3 условие - true
4 условие - true
Подходит
AEED
2 условие - false(E на 3 месте)
CAEH
2 условие - false(A не входит в список допустимых значений)
EHAD
2 условие - true
3 условие - false(E не входит в список допустимых значений)
CDEA
2 условие - true
3 условие - true
4 условие - false(A не входит в список допустимых значений)
ответ: 4
4,5(31 оценок)
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ