Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.028 s | 6 KBi |
#2 |
Incorrecto
|
0.025 s | 6 KBi |
#3 |
Correcto
|
0.025 s | 6 KBi |
#4 |
Incorrecto
|
0.024 s | 6 KBi |
#5 |
Incorrecto
|
0.021 s | 6 KBi |
#6 |
Incorrecto
|
0.028 s | 6 KBi |
#7 |
Incorrecto
|
0.051 s | 7 KBi |
#8 |
Incorrecto
|
0.024 s | 6 KBi |
#9 |
Incorrecto
|
0.098 s | 7 KBi |
#10 |
Correcto
|
0.025 s | 6 KBi |
#11 |
Correcto
|
0.028 s | 6 KBi |
#12 |
Correcto
|
0.025 s | 6 KBi |
#13 |
Incorrecto
|
0.023 s | 6 KBi |
#14 |
Correcto
|
0.024 s | 6 KBi |
#15 |
Incorrecto
|
0.066 s | 7 KBi |
#16 |
Correcto
|
0.021 s | 6 KBi |
#17 |
Correcto
|
0.025 s | 6 KBi |
#18 |
Correcto
|
0.028 s | 6 KBi |
#19 |
Incorrecto
|
0.026 s | 6 KBi |
#20 |
Incorrecto
|
0.025 s | 6 KBi |
#21 |
Incorrecto
|
0.021 s | 6 KBi |
#22 |
Correcto
|
0.058 s | 7 KBi |
#23 |
Correcto
|
0.029 s | 6 KBi |
#24 |
Correcto
|
0.054 s | 6 KBi |
#25 |
Correcto
|
0.02 s | 6 KBi |
#26 |
Correcto
|
0.027 s | 8 KBi |
#27 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 /box/script.js:19 const [u,v] = dataArray[i].split(' ').map(n => Number(n)); ^ TypeError: Cannot read property 'split' of undefined at ReadStream.<anonymous> (/box/script.js:19:32) 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.037 s | 10 KBi |
#28 |
Correcto
|
0.028 s | 8 KBi |
#29 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 /box/script.js:19 const [u,v] = dataArray[i].split(' ').map(n => Number(n)); ^ TypeError: Cannot read property 'split' of undefined at ReadStream.<anonymous> (/box/script.js:19:32) 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.117 s | 10 KBi |
#30 |
Correcto
|
0.032 s | 8 KBi |
#31 |
Correcto
|
0.034 s | 10 KBi |
#32 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 /box/script.js:19 const [u,v] = dataArray[i].split(' ').map(n => Number(n)); ^ TypeError: Cannot read property 'split' of undefined at ReadStream.<anonymous> (/box/script.js:19:32) 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 | 10 KBi |
#33 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 /box/script.js:19 const [u,v] = dataArray[i].split(' ').map(n => Number(n)); ^ TypeError: Cannot read property 'split' of undefined at ReadStream.<anonymous> (/box/script.js:19:32) 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 | 11 KBi |
#34 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 /box/script.js:19 const [u,v] = dataArray[i].split(' ').map(n => Number(n)); ^ TypeError: Cannot read property 'split' of undefined at ReadStream.<anonymous> (/box/script.js:19:32) 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.038 s | 11 KBi |
#35 |
Error en tiempo de ejecución (NZEC)
Exited with error status 1 /box/script.js:19 const [u,v] = dataArray[i].split(' ').map(n => Number(n)); ^ TypeError: Cannot read property 'split' of undefined at ReadStream.<anonymous> (/box/script.js:19:32) 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.034 s | 10 KBi |
const adj = new Map(); let visited; function dfs(index) { visited[index] = true; adj[index] = adj[index] || []; for (let i = 0; i < adj[index].length; i++) { if (!visited[i]) { return true; } } } process.stdin.on('data', data => { const dataArray = data.toString().split('\n'); if (dataArray.length === 0) return; const [N, M] = dataArray[0].split(' ').map(n => Number(n)); for (let i = 1; i < M; i++) { const [u,v] = dataArray[i].split(' ').map(n => Number(n)); adj[u] = adj[u] || []; adj[u].push(v); } visited = new Array(N).fill(false); for (let i = 0; i < N; i++) { if (!visited[i]) { const resp = dfs(i); if (resp) { console.log('Yes'); return; } } } console.log('No') })