#22. 数组条件修改

    ID: 22 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatArray-1gesp3一维数组条件结构

数组条件修改

Array Modification

Background

Congcong is processing some number sequences. He discovered a special rule that requires adjustments to certain sequences.

Problem Description

Given an integer array of length 33. If there is a 22 in the array immediately followed by a 33, set the 33 element to 00. Return the changed array.

Input Format

Input is given from standard input in the following format.

A single line containing three integers, representing the elements of the array.

Output Format

Output is printed to standard output in the following format.

A single line containing three integers, representing the modified array.

Sample

[1 2 3]
[1, 2, 0]
[2 3 5]
[2, 0, 5]
[1 2 1]
[1, 2, 1]

Sample Explanation

In the first sample, a 22 at index 11 is immediately followed by a 33 at index 22, so the 33 at index 22 is changed to 00. In the second sample, a 22 at index 00 is immediately followed by a 33 at index 11, so the 33 at index 11 is changed to 00. In the third sample, there is no 22 immediately followed by a 33, so the array remains unchanged.

Constraints

Time limit: 11s, Memory limit: 10241024KiB for each test case.