Skip to content

svonava/heavylighttree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

Implementation of tree data structure that supports CHANGE and QUERY operations as defined below.

Given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1:

  • CHANGE i ti change the cost of the i-th edge to ti
  • QUERY a b ask for the maximum edge cost on the path from node a to node b

How to run

  1. Install gcc 9.4.0 (ubuntu package called g++, version: 4:9.3.0-1ubuntu2)
  2. Compile with g++ main.cpp
  3. Run with ./a.out < in.txt > out.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages