This file contains 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> | |
#include <ext/pb_ds/assoc_container.hpp> | |
#include <ext/pb_ds/tree_policy.hpp> | |
#define ll long long int | |
#define test_case printf("Case %d:\n",id++); | |
using namespace std; | |
using namespace __gnu_pbds; | |
ll arr[100005],fq[100000],node[400005],ind[26],ind1[26],n,m; |
This file contains 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 ll long long int | |
#define test_case printf("Case %d:\n",id++); | |
using namespace std; | |
int arr[305]; | |
int vis[305]; | |
int lvlarr[305]; | |
vector <int> G[300]; |
This file contains 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 mx 1000005 | |
#define ll long long int | |
#define test_case printf("Case %d:\n",id++); | |
using namespace std; | |
ll arr[mx],pre_sum[mx],n; | |
vector <ll> node[4*mx]; |
This file contains 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 mx 1000005 | |
#define ll long long int | |
#define test_case printf("Case %d:\n",id++); | |
using namespace std; | |
ll cnt_zero[mx],n; | |
string arr; |
This file contains 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 mx 1000005 | |
#define ll long long int | |
#define test_case printf("Case %d:\n",id++); | |
using namespace std; | |
ll arr[mx],pre_sum[mx],n; | |
vector <ll> node[4*mx]; |
This file contains 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; | |
int arr[100005],node[400005]; | |
void init(int i,int j,int n) | |
{ | |
if(i==j) | |
{ | |
node[n]=arr[i]; |
This file contains 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 mx 10000000 | |
using namespace std; | |
int node[4*mx+1],pos[mx+1],ans[mx+1]; | |
unordered_set <int> sett; | |
void build() | |
{ | |
memset(node,-1,sizeof node); |
This file contains 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 mx 30005 | |
#define ll long long int | |
#define test_case printf("Case %d:\n",id++); | |
using namespace std; | |
int gin[mx+1],t,par[mx+1],level[mx+1],start[mx+1],endd[mx+1]; | |
int sparse_table[21][mx+1],n; | |
ll tree[2*mx+5]; |
This file contains 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 ll long long int | |
using namespace std; | |
struct NODE | |
{ | |
int one,two,three,zero,cnt; | |
NODE() | |
{ |
This file contains 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 ll long long | |
#define MAX 1000005 | |
char box[2005][2005]; | |
ll temp_row[205],n,m; |