█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 6008

Problema 0x53 - Encontrar ciclos en un grafo dirigido

  • Autor: jarangolp
  • Fecha: 2022-04-30 19:00:21 UTC (Hace más de 2 años)
Caso # Resultado Tiempo Memoria
#1
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.095 s 11 KBi
#2
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.059 s 6 KBi
#3
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.067 s 18 KBi
#4
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.059 s 6 KBi
#5
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.019 s 6 KBi
#6
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.061 s 11 KBi
#7
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.023 s 6 KBi
#8
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.062 s 7 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.024 s 6 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.019 s 6 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.051 s 7 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.048 s 6 KBi
#13
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.025 s 6 KBi
#14
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.025 s 6 KBi
#15
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.023 s 6 KBi
#16
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.051 s 6 KBi
#17
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.022 s 6 KBi
#18
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.018 s 7 KBi
#19
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.023 s 7 KBi
#20
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.022 s 6 KBi
#21
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.069 s 10 KBi
#22
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.025 s 7 KBi
#23
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.098 s 15 KBi
#24
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.019 s 7 KBi
#25
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.052 s 6 KBi
#26
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.077 s 27 KBi
#27
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.032 s 7 KBi
#28
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.024 s 6 KBi
#29
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.018 s 7 KBi
#30
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.104 s 15 KBi
#31
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.017 s 7 KBi
#32
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.123 s 8 KBi
#33
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.023 s 7 KBi
#34
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.05 s 6 KBi
#35
Error en tiempo de ejecución (NZEC)
Exited with error status 1
/box/script.js:3
  const [N,M] = input.split(' ').map(n => Number(n));
                      ^

TypeError: input.split is not a function
    at ReadStream.<anonymous> (/box/script.js:3:23)
    at ReadStream.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at ReadStream.Readable.push (_stream_readable.js:224:10)
    at internal/fs/streams.js:191:12
    at FSReqCallback.wrapper [as oncomplete] (fs.js:470:5)
0.026 s 6 KBi
Puntos totales: 0 / 100

Código

process.stdin.on('data', input => {
  const adj = new Map();
  const [N,M] = input.split(' ').map(n => Number(n));
  for (let i = 0; i < M; i++) {
    process.stdin.on('data', edge => {
      const [u,v] = edge.split(' ').map(n => Number(n));
      adj[u] = adj[u] || [];
      adj[u].push(v);
    });
  }
  console.log(adj)
});