|
+80
|
|
0
try to seperate if(s[i]='?'&&s[n-i-1]='?') case from rest of the other case and do in separate loop |
|
0
1 |
|
0
1 |
|
+11
for D I use coordinate compression, |
|
0
where is the contest link or id/password |
|
0
please Devil atleast increase the score of B1 and B2 because it is much harder than c |
|
+1
3 magic number to solve PATHETIC. 6746328388800 525737919635921 19657257924641just place this 3 number in the nodes evenly(make sure first number in every alternate node) |
|
+7
I think you should give credit of code to William Lin because your code is exactly match with his solution code |
|
+1
make string c[12], not string c[12][13] because it will make 2D string. and also change your loop that take input. |
|
+235
|
|
0
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) |
|
0
link to the solution solution |
|
+1
apply binary search |
|
0
thanks sir. |
|
0
change your first loop FOR(i,N-1) to FOR(i,N). |
|
0
nice contest. |
|
+9
sir from where i can get previous year questions of hacker cup. thanks!! |
|
0
check for 8 and 18 |
|
0
we can also solve E by multiset(vector of multiset). link: Your text to link here... |
|
0
thank you sir |
|
0
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"; |