_MASTER__'s blog

By _MASTER__, history, 16 months ago, In English

The problem: say that we have M tasks that we MUST execute, for each task i you can execute it from Xi to Yi (an interval of hours)

and you must execute each task for a minimum of X hours and X <=(Yi-Xi+1) (those X hours must be contiguous)

input: X, M and (X,Y) for each task.

each cpu can execute at most one task in the same time.

output: give me the minimum number of cpus neeeded an the tasks used by each cpu.

complexity is high! how we can do better? for bigger M

feel free to say every idea that you have for any constraint.

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By _MASTER__, history, 21 month(s) ago, In English
The problem was to find two numbers, a and b
, such that their greatest common divisor and their least common multiple would add up to a given number, x
. Moreover, the difference between the two numbers should be as small as possible, and a
 must be less than or equal to b

X is between 2 and 1e9

.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By _MASTER__, history, 22 months ago, In English

WHILE DIV4 , CODEFORCES KEEPS LOGGING ME OUT!

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it

By _MASTER__, history, 22 months ago, In English

my submission: https://codeforces.me/contest/126/submission/190247628 //

as far as I can see, My solution is O(n²) when there is no solution and it got AC. and the string length is ~~ 1e6

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it

By _MASTER__, history, 22 months ago, In English

link of the problem : https://codeforces.me/gym/104030/problem/B

wrong answer on test 4: the test is : 6 1 2 6 5 5 2 3 4 4 2 my code: https://ideone.com/0LtE25 my output: (there might be multiple answers) YES 5 6 2 1 4 3

judge answer: YES 2 4 5 1 3 6

as far as I can see , is that my solution is also accepted no? if no please why. THANK YOU!

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it