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 100005 | |
#define test_case printf("Case %d:\n",id++) | |
using namespace std; | |
int arr[mx+1],node[4*mx+1],first_pos[mx+1],freq[mx+1]; | |
unordered_map <int,int> unmap; |
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 200005 | |
using namespace std; | |
int arr[mx+1],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> | |
using namespace std; | |
struct nn | |
{ | |
int sum,prop; | |
nn() | |
{ | |
sum=0; |
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 | |
{ | |
ll pop,sum; | |
}node[400005]; |
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 N 1000000 | |
using namespace std; | |
struct st | |
{ | |
int zero,one,two,cnt; | |
st() |
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 200005 | |
#define ll long long int | |
#define test_case printf("Case %d:",id++) | |
using namespace std; | |
ll arr[mx+1],node[mx+1],n; | |
vector <pair <ll,ll> > vc; |
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; | |
int arr[100005]; | |
int main() { | |
int i,j,k,l,m,n,s,e,v,key,x,t,c=1; | |
cin>>t; |
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[2001][2001]; | |
ll temp_row[30000],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 unsigned long long int | |
using namespace std; | |
int arr[100005],node[100005],n; | |
void update(int ind,int val) | |
{ | |
for(int i=ind;i<=n;i+=(i&-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 ll long long int | |
using namespace std; | |
struct NODE | |
{ | |
ll pop,sum; | |
}node[400005]; | |