cp-library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub kobejean/cp-library

:warning: cp_library/alg/iter/ishift_fn.py

Code

import cp_library.alg.iter.__header__
from typing import MutableSequence
from cp_library.misc.typing import _T

def ishift(A: MutableSequence[_T], offset=-1):
    for i,a in enumerate(A): A[i] = a+offset
    return A
'''
╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸
             https://kobejean.github.io/cp-library               
'''
from typing import MutableSequence
from typing import TypeVar
_T = TypeVar('T')

def ishift(A: MutableSequence[_T], offset=-1):
    for i,a in enumerate(A): A[i] = a+offset
    return A
Back to top page