Comments

5mfah5

to understand this meme

try to seperate if(s[i]='?'&&s[n-i-1]='?') case from rest of the other case and do in separate loop

1
8 2
?????0000?
correct ans is 1000000001

1
8 2
?????0000?
correct ans is 1000000001

for D I use coordinate compression,

where is the contest link or id/password

On DevilCodeforces Round #659, 6 years ago
0

please Devil atleast increase the score of B1 and B2 because it is much harder than c

3 magic number to solve PATHETIC.

6746328388800 525737919635921 19657257924641
just place this 3 number in the nodes evenly(make sure first number in every alternate node)

I think you should give credit of code to William Lin because your code is exactly match with his solution code

On _usedProblem help , 6 years ago
+1

make string c[12],

not string c[12][13] because it will make 2D string.

and also change your loop that take input.

for(i=1;i<=n;i++)
cin>>c[i];

On AriCodeforces Global Round 9, 6 years ago
+235

please do not convert codeforces into hackerearth. codeforces is authentic site for CP.

0

practice question of difficulty :1600 or above.

+1

try with map instead of unordered_map

+1

may be your while(1) loop run for long time(>2000ms)

link to the solution solution

apply binary search

thanks sir.

change your first loop FOR(i,N-1) to FOR(i,N).

nice contest.

sir from where i can get previous year questions of hacker cup. thanks!!

check for 8 and 18

we can also solve E by multiset(vector of multiset). link: Your text to link here...

thank you sir

Why is this approach wrong for Div2B? int dp[n+1]={0}; dp[1]=1; for(i=2;i<n+1;i++) { vectorv; for(j=1;j*j<=i;j++) { if(i%j==0) { v.pb(j); if(i/j!=j) v.pb(i/j); } } for(j=0;j<v.size();j++) { if(a[v[j]]<a[i]) { dp[i]=max(dp[i],dp[v[j]]+1); } } } int mx=0; for(i=1;i<n+1;i++) { mx=max(dp[i],mx); } cout<<mx<<"\n";