Submission #74641935
Source Code Expand
function main(stdin) {
// eslint-disable-next-line unused-imports/no-unused-vars, no-unused-vars
const { next, nextstr, nextbig, nexts, nextssort, nextm, xArray } = makeInputReader(stdin)
const cases = [[1, 7], [3, 3], [5, 5], [7, 7], [9, 9]]
const [m, d] = nexts(2)
for (let i = 0; i < cases.length; i++) {
if (m === cases[i][0] && d === cases[i][1]) {
return 'Yes'
}
}
return 'No'
}
function makeInputReader(input) {
const cin = input.trim().split(/ |\n/)
let cid = 0
function createNDArray(shape, fillFn) {
if (shape.length === 0)
return fillFn()
const [dim, ...rest] = shape
return Array.from({ length: dim }, () => createNDArray(rest, fillFn))
}
return {
next: () => Number(cin[cid++]),
nextstr: () => cin[cid++],
nextbig: () => BigInt(cin[cid++]),
nexts: (n, addNum = 0, parse = true) =>
parse ? cin.slice(cid, cid += n).map(s => Number(s) + addNum) : cin.slice(cid, cid += n),
nextssort: (n, parse = true, desc = false) =>
parse
? cin.slice(cid, cid += n).map(Number).sort((a, b) => desc ? b - a : a - b)
: cin.slice(cid, cid += n).sort((a, b) => desc ? b.localeCompare(a) : a.localeCompare(b)),
nextm: (h, w, parse = true) => {
const res = []
for (let i = 0; i < h; i++) {
const row = cin.slice(cid, cid += w)
res.push(parse ? row.map(Number) : row)
}
return res
},
xArray: createNDArray,
}
}
if (require.main === module) {
const fs = require('node:fs')
const input = fs.readFileSync('/dev/stdin', 'utf8')
console.log(main(input))
}
module.exports = { main }
Submission Info
| Submission Time |
|
| Task |
A - Gothec |
| User |
xhksun |
| Language |
JavaScript (Node.js 22.19.0) |
| Score |
100 |
| Code Size |
1679 Byte |
| Status |
AC |
| Exec Time |
39 ms |
| Memory |
42204 KiB |
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
100 / 100 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 00-sample-04.txt |
| All |
00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 00-sample-04.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt |
| Case Name |
Status |
Exec Time |
Memory |
| 00-sample-01.txt |
AC |
39 ms |
42048 KiB |
| 00-sample-02.txt |
AC |
22 ms |
42016 KiB |
| 00-sample-03.txt |
AC |
22 ms |
42196 KiB |
| 00-sample-04.txt |
AC |
22 ms |
42072 KiB |
| 01-01.txt |
AC |
22 ms |
42076 KiB |
| 01-02.txt |
AC |
22 ms |
42064 KiB |
| 01-03.txt |
AC |
22 ms |
42076 KiB |
| 01-04.txt |
AC |
22 ms |
42072 KiB |
| 01-05.txt |
AC |
21 ms |
42004 KiB |
| 01-06.txt |
AC |
22 ms |
42016 KiB |
| 01-07.txt |
AC |
21 ms |
42104 KiB |
| 01-08.txt |
AC |
22 ms |
42200 KiB |
| 01-09.txt |
AC |
22 ms |
42064 KiB |
| 01-10.txt |
AC |
22 ms |
42188 KiB |
| 01-11.txt |
AC |
22 ms |
42104 KiB |
| 01-12.txt |
AC |
22 ms |
42204 KiB |
| 01-13.txt |
AC |
22 ms |
41988 KiB |