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 <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 <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 "scales.h" | |
#include <map> | |
#include <set> | |
#include <cassert> | |
#include <algorithm> | |
using namespace std; | |
inline int _getMedian(int arr[6], int a, int b, int c) | |
{ |
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 "boxes.h" | |
#include <algorithm> | |
using namespace std; | |
const int MAXN = 5<<22; | |
long long pref[MAXN], suff[MAXN]; | |
long long delivery(int n, int k, int l, int p[]) |
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 "horses.h" | |
#include <set> | |
#include <iostream> | |
using namespace std; | |
typedef long long llint; | |
const int MAXN = 1<<19; | |
const llint MAX = 1<<30; |
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 INF = 1<<20; | |
string s; | |
template<typename T1, typename T2> | |
inline ostream& operator<<(ostream& in, const pair<T1, T2>& x) |
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 llint = long long; | |
const int MAXN = 1<<19; | |
const llint INF = 1ll<<60; | |
struct fair |
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 llint = long long; | |
const int MAXN = 100100; | |
const llint MOD = 1e9; | |
int n; | |
pair<int, int> points[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 "question.h" | |
using namespace std; | |
// Dummy implmenentation. | |
// No communication between two namespaces please. | |
namespace PlayerA | |
{ | |
int arr[13] = {1, 1, 2, 3, 6, 10, 20, 35, 70, 126, 252, 462, 924}; |