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; | |
const int MAXN = 300000; | |
int color[MAXN]; | |
vector<int> edges[MAXN]; | |
long long cnt[MAXN][5]; | |
long long cnt2[MAXN][5][5]; |
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; | |
const int MAXN = 100100; | |
int n, k; | |
int arr[MAXN]; | |
vector<int> edges[MAXN]; | |
int cost[MAXN]; |
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 "friend.h" | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int MAXN = 100100; | |
int take[MAXN], dont[MAXN]; |
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 "gondola.h" | |
#include <bits/stdc++.h> | |
using namespace std; | |
void fix(int n, int inputSeq[]) | |
{ | |
auto mn = min_element(inputSeq, inputSeq + 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> | |
using namespace std; | |
#define llint long long | |
const int MAXN = 2000100; | |
const llint A = 29; | |
const llint B = 31; | |
const llint MOD1 = 1000000007; |
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; | |
multiset<pair<int, int>> rooms; | |
multiset<pair<int, int>, greater<pair<int, int>>> offers; | |
vector<int> profits; | |
int main() | |
{ |
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 Ldouble = long double; | |
using namespace std; | |
stack<pair<int, Ldouble>> balloons; | |
int main() | |
{ |
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; | |
typedef long long llint; | |
int A, B, L; | |
llint f(int dy) | |
{ |
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; | |
vector<int> sols(1, 1), curr; | |
int main() | |
{ | |
ios_base::sync_with_stdio(false); | |
cin.tie(NULL); |
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; | |
const int MOD = 10007; | |
int fact[MOD], inv[MOD]; | |
int r[10], c[10]; |