Doubly and singly Cabibbo suppressed charm decays into the K+π-π+ final state