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
#include <bits/stdc++.h> | |
#define sz(v) ((int)(v).size()) | |
#define all(v) (v).begin(), (v).end() | |
using namespace std; | |
using lint = long long; | |
using pi = array<lint, 2>; | |
#define sz(v) ((int)(v).size()) | |
#define all(v) (v).begin(), (v).end() | |
#define cr(v, n) (v).clear(), (v).resize(n); |
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
#include <bits/stdc++.h> | |
#define sz(v) ((int)(v).size()) | |
#define all(v) (v).begin(), (v).end() | |
#define cr(v, n) (v).clear(), (v).resize(n); | |
using namespace std; | |
using lint = long long; | |
using pi = array<lint, 2>; | |
const int MAXN = 100005; | |
struct elem { |
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
using StaticArrays; | |
using CSV, DataFrames, JuMP, SCIP; | |
io = open("input.txt", "r"); | |
io2 = open("output.txt", "w"); | |
t = parse(Int64, readline(io)); | |
for i in 1:t | |
n, m, k = [parse(Int64, x) for x in split(readline(io))] | |
adj = zeros(Int, n, n) |
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
using StaticArrays; | |
using CSV, DataFrames, JuMP, SCIP; | |
io = open("input.txt", "r"); | |
io2 = open("output.txt", "w"); | |
t = parse(Int64, readline(io)); | |
for i in 1:t | |
n, m, k = [parse(Int64, x) for x in split(readline(io))] | |
adj = Vector{Vector{Int64}}(undef, n) |
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
#include <bits/stdc++.h> | |
#define sz(v) ((int)(v).size()) | |
#define all(v) (v).begin(), (v).end() | |
using namespace std; | |
using lint = long long; | |
using llf = long double; | |
using pi = array<int, 2>; | |
// Let a matrix be monotone if Opt(i) <= Opt(i + 1) for all rows i. | |
// Given a totally monotone matrix (where every 2x2 submatrix is monotone), find the list of row optima positions. |
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
#include <bits/stdc++.h> | |
using namespace std; | |
using pi = pair<int, int>; | |
using lint = long long; | |
#define sz(v) ((int)(v).size()) | |
#define all(v) (v).begin(), (v).end() | |
const int MAXT = 530000; | |
const lint inf = 4e18; | |
struct line { |
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
const int mod = 998244353; | |
using lint = long long; | |
lint ipow(lint x, lint p){ | |
lint ret = 1, piv = x; | |
while(p){ | |
if(p & 1) ret = ret * piv % mod; | |
piv = piv * piv % mod; | |
p >>= 1; | |
} | |
return ret; |
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
#include <bits/stdc++.h> | |
const int MAXN = 100005; | |
using namespace std; | |
using lint = long long; | |
typedef pair<lint, lint> pi; | |
typedef long long lint; | |
struct seg{ | |
int x, l, r, num; | |
}; |
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
#include <bits/stdc++.h> | |
const int MAXN = 100005; | |
using namespace std; | |
using lint = long long; | |
typedef pair<lint, lint> pi; | |
typedef long long lint; | |
struct seg{ | |
int x, l, r, num; | |
}; |
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
#include <bits/stdc++.h> | |
const int MAXN = 100005; | |
using namespace std; | |
using lint = long long; | |
typedef pair<lint, lint> pi; | |
typedef long long lint; | |
struct seg{ | |
int x, l, r, num; | |
}; |
NewerOlder