Language: C++

{-# LANGUAGE
  ScopedTypeVariables, BangPatterns, TupleSections, ExplicitForAll,
  LambdaCase, MultiWayIf, Unsafe, RecordWildCards, FlexibleContexts, CPP,
  NoMonomorphismRestriction, GADTs, PatternGuards, MagicHash, UnboxedTuples,
  RankNTypes, EmptyDataDecls, EmptyCase, ViewPatterns, PolyKinds,
  TypeFamilies, OverloadedStrings, FlexibleInstances, UndecidableInstances,
  DefaultSignatures, GeneralizedNewtypeDeriving, StandaloneDeriving,
  DeriveGeneric, DeriveFunctor, DeriveDataTypeable, DeriveFoldable,
  DeriveTraversable, DeriveDataTypeable, FlexibleInstances,
  MultiParamTypeClasses, PartialTypeSignatures  #-}
{-# OPTIONS_GHC -O2 #-}

import Prelude
import Data.Bits
import Data.List
import Data.Maybe
import Data.Tuple
import Data.Ord
import Data.Int
import Data.Word
import Data.Char
import Data.Ratio
import Data.Function
import Data.STRef
import Data.IORef
import Data.Monoid
import Data.Functor
import Data.Data
import Data.Typeable
import GHC.Generics
import System.IO
import Control.Arrow
import Control.Applicative
import Control.Monad
import Control.Monad.Primitive
import Control.Monad.State.Strict
import Control.Monad.ST
import Control.Monad.ST.Lazy (strictToLazyST, lazyToStrictST)
import qualified Control.Monad.ST.Lazy as STL
-- import Control.Monad.ST.Safe
import Control.DeepSeq
import Data.Coerce
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy.Char8 as BSL
import qualified Data.ByteString.Builder as BSB
import Data.IntMap (IntMap)
import qualified Data.IntMap.Strict as IMS
import qualified Data.IntMap.Lazy as IML
import Data.IntSet (IntSet)
import qualified Data.IntSet as IS
import qualified Data.Sequence as Seq
import Data.Sequence (Seq)
import qualified Data.Array.IArray as A
import qualified Data.Array.MArray.Safe as A
import qualified Data.Array.MArray as A
import Data.Array (Array)
import Data.Array.Unboxed (UArray)
import Data.Array.IArray (IArray)
import Data.Array.MArray.Safe (MArray)
import Data.Array.IO.Safe (IOArray, IOUArray)
import Data.Array.ST.Safe (STArray, STUArray, runSTArray, runSTUArray)
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM
import qualified Data.Vector.Storable as VS
import qualified Data.Vector.Storable.Mutable as VSM
import qualified Data.Vector.Primitive as VP
import qualified Data.Vector.Primitive.Mutable as VPM
import qualified Data.Vector.Generic as VG
import qualified Data.Vector.Generic.Mutable as VGM
import qualified Data.Vector.Fusion.Bundle.Monadic as VFBM
import qualified Data.Vector.Fusion.Bundle as VFB
import qualified Data.Vector.Fusion.Stream.Monadic as VFSM
import qualified Data.Vector.Fusion.Bundle.Size as VFBS
import qualified Data.Vector.Fusion.Util as VFU
import qualified Data.Attoparsec.ByteString.Char8 as Atto
import Debug.Trace
import GHC.Exts (build, Int(..), Int#,
                 (+#), (*#), (-#), (<#), (>=#), (==#), quotRemInt#,
                 remInt#, uncheckedIShiftRL#, andI#, orI#,
                isTrue#)
#define PHASE_FUSED [1]
#define PHASE_INNER [0]

#define INLINE_FUSED INLINE PHASE_FUSED
#define INLINE_INNER INLINE PHASE_INNER

import qualified Data.Vector.Fusion.Stream.Monadic as VFS
import qualified Data.Vector.Fusion.Bundle.Size as VFBS
import qualified Data.Vector.Fusion.Bundle.Monadic as VFBM
import qualified Data.Vector.Fusion.Bundle as VFB
import qualified Data.Vector.Generic as VG

{-# INLINE_FUSED zipTailWithM_stream #-}
zipTailWithM_stream :: Monad m =>
  (a -> a -> m b) -> VFS.Stream m a -> VFS.Stream m b
zipTailWithM_stream f (VFS.Stream step s) = VFS.Stream step2 (Nothing, s)
  where
    {-# INLINE_INNER step2 #-}
    step2 (Nothing, s0) = (<$> step s0) $ \res -> case res of
      VFS.Yield a1 s1 -> VFS.Skip (Just a1, s1)
      VFS.Skip     s1 -> VFS.Skip (Nothing, s1)
      VFS.Done        -> VFS.Done
    step2 (Just a0, s0) = step s0 >>= \res -> case res of
      VFS.Yield a1 s1 -> (`VFS.Yield` (Just a1, s1)) <$> f a0 a1
      VFS.Skip     s1 -> return $ VFS.Skip (Just a0, s1)
      VFS.Done        -> return $ VFS.Done

{-# INLINE zipTailWith_stream #-}
zipTailWith_stream :: Monad m =>
  (a -> a -> b) -> VFS.Stream m a -> VFS.Stream m b
zipTailWith_stream f = zipTailWithM_stream (\a0 a1 -> return (f a0 a1))

{-# INLINE zipTail_stream #-}
zipTail_stream :: Monad m => VFS.Stream m a -> VFS.Stream m (a,a)
zipTail_stream = zipTailWith_stream (,)

{-# INLINE_FUSED zipTailWithM_mbundle #-}
zipTailWithM_mbundle :: Monad m =>
  (a -> a -> m b) -> VFBM.Bundle m v a -> VFBM.Bundle m v b
zipTailWithM_mbundle f VFBM.Bundle{VFBM.sElems = s, VFBM.sSize = n}
  = VFBM.fromStream (zipTailWithM_stream f s) (VFBS.clampedSubtract n 1)

{-# INLINE zipTailWith_mbundle #-}
zipTailWith_mbundle :: Monad m =>
  (a -> a -> b) -> VFBM.Bundle m v a -> VFBM.Bundle m v b
zipTailWith_mbundle f = zipTailWithM_mbundle (\a0 a1 -> return $ f a0 a1)

{-# INLINE zipTail_mbundle #-}
zipTail_mbundle :: Monad m => VFBM.Bundle m v a -> VFBM.Bundle m v (a,a)
zipTail_mbundle = zipTailWith_mbundle (,)

{-# INLINE zipTailWith_bundle #-}
zipTailWith_bundle :: (a -> a -> b) -> VFB.Bundle v a -> VFB.Bundle v b
zipTailWith_bundle = zipTailWith_mbundle

{-# INLINE zipTail_bundle #-}
zipTail_bundle :: VFB.Bundle v a -> VFB.Bundle v (a,a)
zipTail_bundle = zipTail_mbundle

{-# INLINE vZipTailWith #-}
vZipTailWith :: (VG.Vector v a, VG.Vector v b) => (a -> a -> b) -> v a -> v b
vZipTailWith f = VG.unstream . zipTailWith_bundle f . VG.stream

{-# INLINE vZipTail #-}
vZipTail :: (VG.Vector v a, VG.Vector v (a,a)) => v a -> v (a,a)
vZipTail = vZipTailWith (,)



main :: IO ()
main = do
  [n,x,d] <- map readInt . words <$> getLine
  print $ query n x d
  return ()

query :: Int -> Int -> Int -> Int
query n x 0
  | x == 0 = 1
  | otherwise = n+1
query n x d
  | d < 0 = go n (div (-x) g) (quot (-d) g)
  | otherwise = go n (div x g) (quot d g)
  where
    g = gcd (abs x) (abs d)

intv :: Int -> Int -> Int -> (Int,Int)
intv n k m
  = (k   +   (*) m (m - 1)                `shiftR` 1,
     k   +   (*) m (n `shiftL` 1 - m - 1) `shiftR` 1)

go :: Int -> Int -> Int -> Int
go n x d = tot - dups
      where
        tot = VU.sum $ VU.generate (n+1) $ \ !m -> 1 + m * (n - m)
        dups = VU.sum $ VU.generate (max 0 $ n-d+1)
          $ \ !m -> let (p0,p1) = intv n 0 m
                        (q0,q1) = intv n x (m+d)
                    in max 0 $ 1 + min p1 q1 - max p0 q0

#define IL(f) {-# INLINE f #-}; f

IL(putBuilder) = BSB.hPutBuilder stdout

printVecInLines, printVecInSpcSepLn ::
  (VG.Vector v a, ShowAsBuilder a) => v a -> IO ()
IL(printVecInLines) = putBuilder . v2BLines
IL(printVecInSpcSepLn) = putBuilder . v2BSpcSepLn

class ShowAsBuilder a where
  showAsBuilder :: a -> BSB.Builder
  default showAsBuilder :: (Show a) => a -> BSB.Builder
  showAsBuilder = BSB.string8 . show

-- Inconsistent with show
instance (ShowAsBuilder a, VG.Vector v a) => ShowAsBuilder (v a) where
  IL(showAsBuilder) = v2BSpcSep

#define INS(t,f) instance ShowAsBuilder t where { IL(showAsBuilder)=f }
INS(Int,BSB.intDec)
INS(Int8,BSB.int8Dec)
INS(Int16,BSB.int16Dec)
INS(Int32,BSB.int32Dec)
INS(Int64,BSB.int64Dec)
INS(Word,BSB.wordDec)
INS(Word8,BSB.word8Dec)
INS(Word16,BSB.word16Dec)
INS(Word32,BSB.word32Dec)
INS(Word64,BSB.word64Dec)
INS(Integer,BSB.integerDec)
INS(Float,BSB.floatDec)
INS(Double,BSB.doubleDec)
-- INS(String,BSB.string8) -- Inconsistent with Show
-- INS(BS.ByteString,BSB.byteString) -- Inconsistent with Show
-- INS(BSL.ByteString,BSB.lazyByteString) -- Inconsisitent with Show
#undef INS

-- Inconsistent with Show
instance (ShowAsBuilder a, ShowAsBuilder b) => ShowAsBuilder (a,b) where
  IL(showAsBuilder) = showTupAsBuilder
instance (ShowAsBuilder a, ShowAsBuilder b, ShowAsBuilder c) =>
  ShowAsBuilder (a,b,c) where
  IL(showAsBuilder) = showTup3AsBuilder
instance (ShowAsBuilder a, ShowAsBuilder b, ShowAsBuilder c, ShowAsBuilder d) =>
  ShowAsBuilder (a,b,c,d) where
  IL(showAsBuilder) = showTup4AsBuilder

IL(showTupAsBuilderWith)
  :: (a -> BSB.Builder) -> (b -> BSB.Builder) -> (a,b) -> BSB.Builder
showTupAsBuilderWith showA showB
  = \(a,b) -> (showA a <>) $ BSB.char7 ' ' <> showB b
IL(showTupAsBuilder) :: (ShowAsBuilder a, ShowAsBuilder b)
  => (a,b) -> BSB.Builder
showTupAsBuilder = showTupAsBuilderWith showAsBuilder showAsBuilder 

IL(showTup3AsBuilderWith) :: (a -> BSB.Builder) -> (b -> BSB.Builder) ->
  (c -> BSB.Builder) -> (a,b,c) -> BSB.Builder
showTup3AsBuilderWith showA showB showC
  = \(a,b,c) -> (showA a <>) $ (BSB.char7 ' ' <>) $ (showB b <>)
                $ (BSB.char7 ' ' <>) $ showC c
IL(showTup3AsBuilder) :: (ShowAsBuilder a, ShowAsBuilder b, ShowAsBuilder c)
  => (a,b,c) -> BSB.Builder
showTup3AsBuilder
  = showTup3AsBuilderWith showAsBuilder showAsBuilder showAsBuilder

IL(showTup4AsBuilderWith) :: (a -> BSB.Builder) -> (b -> BSB.Builder) ->
  (c -> BSB.Builder) -> (d -> BSB.Builder) -> (a,b,c,d) -> BSB.Builder
showTup4AsBuilderWith showA showB showC showD
  = \(a,b,c,d) -> (showA a <>) $ (BSB.char7 ' ' <>)
                  $ showTup3AsBuilderWith showB showC showD (b,c,d)
IL(showTup4AsBuilder) ::
  (ShowAsBuilder a, ShowAsBuilder b, ShowAsBuilder c, ShowAsBuilder d) =>
  (a,b,c,d) -> BSB.Builder
showTup4AsBuilder = showTup4AsBuilderWith showAsBuilder showAsBuilder
                    showAsBuilder showAsBuilder

v2BSpcSepLn, v2BSpcSep, v2BConcat, v2BLines ::
  (VG.Vector v a, ShowAsBuilder a)
  => v a -> BSB.Builder
IL(v2BSpcSepLn) = v2BSpcSepLnWith showAsBuilder
IL(v2BSpcSep) = v2BSpcSepWith showAsBuilder
IL(v2BConcat) = v2BConcatWith showAsBuilder
IL(v2BLines) = v2BLinesWith showAsBuilder


v2BSpcSepLnWith, v2BSpcSepWith, v2BConcatWith, v2BLinesWith ::
  (VG.Vector v a)
  => (a -> BSB.Builder) -- ^ show function
  -> v a -> BSB.Builder
IL(v2BSpcSepLnWith) = v2BSpcSepPostfWith $ BS.singleton '\n'
IL(v2BSpcSepWith) = v2BSpcSepPostfWith BS.empty
IL(v2BConcatWith) showFct = VG.foldr ((<>) . showFct) mempty
IL(v2BLinesWith) showFct
  = VG.foldr (\ a -> (showFct a <>) . (BSB.char7 '\n' <>)) mempty


v2BSpcSepPostf :: (VG.Vector v a, ShowAsBuilder a)
  => BS.ByteString -- ^ postfix
  -> v a -> BSB.Builder
IL(v2BSpcSepPostf) = (`v2BSpcSepPostfWith` showAsBuilder)

v2BSpcSepPostfWith :: (VG.Vector v a)
  => BS.ByteString -- ^ postfix
  -> (a -> BSB.Builder) -- ^ show function
  -> v a -> BSB.Builder
IL(v2BSpcSepPostfWith) = vecToBuilder BS.empty $ BS.singleton ' '

IL(vecToBuilder) :: (VG.Vector v a)
  => BS.ByteString -- ^ prefix
  -> BS.ByteString -- ^ separator
  -> BS.ByteString -- ^ postfix
  -> (a -> BSB.Builder) -- ^ show function
  -> v a -> BSB.Builder
vecToBuilder !prefix !separator !postfix
  = vecToBuilder_ (BSB.byteString prefix)
                  (BSB.byteString separator)
                  (BSB.byteString postfix)


IL(vecToBuilder_) :: (VG.Vector v a)
  => BSB.Builder -- ^ prefix
  -> BSB.Builder -- ^ separator
  -> BSB.Builder -- ^ postfix
  -> (a -> BSB.Builder) -- ^ show function
  -> v a -> BSB.Builder
vecToBuilder_ !prefix !separator !postfix showFct = \vec -> prefix <>
  VG.foldr
  (\ a rest !prefx -> prefx <> (showFct a <> rest separator))
  (const postfix) vec mempty

IL(evalVals) :: [a] -> [a]
evalVals xs = build $ \c n -> foldr (c $!) n xs
IL(forceVals) :: (NFData a) => [a] -> [a]
forceVals xs = build $ \c n -> foldr (c $!!) n xs

IL(getVecGLn) :: (VG.Vector v a) =>
  Int -> StateT BS.ByteString Maybe a -> IO (v a)
getVecGLn n s = VG.unfoldrN n (runStateT s) <$> BS.getLine
IL(getVecGRest) :: (VG.Vector v a) =>
  Int -> StateT BSL.ByteString Maybe a -> IO (v a)
getVecGRest n s = VG.unfoldrN n (runStateT s) <$> BSL.getContents
IL(getVecLn) :: Int -> StateT BS.ByteString Maybe a -> IO (V.Vector a)
getVecLn = getVecGLn
IL(getVecRest) :: Int -> StateT BSL.ByteString Maybe a -> IO (V.Vector a)
getVecRest = getVecGRest
IL(getVecULn) :: (VU.Unbox a) =>
  Int -> StateT BS.ByteString Maybe a -> IO (VU.Vector a)
getVecULn = getVecGLn
IL(getVecURest) :: (VU.Unbox a) =>
  Int -> StateT BSL.ByteString Maybe a -> IO (VU.Vector a)
getVecURest = getVecGRest

rInt :: StateT BSL.ByteString Maybe Int
IL(rInt) = StateT $ BSL.readInt . BSL.dropWhile (<'!')
rIntS :: StateT BS.ByteString Maybe Int
IL(rIntS) = StateT $ BS.readInt . BS.dropWhile (<'!')

unlessM, whenM :: (Monad m) => m Bool -> m () -> m ()
IL(whenM) = (. flip when) . (>>=)
IL(unlessM) = (. flip unless) . (>>=)

IL(wrA) = A.writeArray
IL(rdA) = A.readArray
IL(mdA) = \arr f !i -> do
  ai <- rdA arr i
  let fai = f ai 
  wrA arr i fai
  return (ai,fai)
{-# INLINE mdA' #-}
mdA' = \arr f !i -> do
  !ai <- rdA arr i
  let !fai = f ai
  wrA arr i fai
  return (ai,fai)
IL(swapA) = \arr !i !j -> do
  ai <- rdA arr i
  wrA arr i =<< rdA arr j
  wrA arr j ai

#define D(f,r,d)\
  IL(f) :: Integral a=>a->d; f=fromIntegral;\
  IL(r) :: String->d; r=read
#define C(f,r,g,h,d) D(f,r,d);\
  g,h :: RealFrac a=>a->d; IL(g)=floor; IL(h)=ceiling
C(_toInteger_,readInteger,floorInteger,ceilInteger,Integer)
C(toInt,readInt,floorInt,ceilInt,Int)
C(toI8,readI8,floorI8,ceilI8,Int8)
C(toI16,readI16,floorI16,ceilI16,Int16)
C(toI32,readI32,floorI32,ceilI32,Int32)
C(toI64,readI64,floorI64,ceilI64,Int64)
C(toWord,readWord,floorWord,ceilWord,Word)
C(toW8,readW8,floorW8,ceilW8,Word8)
C(toW16,readW16,floorW16,ceilW16,Word16)
C(toW32,readW32,floorW32,ceilW32,Word32)
C(toW64,readW64,floorW64,ceilW64,Word64)
D(toDouble,readDouble,Double)
D(toFloat,readFloat,Float)
#undef D
#undef C

#define N(f,g,h,a,m)\
  IL(f) :: forall e i s. (C(a,m)A.Ix i) => (i,i) -> e -> m (a i e);\
  f=A.newArray;\
  IL(g) :: forall e i s. (C(a,m)A.Ix i) => (i,i) -> m (a i e);\
  g=A.newArray_;\
  IL(h) :: forall e i s. (C(a,m)A.Ix i) => (i,i) -> [e] -> m (a i e);\
  h=A.newListArray
#define C(a,m)
N(newIOA,newIOA_,newIOAL,IOArray,IO)
N(newSTA,newSTA_,newSTAL,STArray s,ST s)
#undef C
#define C(a,m) MArray (a) e (m), 
N(newIOUA,newIOUA_,newIOUAL,IOUArray,IO)
N(newSTUA,newSTUA_,newSTUAL,STUArray s,ST s)
#undef C
#undef N

#undef IL


Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | {-# LANGUAGE
      |   ^
a.cc:10:49: error: stray '#' in program
   10 |   MultiParamTypeClasses, PartialTypeSignatures  #-}
      |                                                 ^
a.cc:11:3: error: stray '#' in program
   11 | {-# OPTIONS_GHC -O2 #-}
      |   ^
a.cc:11:21: error: stray '#' in program
   11 | {-# OPTIONS_GHC -O2 #-}
      |                     ^
a.cc:79:37: error: stray '#' in program
   79 | import GHC.Exts (build, Int(..), Int#,
      |                                     ^
a.cc:80:20: error: stray '#' in program
   80 |                  (+#), (*#), (-#), (<#), (>=#), (==#), quotRemInt#,
      |                    ^
a.cc:80:26: error: stray '#' in program
   80 |                  (+#), (*#), (-#), (<#), (>=#), (==#), quotRemInt#,
      |                          ^
a.cc:80:32: error: stray '#' in program
   80 |                  (+#), (*#), (-#), (<#), (>=#), (==#), quotRemInt#,
      |                                ^
a.cc:80:38: error: stray '#' in program
   80 |                  (+#), (*#), (-#), (<#), (>=#), (==#), quotRemInt#,
      |                                      ^
a.cc:80:45: error: stray '#' in program
   80 |                  (+#), (*#), (-#), (<#), (>=#), (==#), quotRemInt#,
      |                                             ^
a.cc:80:52: error: stray '#' in program
   80 |                  (+#), (*#), (-#), (<#), (>=#), (==#), quotRemInt#,
      |                                                    ^
a.cc:80:66: error: stray '#' in program
   80 |                  (+#), (*#), (-#), (<#), (>=#), (==#), quotRemInt#,
      |                                                                  ^
a.cc:81:24: error: stray '#' in program
   81 |                  remInt#, uncheckedIShiftRL#, andI#, orI#,
      |                        ^
a.cc:81:44: error: stray '#' in program
   81 |                  remInt#, uncheckedIShiftRL#, andI#, orI#,
      |                                            ^
a.cc:81:51: error: stray '#' in program
   81 |                  remInt#, uncheckedIShiftRL#, andI#, orI#,
      |                                                   ^
a.cc:81:57: error: stray '#' in program
   81 |                  remInt#, uncheckedIShiftRL#, andI#, orI#,
      |                                                         ^
a.cc:82:23: error: stray '#' in program
   82 |                 isTrue#)
      |                       ^
a.cc:95:3: error: stray '#' in program
   95 | {-# INLINE_FUSED zipTailWithM_stream #-}
      |   ^
a.cc:95:38: error: stray '#' in program
   95 | {-# INLINE_FUSED zipTailWithM_stream #-}
      |                                      ^
a.cc:100:7: error: stray '#' in program
  100 |     {-# INLINE_INNER step2 #-}
      |       ^
a.cc:100:28: error: stray '#' in program
  100 |     {-# INLINE_INNER step2 #-}
      |                            ^
a.cc:101:43: error: stray '\' in program
  101 |     step2 (Nothing, s0) = (<$> step s0) $ \res -> case res of
      |                                           ^
a.cc:105:39: error: stray '\' in program
  105 |     step2 (Just a0, s0) = step s0 >>= \res -> case res of
      |                                       ^
a.cc:106:27: error: stray '`' in program
  106 |       VFS.Yield a1 s1 -> (`VFS.Yield` (Just a1, s1)) <$> f a0 a1
      |                           ^
a.cc:106:37: error: stray '`' in program
  106 |       VFS.Yield a1 s1 -> (`VFS.Yield` (Just a1, s1)) <$> f a0 a1
      |                                     ^
a.cc:110:3: error: stray '#' in program
  110 | {-# INLINE zipTailWith_stream #-}
      |   ^
a.cc:110:31: error: stray '#' in program
  110 | {-# INLINE zipTailWith_stream #-}
      |                               ^
a.cc:113:45: error: stray '\' in program
  113 | zipTailWith_stream f = zipTailWithM_stream (\a0 a1 -> return (f a0 a1))
      |                                             ^
a.cc:115:3: error: stray '#' in program
  115 | {-# INLINE zipTail_stream #-}
      |   ^
a.cc:115:27: error: stray '#' in program
  115 | {-# INLINE zipTail_stream #-}
      |                           ^
a.cc:119:3: error: stray '#' in program
  119 | {-# INLINE_FUSED zipTailWithM_mbundle #-}
      |   ^
a.cc:119:39: error: stray '#' in program
  119 | {-# INLINE_FUSED zipTailWithM_mbundle #-}
      |                                       ^
a.cc:125:3: error: stray '#' in program
  125 | {-# INLINE zipTailWith_mbundle #-}
      |   ^
a.cc:125:32: error: stray '#' in program
  125 | {-# INLINE zipTailWith_mbundle #-}
      |                                ^
a.cc:128:47: error: stray '\' in program
  128 | zipTailWith_mbundle f = zipTailWithM_mbundle (\a0 a1 -> return $ f a0 a1)
      |                                               ^
a.cc:130:3: error: stray '#' in program
  130 | {-# INLINE zipTail_mbundle #-}
      |   ^
a.cc:130:28: error: stray '#' in program
  130 | {-# INLINE zipTail_mbundle #-}
      |                            ^
a.cc:134:3: error: stray '#' in program
  134 | {-# INLINE zipTailWith_bundle #-}
      |   ^
a.cc:134:31: error: stray '#' in program
  134 | {-# INLINE zipTailWith_bundle #-}
      |                               ^
a.cc:138:3: error: stray '#' in program
  138 | {-# INLINE zipTail_bundle #-}
      |   ^
a.cc:138:27: error: stray '#' in program
  138 | {-# INLINE zipTail_bundle #-}
      |                           ^
a.cc:142:3: error: stray '#' in program
  142 | {-# INLINE vZipTailWith #-}
      |   ^
a.cc:142:25: error: stray '#' in program
  142 | {-# INLINE vZipTailWith #-}
      |                         ^
a.cc:146:3: error: stray '#' in program
  146 | {-# INLINE vZipTail #-}
      |   ^
a.cc:146:21: error: stray '#' in program
  146 | {-# INLINE vZipTail #-}
      |                     ^
a.cc:170:43: error: stray '`' in program
  170 |   = (k   +   (*) m (m - 1)                `shiftR` 1,
      |                                           ^
a.cc:170:50: error: stray '`' in program
  170 |   = (k   +   (*) m (m - 1)                `shiftR` 1,
      |                                                  ^
a.cc:171:23: error: stray '`' in program
  171 |      k   +   (*) m (n `shiftL` 1 - m - 1) `shiftR` 1)
      |                       ^
a.cc:171:30: error: stray '`' in program
  171 |      k   +   (*) m (n `shiftL` 1 - m - 1) `shiftR` 1)
      |                              ^
a.cc:171:43: error: stray '`' in program
  171 |      k   +   (*) m (n `shiftL` 1 - m - 1) `shiftR` 1)
      |                                           ^
a.cc:171:50: error: stray '`' in program
  171 |      k   +   (*) m (n `shiftL` 1 - m - 1) `shiftR` 1)
      |                                                  ^
a.cc:176:44: error: stray '\' in program
  176 |         tot = VU.sum $ VU.generate (n+1) $ \ !m -> 1 + m * (n - m)
      |                                            ^
a.cc:178:13: error: stray '\' in program
  178 |           $ \ !m -> let (p0,p1) = intv n 0 m
      |             ^
a.cc:182:13: error: '#' is not followed by a macro parameter
  182 | #define IL(f) {-# INLINE f #-}; f
      |             ^
a.cc:232:5: error: stray '\' in program
  232 |   = \(a,b) -> (showA a <>) $ BSB.char7 ' ' <> showB b
      |     ^
a.cc:240:5: error: stray '\' in program
  240 |   = \(a,b,c) -> (showA a <>) $ (BSB.char7 ' ' <>) $ (showB b <>)
      |     ^
a.cc:250:5: error: stray '\' in program
  250 |   = \(a,b,c,d) -> (showA a <>) $ (BSB.char7 ' ' <>)
      |     ^
a.cc:275:15: error: stray '\' in program
  275 |   = VG.foldr (\ a -> (showFct a <>) . (BSB.char7 '\n' <>)) mempty
      |               ^
a.cc:281:23: error: stray '`' in program
  281 | IL(v2BSpcSepPostf) = (`v2BSpcSepPostfWith` showAsBuilder)
      |                       ^
a.cc:281:42: error: stray '`' in program
  281 | IL(v2BSpcSepPostf) = (`v2BSpcSepPostfWith` showAsBuilder)
      |                                          ^
a.cc:307:53: error: stray '\' in program
  307 | vecToBuilder_ !prefix !separator !postfix showFct = \vec -> prefix <>
      |                                                     ^
a.cc:309:4: error: stray '\' in program
  309 |   (\ a rest !prefx -> prefx <> (showFct a <> rest separator))
      |    ^
a.cc:313:23: error: stray '\' in program
  313 | evalVals xs = build $ \c n -> foldr (c $!) n xs
      |                       ^
a.cc:315:24: error: stray '\' in program
  315 | forceVals xs = build $ \c n -> foldr (c $!!) n xs
      |                        ^
a.cc:345:11: error: stray '\' in program
  345 | IL(mdA) = \arr f !i -> do
      |           ^
a.cc:350:3: error: stray '#' in program
  350 | {-# INLINE mdA' #-}
      |   ^
a.cc:350:15: warning: missing terminating ' character
  350 | {-# INLINE mdA' #-}
      |               ^
a.cc:350:15: error: missing terminating ' character
  350 | {-# INLINE mdA' #-}
      |               ^~~~~
a.cc:351:4: warning: missing terminating ' character
  351 | mdA' = \arr f !i -> do
      |    ^
a.cc:351:4: error: missing terminating ' character
  351 | mdA' = \arr f !i -> do
      |    ^~~~~~~~~~~~~~~~~~~
a.cc:356:13: error: stray '\' in program
  356 | IL(swapA) = \arr !i !j -> do
      |             ^
a.cc:1:1: error: expected unqualified-id before '{' token
    1 | {-# LANGUAGE
      | ^
a.cc:11:1: error: expected unqualified-id before '{' token
   11 | {-# OPTIONS_GHC -O2 #-}
      | ^
a.cc:13:1: error: 'import' does not name a type
   13 | import Prelude
      | ^~~~~~
a.cc:13:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:96:1: error: 'zipTailWithM_stream' does not name a type
   96 | zipTailWithM_stream :: Monad m =>
      | ^~~~~~~~~~~~~~~~~~~
a.cc:101:11: error: expected constructor, destructor, or type conversion before '(' token
  101 |     step2 (Nothing, s0) = (<$> step s0) $ \res -> case res of
      |           ^
a.cc:111:1: error: 'zipTailWith_stream' does not name a type
  111 | zipTailWith_stream :: Monad m =>
      | ^~~~~~~~~~~~~~~~~~
a.cc:116:1: error: 'zipTail_stream' does not name a type
  116 | zipTail_stream :: Monad m => VFS.Stream m a -> VFS.Stream m (a,a)
      | ^~~~~~~~~~~~~~
a.cc:120:1: error: 'zipTailWithM_mbundle' does not name a type
  120 | zipTailWithM_mbundle :: Monad m =>
      | ^~~~~~~~~~~~~~~~~~~~
a.cc:123:3: erro