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[200005],ans[200005],ansf[200005],node[800005],x; | |
void build(int ind,int i,int j) | |
{ | |
if(i==j) | |
{ |
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[200005],ans[200005],ansf[200005],node[800005],x; | |
void build(int ind,int i,int j) | |
{ | |
if(i==j) | |
{ |
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; | |
ll n,i,j,k,flag; | |
ll arr[100005]; | |
struct st{ | |
ll sum,square_sum,propagte,same_val,prev_propagate; |
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 box[9][9]; | |
void print() | |
{ |
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 | |
using namespace std; | |
ll arr[10000]; | |
int main() | |
{ | |
ll i,j,k,n,t,id=0,dif=0,g=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> | |
using namespace std; | |
#define ll long long | |
int main () | |
{ | |
ll tc,idd=0,p,n,a,b,c,c1,c2,c3,t,id,d,l,r,num=1,k,x,i; | |
string 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> | |
using namespace std; | |
#define ll long long | |
int prime[100005],pcheck[100005],ind; | |
void seive(ll n) | |
{ |
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 | |
int main () | |
{ | |
ll tc,idd=0,b,n,temp,r,i,p,q,c,ans; | |
scanf("%lld",&tc); |
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 | |
int phi(int n) { | |
int ans = n; | |
for (int i = 2; i * i <= n; 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> | |
using namespace std; | |
int b2i(string st) | |
{ | |
int s=0,c=1,l=st.size(); | |
for(int i=l-1;i>=0;i--) | |
{ | |
if(st[i]=='1') |
OlderNewer