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

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

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.

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

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

Автор _MASTER__, история, 15 месяцев назад, По-английски
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

.

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

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

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

WHILE DIV4 , CODEFORCES KEEPS LOGGING ME OUT!

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

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

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

my submission: https://mirror.codeforces.com/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

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

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

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

link of the problem : https://mirror.codeforces.com/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!

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

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