[{"data":1,"prerenderedAt":323},["ShallowReactive",2],{"archives-posts":3},[4,240],{"id":5,"title":6,"body":7,"date_created":229,"date_modified":230,"description":231,"extension":232,"featured":233,"head":230,"meta":234,"navigation":233,"ogImage":230,"path":235,"robots":230,"schemaOrg":230,"seo":236,"sitemap":237,"stem":238,"__hash__":239},"content\u002Fblog\u002Fint128.md","int128",{"type":8,"value":9,"toc":225},"minimark",[10,25],[11,12,13,14,17,18,21,22,24],"p",{},"I just found out today that ",[15,16,6],"code",{}," which used as ",[15,19,20],{},"__int128"," exists and like its kind of complicated cin and cout cannot use int128 data type, its not part off cpp, its a complier specific thing but its still amazing i wish cpp had better approaches for integer overflows also its kind of my skill issue but having ",[15,23,6],{}," is a cheat skill ngl your answer for every integer overflow hehe.",[26,27,28,222],"ul",{},[29,30,31,32,132,133],"li",{},"As the name suggests it has values ranging from ",[33,34,37,70],"span",{"className":35},[36],"katex",[33,38,41],{"className":39},[40],"katex-mathml",[42,43,45],"math",{"xmlns":44},"http:\u002F\u002Fwww.w3.org\u002F1998\u002FMath\u002FMathML",[46,47,48,65],"semantics",{},[49,50,51,55],"mrow",{},[52,53,54],"mo",{},"−",[56,57,58,62],"msup",{},[59,60,61],"mn",{},"2",[59,63,64],{},"127",[66,67,69],"annotation",{"encoding":68},"application\u002Fx-tex","-2^{127}",[33,71,75],{"className":72,"ariaHidden":74},[73],"katex-html","true",[33,76,79,84,88],{"className":77},[78],"base",[33,80],{"className":81,"style":83},[82],"strut","height:0.8974em;vertical-align:-0.0833em;",[33,85,54],{"className":86},[87],"mord",[33,89,91,94],{"className":90},[87],[33,92,61],{"className":93},[87],[33,95,98],{"className":96},[97],"msupsub",[33,99,102],{"className":100},[101],"vlist-t",[33,103,106],{"className":104},[105],"vlist-r",[33,107,111],{"className":108,"style":110},[109],"vlist","height:0.8141em;",[33,112,114,119],{"style":113},"top:-3.063em;margin-right:0.05em;",[33,115],{"className":116,"style":118},[117],"pstrut","height:2.7em;",[33,120,126],{"className":121},[122,123,124,125],"sizing","reset-size6","size3","mtight",[33,127,129],{"className":128},[87,125],[33,130,64],{"className":131},[87,125]," to ",[33,134,136,159],{"className":135},[36],[33,137,139],{"className":138},[40],[42,140,141],{"xmlns":44},[46,142,143,156],{},[49,144,145,151,153],{},[56,146,147,149],{},[59,148,61],{},[59,150,64],{},[52,152,54],{},[59,154,155],{},"1",[66,157,158],{"encoding":68},"2^{127}-1",[33,160,162,212],{"className":161,"ariaHidden":74},[73],[33,163,165,168,200,205,209],{"className":164},[78],[33,166],{"className":167,"style":83},[82],[33,169,171,174],{"className":170},[87],[33,172,61],{"className":173},[87],[33,175,177],{"className":176},[97],[33,178,180],{"className":179},[101],[33,181,183],{"className":182},[105],[33,184,186],{"className":185,"style":110},[109],[33,187,188,191],{"style":113},[33,189],{"className":190,"style":118},[117],[33,192,194],{"className":193},[122,123,124,125],[33,195,197],{"className":196},[87,125],[33,198,64],{"className":199},[87,125],[33,201],{"className":202,"style":204},[203],"mspace","margin-right:0.2222em;",[33,206,54],{"className":207},[208],"mbin",[33,210],{"className":211,"style":204},[203],[33,213,215,219],{"className":214},[78],[33,216],{"className":217,"style":218},[82],"height:0.6444em;",[33,220,155],{"className":221},[87],[29,223,224],{},"I think this is a good way to counter overflow issues we ususally have with cpp, it really pmo when i get everything right and its a precision issue or overflow issue",{"title":226,"searchDepth":227,"depth":227,"links":228},"",2,[],"2026-08-11T12:00:00Z",null,"int overflow issue related","md",true,{},"\u002Fblog\u002Fint128",{"title":6,"description":231},{"loc":235},"blog\u002Fint128","wPL1FQa6NvmljNejUoRfU2aUsHm-kvFtX75nU38E3is",{"id":241,"title":242,"body":243,"date_created":229,"date_modified":230,"description":316,"extension":232,"featured":233,"head":230,"meta":317,"navigation":233,"ogImage":230,"path":318,"robots":230,"schemaOrg":230,"seo":319,"sitemap":320,"stem":321,"__hash__":322},"content\u002Fblog\u002Fmy_thoughts_on_dp.md","DP",{"type":8,"value":244,"toc":314},[245,248,251,268,277,284,287,310],[11,246,247],{},"Dynamic programming is nothing but solving a bigger problem by dividing it into sub tasks and avoiding repitions in those subproblems, storing those  and building the answer from the smaller problems we solved beforehand",[11,249,250],{},"Its simple to think of",[26,252,253,256,259,262,265],{},[29,254,255],{},"Split the problem into overlapping subproblems(one related to the other)",[29,257,258],{},"Solve each problem recursively(means break it into further sub problems, this is it most of the times it may not be recursive at all times)",[29,260,261],{},"Combine the solutions to the subproblems into one for the given problem",[29,263,264],{},"Important rule is that you dont compute the same problem twice because we already have it",[29,266,267],{},"Do remember that we memorize the answers we had gotten i.e, storing them",[269,270,271],"blockquote",{},[11,272,273],{},[274,275,276],"strong",{},"From what i can understand DP can be mainly classified into 5-6 types(it can be more or less, its just my preferred number)",[269,278,279],{},[11,280,281],{},[274,282,283],{},"1-D DP",[11,285,286],{},"Which is like number of ways to write a number using another set of numbers or find the longest increasing or decreasing subsequence something like that i believe, because all these can be done using a single array  of n elements and with optimal time complexities",[26,288,289],{},[29,290,291,292,295,296,299,300,299,303,306,307,309],{},"how to solve them? lets go in",[293,294],"br",{},"For the first one we can do this in O(n) time complexity, the given numbers will be very like like represent x in terms of 1, 3 and 4  we can construct this from base case as number of ways to write 1 is 1 way, like wise nubmer of ways to write 2 using 1 is 1 then we sorted the base case then from this point we can just add no.ofways",[33,297,298],{},"x-1","+no.ofways",[33,301,302],{},"x-3",[33,304,305],{},"n-4"," like this i believe simpe enough to do",[293,308],{},"For the second problem we can do like have an array as a base case where we just have 1 as the longest subsequence as that is the minimum we can have then we will run a double loop to update the values each time we enconter a smaller value we see then output the maxumum value in the array simple.",[311,312,313],"style",{},"\n  body { font-size: 0.9em; } \n",{"title":226,"searchDepth":227,"depth":227,"links":315},[],"dynamic programming",{},"\u002Fblog\u002Fmy_thoughts_on_dp",{"title":242,"description":316},{"loc":318},"blog\u002Fmy_thoughts_on_dp","P1ukIW65VmXUGjdhYmrqYicSXAeCJV9zQqeQwdq5FM4",1786455577265]