Submission #1441565


Source Code Expand

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
namespace AtCoder {
    class MainClass {
        public static void Main(string[] args) { new MainClass().solve(); }

        Scanner cin = new Scanner();

        String S;
        void solve() {
            S = cin.next();

            bool isTea = S[S.Length - 1] == 'T';

            Console.WriteLine(isTea ? "YES" : "NO");

        }
        class Scanner {
            string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' };
            public Scanner() { nextBuffer = new string[0]; BufferCnt = 0; }
            public string next() {
                if (BufferCnt < nextBuffer.Length) return nextBuffer[BufferCnt++];
                string st = Console.ReadLine();
                while (st == "") st = Console.ReadLine();
                nextBuffer = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
                BufferCnt = 0;
                return nextBuffer[BufferCnt++];
            }
            public int nextInt() { return int.Parse(next()); }
            public long nextLong() { return long.Parse(next()); }
            public double nextDouble() { return double.Parse(next()); }
        }
        class Mathf {
            private int mod = 1000000007;
            public Mathf() { }
            public Mathf(int mod) { this.mod = mod; }
            public long Pow(long a, long b) {
                if (b == 0) return 1;
                if (b % 2 == 1) return (a % mod * Pow(a % mod, b - 1) % mod) % mod;
                else return Pow(a * a % mod, b / 2) % mod;
            }
            public long Fact(long n) { return n != 0 ? (n % mod * (Fact(n - 1) % mod) % mod) : 1; }
            public long C(long n, long r) {
                if (r == 0 || n == r) return 1;
                else return (Fact(n) % mod * Pow((Fact(n - r) % mod * Fact(r) % mod) % mod, mod - 2) % mod) % mod;
            }
        }
    }
}

Submission Info

Submission Time
Task A - お茶
User rui0422
Language C++14 (GCC 5.4.1)
Score 0
Code Size 2067 Byte
Status CE

Compile Error

./Main.cpp:1:7: error: expected nested-name-specifier before ‘System’
 using System;
       ^
./Main.cpp:2:7: error: expected nested-name-specifier before ‘System’
 using System.Collections;
       ^
./Main.cpp:3:7: error: expected nested-name-specifier before ‘System’
 using System.Collections.Generic;
       ^
./Main.cpp:4:7: error: expected nested-name-specifier before ‘System’
 using System.Diagnostics;
       ^
./Main.cpp:5:7: error: expected nested-name-specifier before ‘System’
 using System.IO;
       ^
./Main.cpp:6:7: error: expected nested-name-specifier before ‘System’
 using System.Linq;
       ^
./Main.cpp:7:7: error: expected nested-name-specifier before ‘System’
 using System.Text;
       ^
./Main.cpp:10:16: error: expected ‘:’ before ‘static’
         public static void Main(string[] args) { new MainClass().solve(); }
                ^
./Main.cpp:10:33: error: ‘string’ has not been declared
         public static void Main(string[] args) { new MainClass().solve(); }
                  ...