a good set solve ?

goodset
output

#1

okay, so I used two way to do this problem, first is using a custom fibonacci where instead of f(a) = f( a - 1 ) + f( a -2 ), I turned it into f(a) = f(a - 1 ) + f( a - 2 ) + 1, this should make sure that it meets the requirements, and it did, albeit only for the first subtask, next I used a method that will definitely meet the requirement, by having the output like this, e.g
input 1, outputs 1
input 2, outputs 1 11
input 3, outputs 1 11 111
input 4, outputs 1 11 111 1111
if the outputs are like this, there should be no way that the output don’t meet the requirements, and yet I got WA for both subtask…weird
anyways, here is my submission


#2

You missed the constraint that all elements should be in the range 1 to 500.


#3

Fibonacci grows very quickly, you probably want something that doesn’t grow exponentially fast. This would be a problem even if the problem statement didn’t state that numbers should be between 1 and 500 as the 100 Fibonacci number is 354224848179261915075 and doesn’t even fit inside of a ulong.

A small hint:

Click to view
10,11,12,13,14,15,16,17,18,19,20

is a good set


#4

welp, guess I need to pay more attention to constraint huh


#5

gotcha, then all I need is to start it off with 10, or any number that is bigger than one edit : nvm, it is not that I can just start with numbers of any kind


#6

The important thing is to not start with small numbers.


#7

There is a more beautiful way to do it than that. One hint: parity


#8

ok, nevermind, I decided to just output 400 until 500 and it works, yeah I guess I know why, because 400 + 401 is already 801


#9

Great! Btw about Algmyr’s hint, you could just have used odd numbers =p


#10

Please use the problem code in the title of the question while asking a question. For example, one possible title could be: “Help in solving the problem GOODSET”. Also, it’s good to provide the link to the problem too. Thanks for asking the question and accepting the answer :slight_smile:


#11

I agree that the title is not optimal, but at least the submission was linked which shows the problem in question, so it wasn’t too bad at all.


#12

well…didn’t think of that


#13

yeah, I always put the problem link when I ask this kind of question