algorithm tag

168 questions


1 answers
120 views
0
code for knowing what kind of polyhedron it is

How to build a polyhedronWhether it's Python, C, or Matlab, it doesn't matter what language it is.For example, suppose you have the following data on a regular dodecahedron:This data shows at which th...

2 years ago

3 answers
127 views
0
Is it possible to implement width-first search using recursive functions without using queues?

QuestionIs it possible to implement width-first search for graph structures using recursive functions?For depth-first exploration, you can implement it using a stack or recursive function.On the other...

2 years ago

3 answers
45 views
0
Why is this code TLE?

The code below is the answer to the competition programming problem baton relay game.I put the sample using the list.In the same test case, the sample code was 0.03s memory time, while my code was ove...

2 years ago

2 answers
48 views
0
an algorithm that uses 100 numbers from 1 to 100 each so that even or odd numbers do not last more than four times

As stated in the title, I would like you to tell me the algorithm (make an array) that uses 100 numbers from 1 to 100 each so that even or odd numbers do not last more than 4 times.For example x = [99...

2 years ago

1 answers
62 views
0
AtCoder Beginner Contest 180 Takahashi Unevolved D Problem

D-Takahashi Unevolved Description Linkhttps://atcoder.jp/contests/abc180/editorial/219With the answer code listed above, ans+(y-1-x)//bThere is a part of , but I didn't understand the reason for doing...

2 years ago

1 answers
53 views
0
Understanding At Coder Problems (Colorful Subsequence)

I don't understand the problem with the atcoder below.https://atcoder.jp/contests/agc031/tasks/agc031_aI looked at the explanation and the AC code, and found that c[each character - 'a']++ in the size...

2 years ago

1 answers
47 views
0
Why can supercomputers calculate at high speeds?

Why can supercomputers calculate at high speeds?Supercomputers recognize that many CPUs are juxtaposed to generate speed.But I don't know why it's so fast.The reason is Amdar's law If the program is a...

2 years ago

1 answers
76 views
0
Understanding Bit DP Thinking Circuits

I don't really understand the thinking circuit of the algorithm in the code below.They seem to be using bit DP, but I don't know how to use bit operators to become DP (I don't know why DP is establish...

2 years ago

1 answers
48 views
0
Please rate the recursive code of the binary search written in ruby.

I tried implementing binary search/half search code in Ruby's own way using recursive.Could you give me an evaluation rather than a grade? It works correctly, but I was worried about how it was writte...

2 years ago

2 answers
50 views
0
How do I record a night tour on the n×n board?

Previous Questions (N×n board counting night tours)I counted the night tours at .How can I do the following two additional points for this code?①A path satisfying the conditions is maintained.②List th...

2 years ago
« - 9 - »

© 2024 OneMinuteCode. All rights reserved.