By adyyy, history, 7 weeks ago,

Hi, if there is a problem such that we are given an array of size (1<=n<=1e5) and queries (1<=q<=1e5) , int each query we are given a range [L,R] and we have to tell that if the array is increasing in that range or not . Also if we had a query for point update can this be solved ???? I was solving https://www.codechef.com/problems/DELSORT this problem so just thought about this question . I dont know if similar question already exists , if it does please provide link . Thanks .

• +2

By adyyy, history, 7 months ago,

Hey, Can we calculate LIS with queries in an online manner ?? I have read about a offline method using DAG but how to process online ?

• -33

By adyyy, history, 8 months ago,

Hi is there anybody here who has recently gave an internship interview at google through google online coding challenge ????

• -29

By adyyy, history, 11 months ago,

I just wanted to understand the mentality of people who can't help others but only do down votes. If I message someone personally then they act like they are so much superior or busy . At last what can anyone do except posting it here . Even before this I have posted too many problems so that anyone can help but I only recieved downvotes .I mean I have asked spoj problems and it is quite obvious that i dont have code for it still you guys behave like .... ugh

• -31

By adyyy, history, 11 months ago,

https://www.spoj.com/problems/ADAFIMBR/ can anyone please tell me what modification I can do in my code to accept this problem . It gives TLE to me right now .

#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<pair<int,int>, null_type,less<pair<int,int>>, rb_tree_tag,tree_order_statistics_node_update>

#define ll  int
#define intmax INT_MAX
#define pi 3.14159265358979323846
#define ff first
#define ss second
#define pb push_back
#define watch(x) cerr<<(#x)<<"  "<<x<<"\n";
int mod=1e9+7;
const int MAXN = 1e5+2,MAXM=3e6+3;
int a[MAXN],k,ans[MAXM];

vector<int> fib(2),dp[MAXM];

inline int mex(int x){
unordered_map<int,int> m;
for(int i=0;i<(int)dp[x].size();i++) m[dp[x][i]]++;
int ap=0;
while(m[ap]) ap++;
return ap;
}

int main(){
int tt=1;
ios_base::sync_with_stdio(0);
cout.tie(0);
//~ cin>>tt;
while(tt--){
int n; cin>>n;

for(int i=0;i<n;i++) { cin>>a[i]; }
fib[0]=fib[1]=1;
for(int i=0;i<100;i++)if(fib[i]+fib[i+1]<=3e6)fib.pb(fib[i]+fib[i+1]); else break;
k=fib.size();

for(int i=0;i<=3e6;i++){
if(i>=1) {
ans[i]=mex(i);
}
for(int j=0;j<k;j++){
if(i+fib[j]>MAXM) continue;
else  dp[i+fib[j]].pb(ans[i]);
}
}

int an=0;
for(int i=0;i<n;i++) an^=ans[a[i]];

else cout<<"Vinit\n";
}

return 0;
}

• -25

By adyyy, history, 11 months ago,

https://www.hackerearth.com/problem/algorithm/minimum-moves-2-a32572f7/description/?layout=old Can anyone please help me with this problem . Editorial for this problem is just shit . Thanks .

• -6

By adyyy, history, 12 months ago,

Hi I tried to solve this problem based on bfs https://codeforces.com/problemset/problem/198/B . Also I have implemented it well and it passes for 28 test cases butgives MEMORY LIMIT EXCEE. on test 29 . May be there is something to learn here . please anybody hep if you can figure out whats wrong . Here is my submission https://codeforces.com/contest/198/submission/85799856 . THANKS

• 0

By adyyy, history, 13 months ago,

• -13

By adyyy, history, 13 months ago,

can anyone please explain me this binary search problem....... it has no editorial also i am not getting the soution ..... https://codeforces.com/contest/460/problem/C ..... thankyou

• 0

By adyyy, history, 16 months ago,

hi can anybody please check out my solution for problem (https://codeforces.com/contest/20/problem/C)

.... my code... i am consistently getting WA at test 33.... https://codeforces.com/contest/20/submission/70403794

THanks and sorry for my poor english

• -17

By adyyy, history, 20 months ago,

PLease someone help me with the binary search.... as I seen this far there never exists a single binary search technique for all the problems or may exists and I dont know . Anyways please help me if I have a function f(x) and i have to check for a k in [1 to n] such that f(k) is just >=m . f(x)=x*(x+1)/2; example n=9 m=22 ans=7; please tell someone..... P.S sorry for my poor english

• -10

By adyyy, history, 2 years ago,

Heya , respected sir who are seeing my post i just want to seek some advice from all of u... i have been doing competetive programming from last 4 months tilll now i have only participated in long challenges on codechef..... the problem is that i am able to solve simple brute force problems but m not getting proper path to move further i mean wat to study exactly ..... please suggest me something that from where i can study in a sequence..... it would be a great help... THANKS