Блог пользователя HOMIARA_RUBY

Автор HOMIARA_RUBY, история, 6 месяцев назад, По-английски

How to solve this problem efficiently? Thanks in advance.

A complete weighted graph has N nodes. Source and End node is same (predefined). You can travel any node any times but not the source node. That means you can leave the source node just once. You want to maximise the sum of edge-weight. The sum of weight must not exceeds the pre given value M.

Determine the maximum sum and write the nodes sequentially.

Can you refer some similar problems so that i can examine the code/ algorithm.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор HOMIARA_RUBY, история, 9 лет назад, По-английски

I'm learning OOP using Java. So you may find my question 'like dumb'. I have followed Java coders code like this not this. why? I thought Java has garbage collection system(not like destructor in C++) which is called randomly(As far I know). So creating lot of objects will result MLE(if no garbage collection is called during execution time and if an object take N space and we create M objects then it should take N*M space which may result MLE). So in Codeforces 'custom invocation' I tried to do experiment and see what happens. I did the same experiment in 'Ideone'. I found almost no difference (i thought M times larger for M objects) in terms of memory. Why?

I have asked the question here because Codeforces community is more responsive.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

Автор HOMIARA_RUBY, история, 10 лет назад, По-английски

http://ideone.com/0MRF6u

how to solve this problem? I want to solve it but couldn't find any approach? no tutorial or source code is available. I spent enough time for it.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

Автор HOMIARA_RUBY, история, 10 лет назад, По-английски

ACM ICPC DHAKA SITE REGIONAL CONTEST 2016 is going on.. for live standing https://algo.codemarshal.org/contests/ICPCDH2016/standings predict who will be the winner..

Полный текст и комментарии »

  • Проголосовать: нравится
  • +12
  • Проголосовать: не нравится