Smap
SmapIE
New program
Curry
Prolog
Haskell
Open program by ID
Browser
Dashboard
Programs on Smap
Most recent
Most favorited
Tags on Smap
All tags
Sign in
Help
Source code
Language:
Curry
perm [] = [] perm xs @ (_:_) | ys++x:zs=:=xs=x:perm(ys++zs) where ys, x, zs free nqueens n | safe xs = xs where xs = perm [1..n] safe [] = success safe (x:xs) = noattack 1 x xs &> safe xs noattack _ _ [] = success noattack n x (y:ys) | x/=y && x/=y+n && x/=y-n = noattack (n+1) x ys main = nqueens 4
Execution result
No execution result yet.
PAKCS 3.7 /all-values
PAKCS 3.7 /one-value
KiCS2 3.1 /all-values
KiCS2 3.1 /one-value
Reset
Clear
Options
New Curry program
Reload program 34
View in Browser
Program ID:
34
Title:
queens with perm 3
Language:
Curry
Author:
andreapavan
Version:
1
Program information