This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Arrays; | |
| import java.util.Random; | |
| public class Main { | |
| public static void main(String[] args) { | |
| // Generate data | |
| int arraySize = 32768; | |
| int data[] = new int[arraySize]; | |
| Random rnd = new Random(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template <int MAXV, class T = int> struct Dinic { | |
| const static bool SCALING = false; // non-scaling = V^2E, Scaling=VElog(U) with higher constant | |
| int lim = 1; | |
| const T INF = numeric_limits<T>::max(); | |
| struct edge { | |
| int to, rev; | |
| T cap, flow; | |
| }; | |
| int s = MAXV - 2, t = MAXV - 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // In the name of Allah. | |
| // We're nothing and you're everything. | |
| // Ya Ali! | |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| typedef long long ll; | |
| const int maxn = 1e2 + 14, lg = 15; |