Suzy Zhang

Home Archives About
2017-08-07
Algorithm

USACO Section5.1 theme

Problem Summary

Given an array of N integers, find the maximal length of its “repeating” subsequence.

Read More

Share Comments
  • DP
  • USACO
2017-08-07
Algorithm

USACO Section5.3 Window Area (window)

Problem Summary

Implement a windowing interface with 5 types of basic operations and a sequence of commands consisting of the basic operations.

5 basic operations:

  1. Create a window
  2. Bring a window to the top
  3. Put a window to the bottom
  4. Destroy a window
  5. Output what percentage of a window is visible (i.e., is not covered by windows above it).

Read More

Share Comments
  • Implementation
  • USACO
2017-08-06
Algorithm

USACO Section5.3 schlnet

Problem Summary

Given a software distribution network of schools, i.e. a directed graph, compute :

  1. The minimal number of shools that must receive a copy of the new software in order for it to reach all schools.

  2. The minimal number of extensions (i.e. edges) that have to be made so that whatever school we send the new software to, it will reach all other schools.

Read More

Share Comments
  • Graph Theory
  • Strongly connected components
  • Tarjan's algorithm
  • USACO
2017-08-04
Algorithm

USACO Section5.1 Fencing the Cows (fc)

Problem Summary

Given N spots on 2D plane, find the convex hull with minimem perimeter.

Read More

Share Comments
  • Convex Hull
  • Geometry
  • USACO
2017-08-04
Algorithm

USACO Section5.1 Pollutant Control(milk6)

Problem Summary

Given a directed graph, find the minimum cut.

Read More

Share Comments
  • Graph Theory
  • Minimum Cut
  • USACO
2017-08-03
Algorithm

USACO Section4.4 frameup

Problem Summary

Given a picture of several overlapping frames, find all possible sequence of the frames in the order they were stacked from bottom to top.

Read More

Share Comments
  • Partial order
  • USACO
2017-07-31
Algorithm

USACO Section4.2 ditch

Problem Summary

Given a directed graph, a source and a sink, find the maximum flow from the source to the sink.

Read More

Share Comments
  • Graph Theory
  • Maximum Flow
  • USACO
2017-07-30
Algorithm

USACO Section4.1 fence6

Problem Summary

Given a graph, find the minimum length cycle.

Read More

Share Comments
  • Graph Theory
  • Minimum length cycle
  • USACO
2017-07-29
Algorithm

USACO Section4.1 stall4

Problem summary

Given a bipartite graph, compute the size of the maximum matching.

Solution

I use Hungarian Algorithm to solve this problem.

Read More

Share Comments
  • Graph Theory
  • Hungarian Alogrithm
  • USACO
2017-07-27
Algorithm

USACO Section4.1 nuggets

Problem Summary

Given N positive integers, d[1],d[2],…d[N] (1<=N<=10, 1<=d[i]<=256), compute the largest impossible number that cannot be written as a[1]d[1]+a[2]d[2]+…+a[n]*d[n] (a[i] is non-negative integer, 1<=i<=N).
If this number does not exist, print 0.

Read More

Share Comments
  • DP
  • Number Theory
  • USACO
«Prev1…6789Next»

Categories

  • Algorithm85
  • Data Structure1

Tags

  • Array5
  • BFS3
  • Big Number1
  • Binary Search7
  • Binary Search Tree5
  • Binary tree1
  • Bit Manipulation3
  • Bucket Sort1
  • Codeforces1
  • Convex Hull1
  • Cycle Detection1
  • DFS4
  • DP23
  • DP on Trees1
  • Dijkstra1
  • Dinic1
  • Fast power1
  • Game Theory1
  • Geometry1
  • Graph Theory16
  • Greedy6
  • HackerRank18
  • Hash2
  • Heap1
  • Hungarian Alogrithm1
  • IDDFS2
  • Implementation2
  • LCA1
  • LeetCode12
  • Linked List3
  • LintCode31
  • MST1
  • Map Reduce1
  • Math1
  • Matrix1
  • Maximum Flow2
  • Merge Sort1
  • Minimum Cut2
  • Minimum length cycle1
  • Number Theory3
  • Partial order1
  • Prim1
  • Pruning2
  • SPFA1
  • Sort3
  • Stack1
  • String3
  • Strongly connected components1
  • Tarjan's algorithm1
  • Topological Sorting2
  • Tree2
  • Trie3
  • Two Pointers1
  • USACO25
  • Union-find1

Archives

  • April 20192
  • March 20192
  • November 201711
  • October 201724
  • September 201718
  • August 201719
  • July 201710

Recent Posts

  • LeetCode/Minimum Cost to Merge Stones
  • LeetCode/Lexicographical Numbers
  • LeetCode/Knight Dialer
  • LeetCode/Regions Cut by Slashes
  • LeetCode/Edit Distance
© 2020 Suzy Zhang
Powered by Hexo
Home Archives About