Language: C++

#region いつもの
using System;
using System.Collections.Generic;
using System.Linq;
using AtCoderProject;
using ConsoleReader = AtCoderProject.Reader.ConsoleReader;
using IEnumerable = System.Collections.IEnumerable;
using IEnumerator = System.Collections.IEnumerator;
using BigInteger = System.Numerics.BigInteger;
using TextReader = System.IO.TextReader;
using StringBuilder = System.Text.StringBuilder;
using static AtCoderProject.Global;
using static AtCoderProject.NumGlobal;

namespace AtCoderProject
{
    public static class Global
    {
        public static void Swap<T>(ref T a, ref T b) { T tmp = a; a = b; b = tmp; }
        public static T[] NewArray<T>(int len0, T value) => new T[len0].Fill(value);
        public static T[] NewArray<T>(int len0, Func<T> factory)
        {
            var arr = new T[len0];
            for (int i = 0; i < arr.Length; i++) arr[i] = factory();
            return arr;
        }
        public static T[][] NewArray<T>(int len0, int len1, T value) where T : struct
        {
            var arr = new T[len0][];
            for (int i = 0; i < arr.Length; i++) arr[i] = NewArray(len1, value);
            return arr;
        }
        public static T[][] NewArray<T>(int len0, int len1, Func<T> factory)
        {
            var arr = new T[len0][];
            for (int i = 0; i < arr.Length; i++) arr[i] = NewArray(len1, factory);
            return arr;
        }
        public static T[][][] NewArray<T>(int len0, int len1, int len2, T value) where T : struct
        {
            var arr = new T[len0][][];
            for (int i = 0; i < arr.Length; i++) arr[i] = NewArray(len1, len2, value);
            return arr;
        }
        public static T[][][] NewArray<T>(int len0, int len1, int len2, Func<T> factory)
        {
            var arr = new T[len0][][];
            for (int i = 0; i < arr.Length; i++) arr[i] = NewArray(len1, len2, factory);
            return arr;
        }
        public static T[][][][] NewArray<T>(int len0, int len1, int len2, int len3, T value) where T : struct
        {
            var arr = new T[len0][][][];
            for (int i = 0; i < arr.Length; i++) arr[i] = NewArray(len1, len2, len3, value);
            return arr;
        }
        public static T[][][][] NewArray<T>(int len0, int len1, int len2, int len3, Func<T> factory)
        {
            var arr = new T[len0][][][];
            for (int i = 0; i < arr.Length; i++) arr[i] = NewArray(len1, len2, len3, factory);
            return arr;
        }
        private class ComparerReverseImpl<T> : Comparer<T> where T : IComparable<T> { public override int Compare(T y, T x) => x.CompareTo(y); public override bool Equals(object obj) => obj != null && GetType() == obj.GetType(); public override int GetHashCode() => GetType().GetHashCode(); }
        public static IComparer<T> ComparerReverse<T>() where T : IComparable<T> => new ComparerReverseImpl<T>();
        public static string AllLines<T>(IEnumerable<T> source) => string.Join("\n", source);
        public static string AllJoin<T>(IEnumerable<T> source) => string.Join(" ", source);
    }
    public static class NumGlobal
    {
        public static int Pow(int x, int y)
        {
            int res = 1;
            for (; y > 0; y >>= 1)
            {
                if ((y & 1) == 1) res *= x;
                x *= x;
            }
            return res;
        }
        public static BigInteger ParseBigInteger(string s)
        {
            // 自前実装の方が速い
            var res = BigInteger.Zero;
            var splited = new string[(s.Length + 7) / 8];
            for (var i = 0; i < splited.Length - 1; i++)
            {
                splited[i] = s.Substring(8 * i, 8);
            }
            splited[splited.Length - 1] = s.Substring(8 * (splited.Length - 1));
            foreach (var sp in splited)
            {
                res *= (int)Math.Pow(10, sp.Length);
                res += int.Parse(sp);
            }
            return res;
        }
        public static int BitCount(int x) { x -= (x >> 1) & 0x55555555; x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0f0f0f0f; x += x >> 8; x += x >> 16; return x & 0x3f; }
        public static int BitCount(long x) { x -= (x >> 1) & 0x5555555555555555; x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333); x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f; x += x >> 8; x += x >> 16; x += x >> 32; return (int)(x & 0x0000007f); }
        public static int MSB(int x) { x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; return BitCount(x) - 1; }
        public static int MSB(long x) { x |= x >> 1; x |= x >> 2; x |= x >> 4; x |= x >> 8; x |= x >> 16; x |= x >> 32; return BitCount(x) - 1; }
        public static int LSB(int x) { x |= x << 1; x |= x << 2; x |= x << 4; x |= x << 8; x |= x << 16; return 32 - BitCount(x); }
        public static int LSB(long x) { x |= x << 1; x |= x << 2; x |= x << 4; x |= x << 8; x |= x << 16; x |= x << 32; return 64 - BitCount(x); }
    }
    public static class Ext
    {
        public static long ToLong(this int i) => i;
        public static T[] Fill<T>(this T[] arr, T value)
        {
            for (var i = 0; i < arr.Length; i++) arr[i] = value;
            return arr;
        }
        public static T[] Sort<T>(this T[] arr) { Array.Sort(arr); return arr; }
        public static string[] Sort(this string[] arr) => Sort(arr, StringComparer.OrdinalIgnoreCase);
        public static T[] Sort<T, U>(this T[] arr, Func<T, U> selector) where U : IComparable<U> => Sort(arr, (a, b) => selector(a).CompareTo(selector(b)));
        public static T[] Sort<T>(this T[] arr, Comparison<T> comparison) { Array.Sort(arr, comparison); return arr; }
        public static T[] Sort<T>(this T[] arr, IComparer<T> comparer) { Array.Sort(arr, comparer); return arr; }
        public static T[] Reverse<T>(this T[] arr) { Array.Reverse(arr); return arr; }
        public static Tuple<int, T> MaxBy<T>(this T[] arr) where T : IComparable<T>
        {
            T max = arr[0];
            int maxIndex = 0;
            for (int i = 0; i < arr.Length; i++)
            {
                if (max.CompareTo(arr[i]) < 0)
                {
                    max = arr[i];
                    maxIndex = i;
                }
            }
            return Tuple.Create(maxIndex, max);
        }
        public static Tuple<TSource, TMax> MaxBy<TSource, TMax>
            (this IEnumerable<TSource> source, Func<TSource, TMax> maxBySelector)
            where TMax : IComparable<TMax>
        {
            TMax max;
            TSource maxByItem;

            var e = source.GetEnumerator();
            e.MoveNext();
            maxByItem = e.Current;
            max = maxBySelector(maxByItem);
            while (e.MoveNext())
            {
                var item = e.Current;
                var next = maxBySelector(item);
                if (max.CompareTo(next) < 0)
                {
                    max = next;
                    maxByItem = item;
                }
            }
            return Tuple.Create(maxByItem, max);
        }
        public static Tuple<int, T> MinBy<T>(this T[] arr) where T : IComparable<T>
        {
            T min = arr[0];
            int minIndex = 0;
            for (int i = 0; i < arr.Length; i++)
            {
                if (min.CompareTo(arr[i]) > 0)
                {
                    min = arr[i];
                    minIndex = i;
                }
            }
            return Tuple.Create(minIndex, min);
        }
        public static Tuple<TSource, TMin> MinBy<TSource, TMin>
            (this IEnumerable<TSource> source, Func<TSource, TMin> minBySelector)
            where TMin : IComparable<TMin>
        {
            TMin min;
            TSource minByItem;

            var e = source.GetEnumerator();
            e.MoveNext();
            minByItem = e.Current;
            min = minBySelector(minByItem);
            while (e.MoveNext())
            {
                var item = e.Current;
                var next = minBySelector(item);
                if (min.CompareTo(next) > 0)
                {
                    min = next;
                    minByItem = item;
                }
            }
            return Tuple.Create(minByItem, min);
        }
        public static IEnumerable<TSource> Append<TSource>(this IEnumerable<TSource> source, TSource element)
        {
            foreach (var item in source)
                yield return item;
            yield return element;
        }
        public static IEnumerable<TSource> Prepend<TSource>(this IEnumerable<TSource> source, TSource element)
        {
            yield return element;
            foreach (var item in source)
                yield return item;
        }
        public static IComparer<T> Reverse<T>(this IComparer<T> comparer) => Comparer<T>.Create((x, y) => comparer.Compare(y, x));
        public static Dictionary<TKey, int> GroupCount<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) => source.GroupBy(keySelector).ToDictionary(g => g.Key, g => g.Count());
        public static Dictionary<TKey, int> GroupCount<TKey>(this IEnumerable<TKey> source) => source.GroupCount(i => i);
        public static TValue Get<TKey, TValue>(this Dictionary<TKey, TValue> dic, TKey key)
        {
            TValue v;
            dic.TryGetValue(key, out v);
            return v;
        }
        public static TValue GetOrInit<TKey, TValue>(this Dictionary<TKey, TValue> dic, TKey key, TValue value)
        {
            TValue v;
            if (dic.TryGetValue(key, out v))
                return v;
            return dic[key] = value;
        }
    }
    public class ΔDebugView<T> { private IEnumerable<T> collection; public ΔDebugView(IEnumerable<T> collection) { if (collection == null) throw new ArgumentNullException(nameof(collection)); this.collection = collection; }[System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.RootHidden)] public T[] Items => collection.ToArray(); }
}
namespace AtCoderProject.Reader
{
    using System.IO;
    using System.Text;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
#pragma warning disable CA1819
    [DebuggerNonUserCode]
    public class ConsoleReader
    {
        const int BufSize = 1 << 12;
        private readonly byte[] buffer = new byte[BufSize];
        private readonly Stream input;
        private readonly Encoding encoding;
        private int pos = 0;
        private int len = 0;
        public ConsoleReader(Stream input, Encoding encoding) { this.input = input; this.encoding = encoding; }
        public ConsoleReader(Stream input) : this(input, Encoding.UTF8) { }
        public ConsoleReader(string text) : this(new MemoryStream(Encoding.UTF8.GetBytes(text))) { }
        private void MoveNext() { if (++pos >= len) { len = input.Read(buffer, 0, buffer.Length); if (len == 0) { buffer[0] = 10; } pos = 0; } }

        public int Int
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get
            {
                int res = 0;
                bool neg = false;
                while (buffer[pos] < 48) { neg = buffer[pos] == 45; MoveNext(); }
                do { res = res * 10 + (buffer[pos] ^ 48); MoveNext(); } while (48 <= buffer[pos]);
                return neg ? -res : res;
            }
        }
        public int Int0 => this.Int - 1;
        public long Long
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get
            {
                long res = 0;
                bool neg = false;
                while (buffer[pos] < 48) { neg = buffer[pos] == 45; MoveNext(); }
                do { res = res * 10 + (buffer[pos] ^ 48); MoveNext(); } while (48 <= buffer[pos]);
                return neg ? -res : res;
            }
        }
        public long Long0 => this.Long - 1;
        public string String
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get
            {
                var sb = new List<byte>();
                while (buffer[pos] <= 32) MoveNext();
                do { sb.Add(buffer[pos]); MoveNext(); } while (32 < buffer[pos]);
                return this.encoding.GetString(sb.ToArray());
            }
        }
        public string Ascii
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get
            {
                var sb = new StringBuilder();
                while (buffer[pos] <= 32) MoveNext();
                do { sb.Append((char)buffer[pos]); MoveNext(); } while (32 < buffer[pos]);
                return sb.ToString();
            }
        }
        public string Line
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get
            {
                var sb = new List<byte>();
                while (buffer[pos] < 32) MoveNext();
                do { sb.Add(buffer[pos]); MoveNext(); } while (buffer[pos] != 10 && buffer[pos] != 13);
                return this.encoding.GetString(sb.ToArray());
            }
        }
        public double Double => double.Parse(this.Ascii);

        [DebuggerNonUserCode]
        public struct RepeatReader
        {
            ConsoleReader cr;
            int count;
            public RepeatReader(ConsoleReader cr, int count) { this.cr = cr; this.count = count; }
            public T[] Select<T>(Func<ConsoleReader, T> factory) { var arr = new T[count]; for (var i = 0; i < count; i++) arr[i] = factory(cr); return arr; }
            public string[] Line { get { var arr = new string[count]; for (var i = 0; i < count; i++) arr[i] = cr.Line; return arr; } }
            public string[] String { get { var arr = new string[count]; for (var i = 0; i < count; i++) arr[i] = cr.String; return arr; } }
            public string[] Ascii { get { var arr = new string[count]; for (var i = 0; i < count; i++) arr[i] = cr.Ascii; return arr; } }
            public int[] Int { get { var arr = new int[count]; for (var i = 0; i < count; i++) arr[i] = cr.Int; return arr; } }
            public int[] Int0 { get { var arr = new int[count]; for (var i = 0; i < count; i++) arr[i] = cr.Int0; return arr; } }
            public long[] Long { get { var arr = new long[count]; for (var i = 0; i < count; i++) arr[i] = cr.Long; return arr; } }
            public long[] Long0 { get { var arr = new long[count]; for (var i = 0; i < count; i++) arr[i] = cr.Long0; return arr; } }
            public double[] Double { get { var arr = new double[count]; for (var i = 0; i < count; i++) arr[i] = cr.Double; return arr; } }
        }
        public RepeatReader Repeat(int count) => new RepeatReader(this, count);

        [DebuggerNonUserCode]
        public struct SplitReader
        {
            ConsoleReader cr;
            public SplitReader(ConsoleReader cr) { this.cr = cr; }
            public string[] String { get { while (cr.buffer[cr.pos] <= 32) cr.MoveNext(); var list = new List<string>(); do { if (cr.buffer[cr.pos] < 32) cr.MoveNext(); else list.Add(cr.String); } while (cr.buffer[cr.pos] != 10 && cr.buffer[cr.pos] != 13); return list.ToArray(); } }
            public string[] Ascii { get { while (cr.buffer[cr.pos] <= 32) cr.MoveNext(); var list = new List<string>(); do { if (cr.buffer[cr.pos] < 32) cr.MoveNext(); else list.Add(cr.Ascii); } while (cr.buffer[cr.pos] != 10 && cr.buffer[cr.pos] != 13); return list.ToArray(); } }
            public int[] Int { get { while (cr.buffer[cr.pos] <= 32) cr.MoveNext(); var list = new List<int>(); do { if (cr.buffer[cr.pos] < 32) cr.MoveNext(); else list.Add(cr.Int); } while (cr.buffer[cr.pos] != 10 && cr.buffer[cr.pos] != 13); return list.ToArray(); } }
            public int[] Int0 { get { while (cr.buffer[cr.pos] <= 32) cr.MoveNext(); var list = new List<int>(); do { if (cr.buffer[cr.pos] < 32) cr.MoveNext(); else list.Add(cr.Int0); } while (cr.buffer[cr.pos] != 10 && cr.buffer[cr.pos] != 13); return list.ToArray(); } }
            public long[] Long { get { while (cr.buffer[cr.pos] <= 32) cr.MoveNext(); var list = new List<long>(); do { if (cr.buffer[cr.pos] < 32) cr.MoveNext(); else list.Add(cr.Long); } while (cr.buffer[cr.pos] != 10 && cr.buffer[cr.pos] != 13); return list.ToArray(); } }
            public long[] Long0 { get { while (cr.buffer[cr.pos] <= 32) cr.MoveNext(); var list = new List<long>(); do { if (cr.buffer[cr.pos] < 32) cr.MoveNext(); else list.Add(cr.Long0); } while (cr.buffer[cr.pos] != 10 && cr.buffer[cr.pos] != 13); return list.ToArray(); } }
            public double[] Double { get { while (cr.buffer[cr.pos] <= 32) cr.MoveNext(); var list = new List<double>(); do { if (cr.buffer[cr.pos] < 32) cr.MoveNext(); else list.Add(cr.Double); } while (cr.buffer[cr.pos] != 10 && cr.buffer[cr.pos] != 13); return list.ToArray(); } }
        }
        public SplitReader Split => new SplitReader(this);
    }
}
public class Program
{
    [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)] private ConsoleReader cr;

    public Program(ConsoleReader consoleReader) { this.cr = consoleReader; }
    static void Main() => Console.WriteLine(new Program(new ConsoleReader(Console.OpenStandardInput())).Result());
    #endregion
    public string Result() { var obj = Calc(); if (obj is bool) return (bool)obj ? "Yes" : "No"; if (obj is double) return ((double)obj).ToString("0.####################"); return obj.ToString(); }
    private object Calc()
    {
        var s = cr.Ascii;
        var t = cr.Ascii;
        var sb = new StringBuilder((s.Length + t.Length) << 1);
        while (sb.Length < s.Length + t.Length) sb.Append(s);
        var ss = sb.ToString();

        var oks = new bool[s.Length];
        var matches = new KMP(t).Matches(ss).Where(i => i < s.Length).ToArray();
        if (matches.Length == 0) return 0;
        foreach (var i in matches)
            oks[i] = true;

        var uf = new UnionFind(s.Length);
        for (int i = 0; i < oks.Length; i++)
        {
            if (oks[i] && oks[(i + t.Length) % oks.Length])
            {
                if (!uf.TryUnionSet(i, (i + t.Length) % oks.Length))
                    return -1;
            }
        }


        return Enumerable.Range(0, s.Length).Max(i => uf.Count(i));
    }
}
class KMP // https://algoful.com/Archive/Algorithm/KMPSearch
{
    string pattern;
    int[] table;
    public KMP(string pattern) { this.pattern = pattern; table = CreateTable(pattern); }
    static int[] CreateTable(string pattern)
    {
        var table = new int[pattern.Length + 1];
        int j = 0;
        for (int i = 1; i < table.Length; i++)
        {
            if (i < pattern.Length && pattern[i] == pattern[j])
                table[i] = j++;
            else
            {
                table[i] = j;
                j = 0;
            }
        }
        return table;
    }

    public IEnumerable<int> Matches(string target)
    {
        int i = 0, p = 0;
        while (i < target.Length && p < pattern.Length)
        {
            if (target[i] == pattern[p])
            {
                // 文字が一致していれば次の文字に進む
                i++; p++;
            }
            else if (p == 0)
            {
                // パターン先頭文字が不一致の場合、次の文字
                i++;
            }
            else
            {
                // 不一致の場合、パターンのどの位置から再開するか設定
                p = table[p];
            }

            if (p == pattern.Length)
            {
                yield return i - p;
                p = table[p];
            }
        }
    }
}
class UnionFind
{
    int[] data;
    public UnionFind(int size)
    {
        this.data = NewArray(size, -1);
    }

    public int Root(int x)
    {
        if (data[x] < 0) return x;
        return data[x] = Root(data[x]);
    }
    public int Count(int x) => -data[Root(x)];
    public void UnionSet(int x, int y) => TryUnionSet(x, y);
    public bool TryUnionSet(int x, int y)
    {
        var xRoot = Root(x);
        var yRoot = Root(y);
        if (xRoot == yRoot) return false;
        else if (data[yRoot] < data[xRoot])//y側の方が多い場合は逆にする
        {
            var tmp = yRoot;
            yRoot = xRoot;
            xRoot = tmp;
        }
        data[xRoot] += data[yRoot];
        data[yRoot] = xRoot;
        return true;
    }
    public bool IsSameSet(int x, int y) => Root(x) == Root(y);
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #region
    1 | #region いつもの
      |  ^~~~~~
a.cc:345:6: error: invalid preprocessing directive #endregion
  345 |     #endregion
      |      ^~~~~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Linq;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'AtCoderProject'
    5 | using AtCoderProject;
      |       ^~~~~~~~~~~~~~
a.cc:6:23: error: 'AtCoderProject' does not name a type
    6 | using ConsoleReader = AtCoderProject.Reader.ConsoleReader;
      |                       ^~~~~~~~~~~~~~
a.cc:7:21: error: 'System' does not name a type
    7 | using IEnumerable = System.Collections.IEnumerable;
      |                     ^~~~~~
a.cc:8:21: error: 'System' does not name a type
    8 | using IEnumerator = System.Collections.IEnumerator;
      |                     ^~~~~~
a.cc:9:20: error: 'System' does not name a type
    9 | using BigInteger = System.Numerics.BigInteger;
      |                    ^~~~~~
a.cc:10:20: error: 'System' does not name a type
   10 | using TextReader = System.IO.TextReader;
      |                    ^~~~~~
a.cc:11:23: error: 'System' does not name a type
   11 | using StringBuilder = System.Text.StringBuilder;
      |                       ^~~~~~
a.cc:12:7: error: expected nested-name-specifier before 'static'
   12 | using static AtCoderProject.Global;
      |       ^~~~~~
a.cc:13:7: error: expected nested-name-specifier before 'static'
   13 | using static AtCoderProject.NumGlobal;
      |       ^~~~~~
a.cc:17:5: error: expected unqualified-id before 'public'
   17 |     public static class Global
      |     ^~~~~~
a.cc:68:5: error: expected unqualified-id before 'public'
   68 |     public static class NumGlobal
      |     ^~~~~~
a.cc:104:5: error: expected unqualified-id before 'public'
  104 |     public static class Ext
      |     ^~~~~~
a.cc:221:5: error: expected unqualified-id before 'public'
  221 |     public class ΔDebugView<T> { private IEnumerable<T> collection; public ΔDebugView(IEnumerable<T> collection) { if (collection == null) throw new ArgumentNullException(nameof(collection)); this.collection = collection; }[System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.RootHidden)] public T[] Items => collection.ToArray(); }
      |     ^~~~~~
a.cc:223:25: error: expected '{' before '.' token
  223 | namespace AtCoderProject.Reader
      |                         ^
a.cc:223:25: error: expected unqualified-id before '.' token
a.cc:339:1: error: expected unqualified-id before 'public'
  339 | public class Program
      | ^~~~~~
a.cc:377:5: error: 'string' does not name a type
  377 |     string pattern;
      |     ^~~~~~
a.cc:378:8: error: expected unqualified-id before '[' token
  378 |     int[] table;
      |        ^
a.cc:379:11: error: expected ':' before 'KMP'
  379 |     public KMP(string pattern) { this.pattern = pattern; table = CreateTable(pattern); }
      |           ^~~~
      |           :
a.cc:379:22: error: expected ')' before 'pattern'
  379 |     public KMP(string pattern) { this.pattern = pattern; table = CreateTable(pattern); }
      |               ~      ^~~~~~~~
      |                      )
a.cc:380:15: error: expected unqualified-id before '[' token
  380 |     static int[] CreateTable(string pattern)
      |               ^
a.cc:397:11: error: expected ':' before 'IEnumerable'
  397 |     public IEnumerable<int> Matches(string target)
      |           ^~~~~~~~~~~~
      |           :
a.cc:397:12: error: 'IEnumerable' does not name a type
  397 |     public IEnumerable<int> Matches(string target)
      |            ^~~~~~~~~~~
a.cc:425:2: error: expected ';' after class definition
  425 | }
      |  ^
      |  ;
a.cc:428:8: error: expected unqualified-id before '[' token
  428 |     int[] data;
      |        ^
a.cc:429:11: error: expected ':' before 'UnionFind'
  429 |     public UnionFind(int size)
      |           ^~~~~~~~~~
      |           :
a.cc:434:11: error: expected ':' before 'int'
  434 |     public int Root(int x)
      |           ^~~~
      |           :
a.cc:439:11: error: expected ':' before 'int'
  439 |     public int Count(int x) => -data[Root(x)];
      |           ^~~~
      |           :
a.cc:439:32: error: invalid pure specifier (only '= 0' is allowed) before '-' token
  439 |     public int Count(int x) => -data[Root(x)];
      |                                ^
a.cc:440:11: error: expected ':' before 'void'
  440 |     public void UnionSet(int x, int y) => TryUnionSet(x, y);
      |           ^~~~~
      |           :
a.cc:440:43: error: invalid pure specifier (only '= 0' is allowed) before 'TryUnionSet'
  440 |     public void UnionSet(int x, int y) => TryUnionSet(x, y);
      |                                           ^~~~~~~~~~~
a.cc:441:11: error: expected ':' before 'bool'
  441 |     public bool TryUnionSet(int x, int y)
      |           ^~~~~
      |           :
a.cc:456:11: error: expected ':' before 'bool'
  456 |     public bool IsSameSet(int x, int y) => Root(x) == Root(y);
      |           ^~~~~
      |           :
a.cc:456:44: error: invalid pure specifier (only '= 0' is allowed) before 'Root'
  456 |     public bool IsSameSet(int x, int y) => Root(x) == Root(y);
      |                                            ^~~~
a.cc:457:2: error: expected ';' after class definition
  457 | }
      |  ^
      |  ;
a.cc: In constructor 'UnionFind::UnionFind(int)':
a.cc:431:14: error: request for member 'data' in '(UnionFind*)this', which is of pointer type 'UnionFind*' (maybe you meant to use '->' ?)
  431 |         this.data = NewArray(size, -1);
      |              ^~~~
a.cc:431:21: error: 'NewArray' was not declared in this scope
  431 |         this.data = NewArray(size, -1);
      |                     ^~~~~~~~
a.cc: In member function 'int UnionFind::Root(int)':
a.cc:436:13: error: 'data' was not declared in this scope
  436 |         if (data[x] < 0) return x;
      |             ^~~~
a.cc:437:16: error: 'data' was not declared in this scope
  437 |         return data[x] = Root(data[x]);
      |                ^~~~
a.cc: In member function 'bool UnionFind::TryUnionSet(int, int)':
a.cc:443:9: error: 'var' was not declared in this scope
  443 |         var xRoot = Root(x);
      |         ^~~
a.cc:444:13: error: expected ';' before 'yRoot'
  444 |         var yRoot = Root(y);
      |             ^~~~~
a.cc:445:13: error: 'xRoot' was not declared in this scope; did you mean 'Root'?
  445 |         if (xRoot == yRoot) return false;
      |             ^~~~~
      |             Root
a.cc:445:22: error: 'yRoot' was not declared in this scope; did you mean 'Root'?
  445 |         if (xRoot == yRoot) return false;
      |                      ^~~~~
      |                      Root
a.cc:446:18: error: 'data' was not declared in this scope
  446 |         else if (data[yRoot] < data[xRoot])//y側の方が多い場合は逆にする
      |                  ^~~~
a.cc:448:17: error: expected ';' before 'tmp'
  448 |             var tmp = yRoot;
      |                 ^~~
a.cc:450:21: error: 'tmp' was not declared in this scope
  450 |             xRoot = tmp;
      |                     ^~~
a.cc:452:9: error: 'data' was not declared in this scope
  452 |         data[xRoot] += data[yRoot];
      |         ^~~~
a.cc:452:14: error: 'xRoot' was not declared in this scope; did you mean 'Root'?
  452 |         data[xRoot] += data[yRoot];
      |              ^~~~~
      |              Root
a.cc:452:29: error: 'yRoot' was not declared in this scope; did you mean 'Root'?
  452 |         data[xRoot] += data[yRoot];
      |                             ^~~~~
      |                             Root