Posts by Benuck • 163 points
8 posts
-
5
votes1
answer88
viewsQ: What is the lowest number of irrigators (circles) needed to cover the surface of a foliage (rectangle)? (competitive programming)
I participated in a test and, in one of the problems, I did not get the total score of the question, one of the test cases gave Wrong Answer, but I could not identify exactly my error. The statement…
-
5
votes1
answer90
viewsQ: Using template, why use the const modifier in this variable (C++)?
#include <iostream> using std::cout; using std::endl; template <unsigned int i> struct Fibo{ static const unsigned result = Fibo<i-1>::result + Fibo<i-2>::result; }; template…
-
0
votes2
answers86
viewsA: Targeting failure in Mergesort
Thank you, here’s the corrected code: #include <iostream> using namespace std; void merge(int *arr, int lo, int m, int hi) { int n1 = m - lo + 1; //maximo do subarray1 int n2 = hi - m;…
-
0
votes2
answers86
viewsQ: Targeting failure in Mergesort
I tried to recreate the Mergesort algorithm in C++, but when compiling, the error "segmentation fault" appears. Here is the code below. What could I be doing wrong? #include <iostream> using…
-
0
votes0
answers119
viewsQ: How to plot the graph of a complex equation in latex?
I need to create standard maps charts (https://en.wikipedia.org/wiki/Standard_map). How can I implement a chart like this below in latex?…
-
2
votes1
answer1142
viewsQ: What is the function to see the tank distance to the wall in the robocode?
I’m trying to implement on robocode sourcecode (for those who don’t know, follow the link: http://robocode.sourceforge.net/) a means to make the tank continue walking and, from a certain distance…
-
1
votes1
answer68
viewsQ: How to create a standard map chart?
I need to create a graphic standard map. Is it possible to plot graphics using the C language? I know the basic data structure, algorithms and the c language, but I can’t create a graphical…
-
1
votes1
answer129
viewsQ: Error assigning value to struct property in C++
I’m learning to code and, at the moment, trying to make a little game like the popular Nake. We need to increase several things in the program, such as the limits of the walls, collisions, etc...…