Submission #351998


Source Code Expand

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;

class Myon
{
    public Myon() { }
    public static int Main()
    {
        new Myon().calc();
        return 0;
    }

    Scanner cin;
    void calc()
    {
        cin = new Scanner();

        string s = cin.next();
        for (int i = 0; i < s.Length; i++)
        {
            char a = s[i];
            char b = s[s.Length - i - 1];
            if (a == '*' || b == '*' || a == b) continue;
            else
            {
                Console.WriteLine("NO");
                return;
            }
        }
        Console.WriteLine("YES");
    }

}




class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }

}


class XRand
{
    uint x, y, z, w;


    public XRand()
    {
        init();
    }

    public XRand(uint s)
    {
        init();
        init_xor128(s);
    }

    void init()
    {
        x = 314159265; y = 358979323; z = 846264338; w = 327950288;

    }

    public void init_xor128(uint s)
    {
        z ^= s;
        z ^= z >> 21; z ^= z << 35; z ^= z >> 4;
        z *= 736338717;
    }

    uint next()
    {
        uint t = x ^ x << 11; x = y; y = z; z = w; return w = w ^ w >> 19 ^ t ^ t >> 8;
    }

    public long nextLong(long m)
    {
        return (long)((((ulong)next() << 32) + next()) % (ulong)m);
    }

    public int nextInt(int m)
    {
        return (int)(next() % m);
    }

    public long nextLong(long min, long max)
    {
        return min + nextLong(max - min + 1);
    }

    public int nextInt(int min, int max)
    {
        return min + nextInt(max - min + 1);
    }

    public int nextIntP(int a)
    {
        return (int)Math.Pow(a, nextDouble());
    }

    public int nextIntP(int min, int max)
    {
        int diff = max - min;
        return min + nextIntP(diff + 2) - 1;
    }

    public long nextLongP(long a)
    {
        return (long)Math.Pow(a, nextDouble());
    }

    public long nextLongP(long min, long max)
    {
        long diff = max - min;
        return min + nextLongP(diff + 2) - 1;
    }


    public double nextDouble()
    {
        return (double)next() / uint.MaxValue;
    }

    public double nextDoubleP(double a)
    {
        return Math.Pow(a, nextDouble());
    }
}

Submission Info

Submission Time
Task A - 高橋くんと回文
User chokudai
Language C# (Mono 3.2.1.0)
Score 100
Code Size 3059 Byte
Status AC
Exec Time 159 ms
Memory 8620 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 22
Set Name Test Cases
Sample subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt
All subtask0_0.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt, subtask1_0.txt, subtask1_1.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_2.txt, subtask1_3.txt, subtask1_4.txt, subtask1_5.txt, subtask1_6.txt, subtask1_7.txt, subtask1_8.txt, subtask1_9.txt
Case Name Status Exec Time Memory
subtask0_0.txt AC 154 ms 8608 KB
subtask0_1.txt AC 157 ms 8600 KB
subtask0_2.txt AC 154 ms 8604 KB
subtask0_3.txt AC 154 ms 8608 KB
subtask1_0.txt AC 153 ms 8600 KB
subtask1_1.txt AC 156 ms 8612 KB
subtask1_10.txt AC 155 ms 8620 KB
subtask1_11.txt AC 156 ms 8480 KB
subtask1_12.txt AC 155 ms 8608 KB
subtask1_13.txt AC 154 ms 8604 KB
subtask1_14.txt AC 155 ms 8608 KB
subtask1_15.txt AC 155 ms 8604 KB
subtask1_16.txt AC 155 ms 8504 KB
subtask1_17.txt AC 157 ms 8604 KB
subtask1_2.txt AC 156 ms 8616 KB
subtask1_3.txt AC 159 ms 8592 KB
subtask1_4.txt AC 155 ms 8608 KB
subtask1_5.txt AC 155 ms 8604 KB
subtask1_6.txt AC 155 ms 8612 KB
subtask1_7.txt AC 155 ms 8604 KB
subtask1_8.txt AC 155 ms 8600 KB
subtask1_9.txt AC 154 ms 8608 KB