QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#307144#5051. Namomo SubsequenceThe_OwlsTL 1840ms217836kbC++2314.9kb2024-01-18 01:25:512024-01-18 01:25:52

Judging History

你现在查看的是最新测评结果

  • [2024-01-18 01:25:52]
  • 评测
  • 测评结果:TL
  • 用时:1840ms
  • 内存:217836kb
  • [2024-01-18 01:25:51]
  • 提交

answer

#include<bits/stdc++.h>
//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("avx2,popcnt,lzcnt,abm,bmi,bmi2,fma,tune=native")

#define FAST         ios_base::sync_with_stdio(false); \
                     cin.tie(0);                       \
                     cout.tie(0);
                     
#define ll long long

#define ull unsigned long long

#define el '\n'

#define sp ' '

#define fi first

#define se second

#define mp make_pair

#define pb push_back

#define ppb pop_back

using namespace std ;

typedef unsigned char Byte ;

const int mod = 998244353 ;

static const auto IOSetup = [] {
    std::cin.tie(nullptr)->sync_with_stdio(false);
    // std::cout << std::setprecision(6) << std::fixed;
    return nullptr;}();
struct IOPre {static constexpr int TEN = 10, SZ = TEN * TEN * TEN * TEN;std::array<char, 4 * SZ> num;constexpr IOPre() : num{} {for (int i = 0; i < SZ; i++) {int n = i;for (int j = 3; j >= 0; j--) {num[i * 4 + j] = static_cast<char>(n % TEN + '0');n /= TEN;}}}};
struct IO {
#if !HAVE_DECL_FREAD_UNLOCKED
#define fread_unlocked fread
#endif
#if !HAVE_DECL_FWRITE_UNLOCKED
#define fwrite_unlocked fwrite
#endif
    static constexpr int SZ = 1 << 17, LEN = 32, TEN = 10, HUNDRED = TEN * TEN,THOUSAND = HUNDRED * TEN, TENTHOUSAND = THOUSAND * TEN,MAGIC_MULTIPLY = 205, MAGIC_SHIFT = 11, MASK = 15,TWELVE = 12, SIXTEEN = 16;static constexpr IOPre io_pre = {};std::array<char, SZ> input_buffer, output_buffer;int input_ptr_left, input_ptr_right, output_ptr_right;
    IO(): input_buffer{},output_buffer{},input_ptr_left{},input_ptr_right{},output_ptr_right{} {}
    IO(const IO&) = delete;IO(IO&&) = delete;IO& operator=(const IO&) = delete;IO& operator=(IO&&) = delete;
    ~IO() { flush(); }
    template <class T>struct is_char {static constexpr bool value = std::is_same_v<T, char>;};
    template <class T>struct is_bool {static constexpr bool value = std::is_same_v<T, bool>;};
    template <class T>struct is_string {static constexpr bool value =std::is_same_v<T, std::string> || std::is_same_v<T, const char*> ||std::is_same_v<T, char*> || std::is_same_v<std::decay_t<T>, char*>;;};
    template <class T, class D = void>struct is_custom {static constexpr bool value = false;};
    template <class T>struct is_custom<T, std::void_t<typename T::internal_value_type>> {static constexpr bool value = true;};
    template <class T>struct is_default {static constexpr bool value = is_char<T>::value || is_bool<T>::value ||is_string<T>::value ||std::is_integral_v<T>;};
    template <class T, class D = void>struct is_iterable {static constexpr bool value = false;};
    template <class T>struct is_iterable <T, typename std::void_t<decltype(std::begin(std::declval<T>())) >> {static constexpr bool value = true;};
    template <class T, class D = void, class E = void>struct is_applyable {static constexpr bool value = false;};
    template <class T>struct is_applyable<T, std::void_t<typename std::tuple_size<T>::type>,std::void_t<decltype(std::get<0>(std::declval<T>()))>> {static constexpr bool value = true;};
    template <class T>static constexpr bool needs_newline = (is_iterable<T>::value || is_applyable<T>::value) && (!is_default<T>::value);
    template <typename T, typename U> struct any_needs_newline {static constexpr bool value = false;}; template <typename T>
    struct any_needs_newline<T, std::index_sequence<>> {static constexpr bool value = false;};
    template <typename T, std::size_t I, std::size_t... Is>struct any_needs_newline<T, std::index_sequence<I, Is...>> {static constexpr bool value = needs_newline<decltype(std::get<I>(std::declval<T>()))> || any_needs_newline<T, std::index_sequence<Is...>>::value;};
    inline void load() {memmove(std::begin(input_buffer), std::begin(input_buffer) + input_ptr_left, input_ptr_right - input_ptr_left); input_ptr_right = input_ptr_right - input_ptr_left + static_cast<int>(fread_unlocked(std::begin(input_buffer) + input_ptr_right - input_ptr_left, 1, SZ - input_ptr_right + input_ptr_left, stdin)); input_ptr_left = 0;}
    inline void read_char(char& c) {if (input_ptr_left + LEN > input_ptr_right) load(); c = input_buffer[input_ptr_left++];}
    inline void read_string(std::string& x) {char c; while (read_char(c), c < '!') continue; x = c; while (read_char(c), c >= '!') x += c;}
    template <class T> inline std::enable_if_t<std::is_integral_v<T>, void> read_int(T& x) {if (input_ptr_left + LEN > input_ptr_right) load(); char c = 0; do c = input_buffer[input_ptr_left++]; while (c < '-'); [[maybe_unused]] bool minus = false; if constexpr (std::is_signed<T>::value == true)if (c == '-') minus = true, c = input_buffer[input_ptr_left++]; x = 0; while (c >= '0')x = x * TEN + (c & MASK), c = input_buffer[input_ptr_left++]; if constexpr (std::is_signed<T>::value == true)if (minus) x = -x;}
    inline void skip_space() {if (input_ptr_left + LEN > input_ptr_right) load(); while (input_buffer[input_ptr_left] <= ' ') input_ptr_left++;}
    inline void flush() {fwrite_unlocked(std::begin(output_buffer), 1, output_ptr_right, stdout); output_ptr_right = 0;}
    inline void write_char(char c) {if (output_ptr_right > SZ - LEN) flush(); output_buffer[output_ptr_right++] = c;}
    inline void write_bool(bool b) {if (output_ptr_right > SZ - LEN) flush(); output_buffer[output_ptr_right++] = b ? '1' : '0';}
    inline void write_string(const std::string& s) {for (auto x : s) write_char(x);}
    inline void write_string(const char* s) {while (*s) write_char(*s++);}
    inline void write_string(char* s) {while (*s) write_char(*s++);}
    template <typename T>inline std::enable_if_t<std::is_integral_v<T>, void> write_int(T x) {if (output_ptr_right > SZ - LEN) flush(); if (!x) {output_buffer[output_ptr_right++] = '0'; return;} if constexpr (std::is_signed<T>::value == true)if (x < 0) output_buffer[output_ptr_right++] = '-', x = -x; int i = TWELVE; std::array<char, SIXTEEN> buf{}; while (x >= TENTHOUSAND) {memcpy(std::begin(buf) + i, std::begin(io_pre.num) + (x % TENTHOUSAND) * 4, 4); x /= TENTHOUSAND; i -= 4;} if (x < HUNDRED) {if (x < TEN) {output_buffer[output_ptr_right++] = static_cast<char>('0' + x);} else {std::uint32_t q = (static_cast<std::uint32_t>(x) * MAGIC_MULTIPLY) >> MAGIC_SHIFT; std::uint32_t r = static_cast<std::uint32_t>(x) - q * TEN; output_buffer[output_ptr_right] = static_cast<char>('0' + q); output_buffer[output_ptr_right + 1] = static_cast<char>('0' + r); output_ptr_right += 2;}} else {if (x < THOUSAND) {memcpy(std::begin(output_buffer) + output_ptr_right, std::begin(io_pre.num) + (x << 2) + 1, 3), output_ptr_right += 3;} else {memcpy(std::begin(output_buffer) + output_ptr_right, std::begin(io_pre.num) + (x << 2), 4), output_ptr_right += 4;}} memcpy(std::begin(output_buffer) + output_ptr_right, std::begin(buf) + i + 4, TWELVE - i); output_ptr_right += TWELVE - i;}
    template <typename T_>IO& operator<<(T_&& x) {using T = typename std::remove_cv < typename std::remove_reference<T_>::type >::type; static_assert(is_custom<T>::value or is_default<T>::value or is_iterable<T>::value or is_applyable<T>::value); if constexpr (is_custom<T>::value) {write_int(x.get());} else if constexpr (is_default<T>::value) {if constexpr (is_bool<T>::value) {write_bool(x);} else if constexpr (is_string<T>::value) {write_string(x);} else if constexpr (is_char<T>::value) {write_char(x);} else if constexpr (std::is_integral_v<T>) {write_int(x);}} else if constexpr (is_iterable<T>::value) {using E = decltype(*std::begin(x)); constexpr char sep = needs_newline<E> ? '\n' : ' '; int i = 0; for (const auto& y : x) {if (i++) write_char(sep); operator<<(y);}} else if constexpr (is_applyable<T>::value) {constexpr char sep = (any_needs_newline < T, std::make_index_sequence<std::tuple_size_v<T> >>::value) ? '\n' : ' '; int i = 0; std::apply([this, &sep, &i](auto const & ... y) {(((i++ ? write_char(sep) : void()), this->operator<<(y)), ...);}, x);} return *this;}
    template <typename T>IO& operator>>(T& x) {static_assert(is_custom<T>::value or is_default<T>::value or is_iterable<T>::value or is_applyable<T>::value); static_assert(!is_bool<T>::value); if constexpr (is_custom<T>::value) {typename T::internal_value_type y; read_int(y); x = y;} else if constexpr (is_default<T>::value) {if constexpr (is_string<T>::value) {read_string(x);} else if constexpr (is_char<T>::value) {read_char(x);} else if constexpr (std::is_integral_v<T>) {read_int(x);}} else if constexpr (is_iterable<T>::value) {for (auto& y : x) operator>>(y);} else if constexpr (is_applyable<T>::value) {std::apply([this](auto & ... y) { ((this->operator>>(y)), ...); }, x);} return *this;}
    IO* tie(std::nullptr_t) { return this; }
    void sync_with_stdio(bool) {}
} io;
#define cin io
#define cout io


void solve_this_testcase ()
{
 
    string s ; cin >> s ;
    int n = s.size();
    
    unordered_map < char, int > M ;
    for ( int i = 0 ; i < 10 ; ++ i ) M[char(i+48)] = i ;
    for ( int i = 0 ; i < 26 ; ++ i ) M[char(i+65)] = i + 10 ;
    for ( int i = 0 ; i < 26 ; ++ i ) M[char(i+97)] = i + 10 + 26 ;
    
    int L [n] ;
    for ( int i = 0 ; i < n ; ++ i ) L[i] = M[s[i]] ;
    
    array < vector < int > , 62 > O ;
    for ( int i = 0 ; i < n ; ++ i ) O[L[i]].pb(i) ;
    
    
    
    array < array < vector < pair < int , int > > , 62 > , 62 > D ;
    
    for ( int i = 0 ; i < 62 ; ++ i )
    {
        for ( int j = 0 ; j < 62 ; ++ j )
        {
            if ( O[i].size() == 0 or O[j].size() == 0 or i == j ) continue ;
            int a = 0;
            int b = 0;
            int szj = O[j].size() ; 
            while ( a < O[i].size() and b < O[j].size() )
            {
                while ( b < O[j].size() and O[j][b] < O[i][a] ) b += 1;
                D[i][j].pb(mp(O[i][a],szj-b));
                a += 1;
            }
            for ( int k = D[i][j].size() - 2 ; k >= 0 ; --k )
            {
                D[i][j][k].se += D[i][j][k+1].se ; 
                if ( D[i][j][k].se >= mod ) D[i][j][k].se -= mod ;
            }
        }
    }
    
    for ( int i = 0 ; i < 62 ; ++ i )
    {
        for ( int j = 0 ; j < 62 ; ++ j )
        {
            if ( O[i].size() == 0 or D[j][i].size() == 0 or i == j )
            {
                D[j][i].clear(); 
                continue ;
            }
            vector < pair < int , int > > V ;
            int a = 0;
            int b = 0;
            while ( a < O[i].size() and b < D[j][i].size() )
            {
                while ( b < D[j][i].size() and D[j][i][b].fi < O[i][a] ) b += 1;
                if ( b != D[j][i].size() ) V.pb(mp(O[i][a],D[j][i][b].se));
                a += 1;
            }
            for ( int k = V.size() - 2 ; k >= 0 ; --k )
            {
                V[k].se += V[k+1].se ; 
                if ( V[k].se > mod ) V[k].se -= mod ;
            }
            D[j][i] = V ;
        }
    }
    
    for ( int i = 0 ; i < 62 ; ++ i )
    {
        for ( int j = 0 ; j < 62 ; ++ j )
        {
            if ( O[i].size() == 0 or D[i][j].size() == 0 or i == j )
            {
                D[i][j].clear(); 
                continue ;
            }
            vector < pair < int , int > > V ;
            int a = 0;
            int b = 0;
            while ( a < O[i].size() and b < D[i][j].size() )
            {
                while ( b < D[i][j].size() and D[i][j][b].fi < O[i][a] ) b += 1;
                if ( b != D[i][j].size() ) V.pb(mp(O[i][a],D[i][j][b].se));
                a += 1;
            }
            for ( int k = V.size() - 2 ; k >= 0 ; --k )
            {
                V[k].se += V[k+1].se ; 
                if ( V[k].se > mod ) V[k].se -= mod ;
            }
            D[i][j] = V ;
        }
    }
    
    
    
    int V [n];
    for ( int i = 0 ; i < n ; ++i ) V[i] = 0;
    
    for ( int i = 0 ; i < 62 ; ++ i )
    {
        for ( int j = 0 ; j < 62 ; ++ j )
        {
            if ( D[i][j].size() == 0 or i == j )
            {
                continue ;
            }
            
            V[0] += D[i][j][0].se ;
            V[0] %= mod;
            
            for ( int k = 0 ; k < D[i][j].size() - 1 ; ++k )
            {
                V[D[i][j][k].fi+1] += D[i][j][k+1].se - D[i][j][k].se ;
                if ( V[D[i][j][k].fi+1] < 0 ) V[D[i][j][k].fi+1] += mod ;
                else if ( V[D[i][j][k].fi+1] >= mod ) V[D[i][j][k].fi+1] -= mod ;
            }
            
            V[D[i][j][D[i][j].size()-1].fi+1] = V[D[i][j][D[i][j].size()-1].fi+1] - D[i][j][D[i][j].size()-1].se + mod ;
            if (  V[D[i][j][D[i][j].size()-1].fi+1] < 0 )  V[D[i][j][D[i][j].size()-1].fi+1] += mod ;
            else if (  V[D[i][j][D[i][j].size()-1].fi+1] >= mod )  V[D[i][j][D[i][j].size()-1].fi+1] -= mod ;
            
        }
    }
    
    for ( int i = 1 ; i < n ;  ++i )
    {
        V[i] += V[i-1] ;
        if ( V[i] >= mod ) V[i] -= mod ;
    }
    
    
    
    int C [62][62]  ;
    for ( int i = 0 ; i < 62 ; ++ i )
    {
        for ( int j = 0 ; j < 62 ; ++ j )
        {
            C[i][j] = 0 ;
        }
    }
    
    int CC[62] ;
    for ( int i = 0 ; i < 62 ; ++ i )
    {
        CC[i] = 0 ;
    }
    
    int ans = 0 ;
    
    int S[62] ;
    for ( int i = 0 ; i < 62 ; ++ i ) S[i] = O[i].size() ;
    
    
    
    for ( int h = n -1  ; h > -1 ; -- h )
    {
        int i = L[h] ;
        
        for ( int j = 0 ; j < 62 ; ++ j )
        {
            if ( i == j ) continue ;
            if ( D[i][j].size() != 0 and D[i][j][D[i][j].size()-1].fi >= h  )
            {
                CC[i]  += D[i][j][D[i][j].size()-1].se - C[i][j] ;
                if ( CC[i] < 0 ) CC[i] += mod ;
                else if ( CC[i] >= mod ) CC[i] -= mod ;
                CC[j]  += D[i][j][D[i][j].size()-1].se - C[i][j] ;
                if ( CC[j] < 0 ) CC[j] += mod ;
                else if ( CC[j] >= mod ) CC[j] -= mod ;
                C[i][j] = D[i][j][D[i][j].size()-1].se ;
                D[i][j].ppb() ;
            } 
        }
        
        for ( int j = 0 ; j < 62 ; ++ j )
        {
            if ( i == j ) continue ;
            
            ll v = V[h] ;
            v = v - CC[i] + mod ;
            if ( v > mod ) v -= mod ;
            v = v - CC[j] + mod ;
            if ( v > mod ) v -= mod ;
            v += C[i][j] ;
            if ( v > mod ) v -= mod ;
            v += C[j][i] ;
            if ( v > mod ) v -= mod ;
            v *= S[j] ;
            v %= mod ;
            ans += v;
            //ans += ( S[j] * ( ( ( V[h] - CC[i] - CC[j] + C[i][j] + C[j][i] ) + mod ) % mod ) ) % mod ;
            
            if ( ans > mod ) ans -= mod ;
        }
        
        S[i] -= 1;
        
    }
    
    cout << ans%mod << el ;
    
}
int main()
{
    
    FAST
    
    ll test = 1 ;
    
    //cin >> test ;
    
    for ( ll testtest = 0 ; testtest < test ; testtest ++ ) 
    
    {
    
        solve_this_testcase ( ) ;
    
    }
 
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3972kb

input:

wohaha

output:

1

result:

ok 1 number(s): "1"

Test #2:

score: 0
Accepted
time: 1ms
memory: 3976kb

input:

momomo

output:

0

result:

ok 1 number(s): "0"

Test #3:

score: 0
Accepted
time: 0ms
memory: 4048kb

input:

gshfd1jkhaRaadfglkjerVcvuy0gf

output:

73

result:

ok 1 number(s): "73"

Test #4:

score: 0
Accepted
time: 1ms
memory: 3940kb

input:

retiredMiFaFa0v0

output:

33

result:

ok 1 number(s): "33"

Test #5:

score: 0
Accepted
time: 433ms
memory: 43940kb

input:

bcdccccacccabdbdaddcabddbaccaaaaaabaccbbbcbbddabcbccabacdacbcbabccbcbddcdcbcaaadddddccdbabaabcbbcaaadadacdaadbdccbddddabcbaaddbcadadcbcbaaccacabdababaabdccadaddacdcacdaabbadadaddbbcccbcddaccaadbbcaaccccdcacbdbdddbaccaacbcaccaaabccdadddbaabdbcaaccacdcdcbcdddacbcacdbbbdccdddccccabdbacddacbaacbbcaccdcd...

output:

587599316

result:

ok 1 number(s): "587599316"

Test #6:

score: 0
Accepted
time: 499ms
memory: 51672kb

input:

cedcedaecbbcaceddaacaebeecdaceecdeeedaeebddbcabddeeeeaeeebcbcbabdaeeabddbcebecebaddadacedbacdabcedcecbecedacaedbdaaeaeedcbbcddbbbbdecbeedeadcbdacbeadcadaeeccbdeabedbabbbecbabaaeacdbcbbdedbaebaeadcdcacceeeccedcdcecdbcadcdecbdccadbdbdabbeacbaaacecbabdcecebecaebedcebcccacbcbcdcccdaaaaeacaabeedcbbbaeeea...

output:

604741630

result:

ok 1 number(s): "604741630"

Test #7:

score: 0
Accepted
time: 556ms
memory: 59460kb

input:

dcbbbdcafbfbcdbddfdebcebbfbedfafeadcceeafbdabbbfcefadaedbecbcfaeccdfddbfbeebceadcdeaaefcbecbaececdeddaeefdeaaeaecbdbececdadcacbbefdbbffddeefcecabbecafbbeaaeebedbeabbbaeabedaecffebfcbcfabedebcbadbbfbbebdfdaefcedbdeaacbebcdcbfbfdcabbcadddbdaeabbcdcdfbdfdbcaaaafbfdfabdcdeebcfebecdeacaddeebfecfccadcfdea...

output:

137937394

result:

ok 1 number(s): "137937394"

Test #8:

score: 0
Accepted
time: 618ms
memory: 68284kb

input:

bdfcdcegecbacccddgfdaddgaggefagabgggafgbaeaecgeacacgccadbfdebbdgbaffffgaegabeebacedabecgdfcbbfceeaecaaceebabddbfgefdabgbdbgggdgfegaadccdafgggeafdeecccaafgedfcbefdccafaaaafdcfaeagfeddggcfeeaacgaabadeegebfageeaaceaggddddfcggggdbeefeacdbafggffcdbcaacbaagbcceageaacedceeebacfebgceggffefgabgeaebacdbadcaeg...

output:

830637896

result:

ok 1 number(s): "830637896"

Test #9:

score: 0
Accepted
time: 641ms
memory: 73636kb

input:

bdceebdaahbcgefdbahfcaaaffhfcffgfbaefgehbefdgcgfcafbfdehdeccdbaacdffbhdhdfhdaeehfebgccghchdggcccdbafheaaadhefcbbdeddbfhaehddegcefebghgdahegfefeecbdacffaadbaehahcdbhcdfbacdgfefgeccfgbcbhdfggeecbggbhffceegaahfbahgdebfchhhddfhfcfcdfeddbcabggdfgacaeghechabbdaafbeehgaebfadfchahgdhgggfhehhcehedafhcfcgeegg...

output:

165134706

result:

ok 1 number(s): "165134706"

Test #10:

score: 0
Accepted
time: 745ms
memory: 81572kb

input:

gfgdeabdacecfgadbgbadgbhgafhfhdiageeefghgbhbfhhfaaideehaieaddhcabgdhidbdefeagdfchhccdabchhahgfddchdiegbhfdddefddbcaabhhhgghaafacbbbbaeagacbbdabdidibhgbihdahdeghaheedfechbhfbcabidafeccbcbfdcechdfddffbeagcegagfegdafeaabcafgbcfechhiaiechdhhfdcbceefbccdcadeachcffhaebhbiadgeeggfaeefiaecahdgfgaehcagaaffbc...

output:

729999334

result:

ok 1 number(s): "729999334"

Test #11:

score: 0
Accepted
time: 794ms
memory: 89780kb

input:

hcajfffideibggdfbdjjfbifgdcjibhdedgdibdgfjabaeijabebibcjfaddbiehadgggeadcaedieccdcgigccajjeicgbeijbahjjjghicaigiejgihiabeeggbfjdididdbggfcbhjajbjjgdabihijjddfhdhchggeegiecidjibdcccghfhcffcfehihdedgecbdfjjjiecedfhfjiefhjefbgbieeahcccfggcihbdbgjbdfhhbfghjeaijfagcgchaabijcdedjadfhgbgeefiijhhhcgfjeaadbe...

output:

342396794

result:

ok 1 number(s): "342396794"

Test #12:

score: 0
Accepted
time: 1816ms
memory: 217836kb

input:

qsjdnlenipkknuvegwcozcrunnssjmuhdzvzocimsoqzdxsodpsfxhphbwgimyfzzuxowavmsncjjvxdksrambjzbuzkyqdbplbjxrdsacpgbiuzsalkytskdgsxcsblvzyvcgnieysbmeoyfaroxmuetwcvdkhyvlkwqdewldziradjmnkusdsrnybvhylzqroiblkloioqrtybukgmwwxqyjevkijesdddyjagspqqfdmkrhcnjaxcksolmetbutvcigrfhaghmjlzloqkxjooqutmejzhvpmmxzoupjoy...

output:

905453170

result:

ok 1 number(s): "905453170"

Test #13:

score: 0
Accepted
time: 1840ms
memory: 217824kb

input:

antlkibnsqqmzaclyvinisylidtvoabqcndzhltrbohfqdfmdzzlyphhqhdbgdgcciyofikhxrqddkcenwhedsjbdwfqcdtrlmdpgpsbxebtwlucklnjqcbjeponmmxfbiuqwhtddfzfephrayohdqfkmzjtjqcywfkcvbtueapgzrlxoecguifcryoygybkkzjkpbmyscnfblbkcolqqeoffahxhbaupbzeazkjjwekeithdymqflpddwpwmpfsvlxwrwkpoetxuborumpzciuytnhgqqzfxbgrqjycqhkd...

output:

82912821

result:

ok 1 number(s): "82912821"

Test #14:

score: 0
Accepted
time: 1824ms
memory: 217112kb

input:

khpwaiqnxudrpjjonholcibhhtuokklklxqlxtjzgtqekubgzwhznxzlbowxrseobjzswqvtcvlttnvyxaueqyferdhfbumuzobnmnmoxkkgnxhmykxezptnczshsotuqyqqfmwyuusowieyvskaagzcschzxasckzfezkznakkaeekgyumiabsjhkefbhyrrurqzjalbbecpiiyheqcxifnuwplabncdkweyuqbxhkecujztklbuegdseqzmevordemwmhysmtngpvfdsgskghujbnhkflycnwhbdiorbcw...

output:

659276694

result:

ok 1 number(s): "659276694"

Test #15:

score: -100
Time Limit Exceeded

input:

yBsLfzzQCCwjLbfElpCOuMIyMwgSzrQLBnGYJWXFtobNLEGEYDOZUYKyviwbLelicegOrmebrrJkDDsyBDQiFxfHRecxeBUXZikRUctjMLaduPhhbMbgiQjRSrPkZuPoCTcmIrOwxhHTApmNTOwbSrSIKtxlSsVLOuLsfMDqpUHmVTyKzBdUVcJNJdLSDfTLFqVLCJEhkEOadDRRSRRNHefbsKopXMjAgTvXAAnByekMBgzgkbIwMKMeikEKfZzyqVoJVQevMNqXkfROFGjNBqZeDPDTVcTWnxckFdcOsMnj...

output:


result: