Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Narcissist/Nanoquery/narcissist.nanoquery
Normal file
25
Task/Narcissist/Nanoquery/narcissist.nanoquery
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import Nanoquery.IO
|
||||
|
||||
// get a file tied to this program's source
|
||||
$f = new(File, $args[len($args) - 1])
|
||||
|
||||
// get the source and split across lines
|
||||
$source = split($f.readAll(), "\n")
|
||||
|
||||
// read that amount of lines from the console
|
||||
$in = list(len($source))
|
||||
for ($i = 0) ($i < len($source)) ($i = $i + 1)
|
||||
append $in input()
|
||||
end
|
||||
|
||||
// check line by line
|
||||
for ($i = 0) ($i < len($in)) ($i = $i + 1)
|
||||
// check if the lines are equal
|
||||
if ($in[$i] != $source[$i])
|
||||
println "Reject"
|
||||
exit
|
||||
end
|
||||
end
|
||||
|
||||
// if we got here, the lines are the same
|
||||
println "Accept"
|
||||
Loading…
Add table
Add a link
Reference in a new issue