CSES - Datatähti 2018 alku - Results
Submission details
Task:Merkkijono
Sender:AirPett
Submission time:2017-10-06 22:07:55 +0300
Language:Java
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#10.15 sdetails
#2ACCEPTED0.18 sdetails
#3ACCEPTED0.17 sdetails
#40.15 sdetails
#50.15 sdetails
#60.15 sdetails
#70.14 sdetails
#80.15 sdetails
#90.15 sdetails
#100.14 sdetails

Code

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        String data = "ABCDDCBA";//input.nextLine();

        while (data.matches(".*(\\w)\\1+.*")) {
            data = data.replaceFirst("(\\w)\\1+", "");
        }

        //System.out.println(data.matches(".*(\\w)\\1+.*"));

        System.out.println(data);
    }
}

Test details

Test 1

Verdict:

input
ABABABABABABABABABABABABABABAB...

correct output
ABABABABABABABABABABABABABABAB...

user output
(empty)

Test 2

Verdict: ACCEPTED

input
AABBAABBAABBAABBAABBAABBAABBAA...

correct output
(empty)

user output
(empty)

Test 3

Verdict: ACCEPTED

input
ABABABABABABABABABABABABABABAB...

correct output
(empty)

user output
(empty)

Test 4

Verdict:

input
BBABABBBBBAABBBABABABBBBAAABAB...

correct output
BAB

user output
(empty)

Test 5

Verdict:

input
ACDCBBACDBBBACAACBBDBADBAABABA...

correct output
ACDCACDADBADABACACDCADADABABCA...

user output
(empty)

Test 6

Verdict:

input
EETFHIJOGACDHMGVFJCMETMZDEITTR...

correct output
TFHIJOGACDHMGVFJCMETMZDEIROTET...

user output
(empty)

Test 7

Verdict:

input
GOONLAHLYPRFCZKIKSJWAWWYJJPCDB...

correct output
GNLAHLYPRFCZKIKSJWAYPCDNWYMRCE...

user output
(empty)

Test 8

Verdict:

input
PISHWMOTCDDZFRMYMOMYDYYGJZIQHS...

correct output
PISHWMOTCZFRMYMOMYDGJZIQHSVAOK...

user output
(empty)

Test 9

Verdict:

input
QUVVTPXAMWWODFXRONJODPGBTCISGM...

correct output
QUTPXAMODFXRONJODPGBTCISGMVRBW...

user output
(empty)

Test 10

Verdict:

input
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

correct output
POXHAHYEZTLYNFSLABODMRNKDSKROZ...

user output
(empty)