Bhaskar Bantupalli

Ranch Hand
+ Follow
since Dec 16, 2022
Merit badge: grant badges
For More
India
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Bhaskar Bantupalli


This was my grid. prime factors of my answer are 7 and 1123. So it is not multiple of either 99, 100 or 101
4 months ago
The question says almost. So printbto a file and search for  ****** and see if it almost looks like a tree. I brute forced it and found solution
4 months ago

Junilu Lacar wrote:

Stephan van Hulst wrote:
Due to some unrelated circumstances, I haven't gotten round to finetuning my application for part 2, but it really shouldn't be a big issue. I just need to find the time.


A heads up: I thought it was going to be a quick one for Part 2 but it didn't turn out that way. Still working through what could be the problem in my code but it wasn't as simple as changing Ints to Longs and adding a couple of if (correction != 0) in the right spots.

I think it may have to do with the determinant. I'll post an update here once I've worked through it.


Did you check whether the solution yoh found us satisfying the original equation, otherwise you need to fiddle with zero renainders and modulus
4 months ago
I thought it was gonna be linear programming or then perpendicular distance from a point, but solving two linear equations(algebra) was sufficient
5 months ago
There is a disjoint set union data structure (union find) algorithm that can also be used to find regions
You can convert pair to a number by transforming
(row, col) => row*cols +col, where rows, cols is total number of rows, columns
5 months ago
First I created a graph with edges between two blocks of same letter
Then using dfs, I assigned a unique number to each region. Similar to strongly connected components in an undirected graph
For each number of it, I maintained area and perimeter vectors and increased their counts
For part 1, I added number of not equal blocks
For part-2, I counted the number of turns for each region with same letter. My code with counting turns didn't look good, so pnly perimeter function changed between part-1 and part-2
5 months ago

Wouldn't (5/8) resolve to 0?
7 months ago


Why does the program print 0 and 10? (0 from A, 10 from C)
1 year ago

have you read or heard somewhere that an O(N) solution is possible?

- yes
Based on the time limits and input limits on the problem, the problem if solved cannot be O(n^2). and based on below solutions which I didn't understand much, I thought it is O(n)
https://github.com/Jonathan-Uy/CSES-Solutions/blob/main/String%20Algorithms/Distinct%20Substrings.cpp
https://codeforces.com/blog/entry/95004 - 12th solution and code

1 year ago

Why are you using StringTokenizer, and InputStreamReader, which are regarded as legacy code?


I have been using a template for online problem solving. I haven't changed it in years. Which API do you recommend that works for java 8 and 8+ alike

I think you may get more attention if I add you to one of our other fora.

Please add me. Can you say what the other forum is?

Problem link: Distint Substrings

I tried solving using prefix function based on Prefix function - KMP

but the solution described is O(n^2). And I want to solve it in O(n)


How to look for jobs that one want, that gets offered to one based on reputation? How to build (such) reputation?
How should one start sharing with others?
How to build a network?
1 year ago
How to make Http 1.0 , 1.1, 2 requests in java?
How does multiplexing work or how to use multiplexing in java HTTP2?
How to identify the requests made in java with some tool?(like wireshark?)
1 year ago

remove the square brackets from the Default value


Didn't work
1 year ago