Code Monkey home page Code Monkey logo

pacman4567 / minimax-problem Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 13 KB

This repository contains a C++ solution to the "Maximum Minimization" problem. The problem involves selecting two arrays from a set of arrays and forming a new array such that the minimum element of each position in the new array is maximized.

Home Page: https://codeforces.com/problemset/problem/1288/D

License: Apache License 2.0

C++ 100.00%
2000 binary-search bitmasks cpp

minimax-problem's Introduction

Maximum Minimization

This repository contains a solution to the "Maximum Minimization" problem. The problem involves selecting two arrays from a set of arrays and forming a new array such that the minimum element of each position in the new array is maximized. The problem statement is as follows:

Problem Description

You are given n arrays, each consisting of m integers. You need to choose two arrays, ai and aj, such that the value of min_k=1^m bk is maximized, where bk=max(ai,k,aj,k).

For detailed problem description and examples, refer to the problem statement.

Solution

The solution to this problem uses a binary search algorithm to find the maximum possible minimum value. The code is implemented in C++ for efficiency.

Usage

  1. Clone this repository:

    git clone https://github.com/your-username/maximum-minimization.git
    
  2. Compile the C++ code:

    g++ -o max_minimization max_minimization.cpp
    
  3. Create an input file (e.g., input.txt) with the input data.

  4. Run the program with the input file:

    ./max_minimization < input.txt
    
  5. The program will output the indices of the two selected arrays, i and j.

Contributing

Contributions are welcome! If you have any improvements or suggestions, please open an issue or create a pull request.

The End!

minimax-problem's People

Contributors

pacman4567 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.