Submission #914036

# Submission time Handle Problem Language Result Execution time Memory
914036 2024-01-20T20:38:31 Z CyberCow Cubeword (CEOI19_cubeword) C++17
100 / 100
469 ms 35420 KB
#include <random>
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <chrono>
#define fr first
#define sc second
#define ad push_back
using namespace std;
using ll = long long;
mt19937 rnd(348502);

const ll N = 150;
ll a[15][N][N];
vector<char> per;

ll chgl[N][N][N];

ll mod = 998244353;


void solve()
{
    int n, i, j, x, y;
    cin >> n;
    string s;
    set<string> sss;
    for (i = 0; i < n; i++)
    {
        cin >> s;
        int st = 1;
        for (j = 0; j < s.size(); j++)
        {
            if (s[j] != s[s.size() - j - 1])
                st = 0;
        }
        if (st)
        {
            if (sss.find(s) == sss.end())
                a[s.size()][s[0]][s.back()]++;
            sss.insert(s);
        }
        else
        {
            if (sss.find(s) == sss.end())
                a[s.size()][s[0]][s.back()]++;
            sss.insert(s);
            reverse(s.begin(), s.end());
            if (sss.find(s) == sss.end())
                a[s.size()][s[0]][s.back()]++;
            sss.insert(s);
        }
    }
    for (i = 'a'; i <= 'z'; i++)
    {
        per.push_back(char(i));
        per.push_back(char(i - 'a' + 'A'));
    } 
    for ( i = 0; i < 10; i++)
    {
        per.push_back(char('0' + i));
    }
    ll anss = 0;
    for (int ch = 3; ch <= 10; ch++)
    {
        for (j = 0; j < per.size(); j++)
        {
            for (int h = j; h < per.size(); h++)
            {
                for (int hh = h; hh < per.size(); hh++)
                {
                    ll obshi = 0;
                    for (i = 0; i < per.size(); i++)
                    {
                        ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
                        obshi += qan;
                        if (obshi >= mod)
                            obshi %= mod;
                    }
                    chgl[per[j]][per[h]][per[hh]] += obshi;
                    if (chgl[per[j]][per[h]][per[hh]] >= mod)
                        chgl[per[j]][per[h]][per[hh]] %= mod;
                }
            }
        }
        for (j = 0; j < per.size(); j++)
        {
            for (int h = j; h < per.size(); h++)
            {
                for (int hh = h; hh < per.size(); hh++)
                {
                    for (int glx = hh; glx < per.size(); glx++)
                    {
                        if (j == h)
                        {
                            if (h == hh)
                            {
                                if (hh == glx)
                                {
                                    anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
                                }
                                else
                                {
                                    anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
                                }
                            }
                            else
                            {
                                if (hh == glx)
                                {
                                    anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 6) % mod;
                                }
                                else
                                {
                                    anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 12) % mod;
                                }
                            }
                        }
                        else
                        {
                            if (h == hh)
                            {
                                if (hh == glx)
                                {
                                    anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
                                }
                                else
                                {
                                    anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 12) % mod;
                                }
                            }
                            else
                            {
                                if (hh == glx)
                                {
                                    anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 12) % mod;
                                }
                                else
                                {
                                    anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 24) % mod;
                                }
                            }
                        }
                        if (anss >= mod)
                            anss %= mod;
                    }
                }
            }
        }
        for (j = 0; j < per.size(); j++)
        {
            for (int h = j; h < per.size(); h++)
            {
                for (int hh = h; hh < per.size(); hh++)
                {
                    chgl[per[j]][per[h]][per[hh]] = 0;
                }
            }
        }
    }
    cout << anss;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    ll tt = 1;
    //cin >> tt;
    while (tt--) {
        solve();
    }
    return 0;
}

Compilation message

cubeword.cpp: In function 'void solve()':
cubeword.cpp:46:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   46 |         for (j = 0; j < s.size(); j++)
      |                     ~~^~~~~~~~~~
cubeword.cpp:54:33: warning: array subscript has type 'char' [-Wchar-subscripts]
   54 |                 a[s.size()][s[0]][s.back()]++;
      |                                 ^
cubeword.cpp:54:41: warning: array subscript has type 'char' [-Wchar-subscripts]
   54 |                 a[s.size()][s[0]][s.back()]++;
      |                                   ~~~~~~^~
cubeword.cpp:60:33: warning: array subscript has type 'char' [-Wchar-subscripts]
   60 |                 a[s.size()][s[0]][s.back()]++;
      |                                 ^
cubeword.cpp:60:41: warning: array subscript has type 'char' [-Wchar-subscripts]
   60 |                 a[s.size()][s[0]][s.back()]++;
      |                                   ~~~~~~^~
cubeword.cpp:64:33: warning: array subscript has type 'char' [-Wchar-subscripts]
   64 |                 a[s.size()][s[0]][s.back()]++;
      |                                 ^
cubeword.cpp:64:41: warning: array subscript has type 'char' [-Wchar-subscripts]
   64 |                 a[s.size()][s[0]][s.back()]++;
      |                                   ~~~~~~^~
cubeword.cpp:80:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   80 |         for (j = 0; j < per.size(); j++)
      |                     ~~^~~~~~~~~~~~
cubeword.cpp:82:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   82 |             for (int h = j; h < per.size(); h++)
      |                             ~~^~~~~~~~~~~~
cubeword.cpp:84:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   84 |                 for (int hh = h; hh < per.size(); hh++)
      |                                  ~~~^~~~~~~~~~~~
cubeword.cpp:87:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   87 |                     for (i = 0; i < per.size(); i++)
      |                                 ~~^~~~~~~~~~~~
cubeword.cpp:89:48: warning: array subscript has type 'char' [-Wchar-subscripts]
   89 |                         ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
      |                                                ^
cubeword.cpp:89:56: warning: array subscript has type 'char' [-Wchar-subscripts]
   89 |                         ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
      |                                                        ^
cubeword.cpp:89:72: warning: array subscript has type 'char' [-Wchar-subscripts]
   89 |                         ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
      |                                                                        ^
cubeword.cpp:89:80: warning: array subscript has type 'char' [-Wchar-subscripts]
   89 |                         ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
      |                                                                                ^
cubeword.cpp:89:103: warning: array subscript has type 'char' [-Wchar-subscripts]
   89 |                         ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
      |                                                                                                       ^
cubeword.cpp:89:112: warning: array subscript has type 'char' [-Wchar-subscripts]
   89 |                         ll qan = ((a[ch][per[i]][per[j]] * a[ch][per[i]][per[h]]) % mod * a[ch][per[i]][per[hh]]) % mod;
      |                                                                                                                ^
cubeword.cpp:94:32: warning: array subscript has type 'char' [-Wchar-subscripts]
   94 |                     chgl[per[j]][per[h]][per[hh]] += obshi;
      |                                ^
cubeword.cpp:94:40: warning: array subscript has type 'char' [-Wchar-subscripts]
   94 |                     chgl[per[j]][per[h]][per[hh]] += obshi;
      |                                        ^
cubeword.cpp:94:49: warning: array subscript has type 'char' [-Wchar-subscripts]
   94 |                     chgl[per[j]][per[h]][per[hh]] += obshi;
      |                                                 ^
cubeword.cpp:95:36: warning: array subscript has type 'char' [-Wchar-subscripts]
   95 |                     if (chgl[per[j]][per[h]][per[hh]] >= mod)
      |                                    ^
cubeword.cpp:95:44: warning: array subscript has type 'char' [-Wchar-subscripts]
   95 |                     if (chgl[per[j]][per[h]][per[hh]] >= mod)
      |                                            ^
cubeword.cpp:95:53: warning: array subscript has type 'char' [-Wchar-subscripts]
   95 |                     if (chgl[per[j]][per[h]][per[hh]] >= mod)
      |                                                     ^
cubeword.cpp:96:36: warning: array subscript has type 'char' [-Wchar-subscripts]
   96 |                         chgl[per[j]][per[h]][per[hh]] %= mod;
      |                                    ^
cubeword.cpp:96:44: warning: array subscript has type 'char' [-Wchar-subscripts]
   96 |                         chgl[per[j]][per[h]][per[hh]] %= mod;
      |                                            ^
cubeword.cpp:96:53: warning: array subscript has type 'char' [-Wchar-subscripts]
   96 |                         chgl[per[j]][per[h]][per[hh]] %= mod;
      |                                                     ^
cubeword.cpp:100:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  100 |         for (j = 0; j < per.size(); j++)
      |                     ~~^~~~~~~~~~~~
cubeword.cpp:102:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  102 |             for (int h = j; h < per.size(); h++)
      |                             ~~^~~~~~~~~~~~
cubeword.cpp:104:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  104 |                 for (int hh = h; hh < per.size(); hh++)
      |                                  ~~~^~~~~~~~~~~~
cubeword.cpp:106:44: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  106 |                     for (int glx = hh; glx < per.size(); glx++)
      |                                        ~~~~^~~~~~~~~~~~
cubeword.cpp:114:65: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                 ^
cubeword.cpp:114:73: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                         ^
cubeword.cpp:114:82: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                  ^
cubeword.cpp:114:97: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                                 ^
cubeword.cpp:114:105: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                                         ^
cubeword.cpp:114:115: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                                                   ^
cubeword.cpp:114:137: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                                                                         ^
cubeword.cpp:114:146: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                                                                                  ^
cubeword.cpp:114:156: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                                                                                            ^
cubeword.cpp:114:178: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                                                                                                                  ^
cubeword.cpp:114:187: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                                                                                                                           ^
cubeword.cpp:114:197: warning: array subscript has type 'char' [-Wchar-subscripts]
  114 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]]) % mod;//
      |                                                                                                                                                                                                     ^
cubeword.cpp:118:65: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                 ^
cubeword.cpp:118:73: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                         ^
cubeword.cpp:118:82: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                  ^
cubeword.cpp:118:97: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                                 ^
cubeword.cpp:118:105: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                                         ^
cubeword.cpp:118:115: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                                                   ^
cubeword.cpp:118:137: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                                                                         ^
cubeword.cpp:118:146: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                                                                                  ^
cubeword.cpp:118:156: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                                                                                            ^
cubeword.cpp:118:178: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                                                                                                                  ^
cubeword.cpp:118:187: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                                                                                                                           ^
cubeword.cpp:118:197: warning: array subscript has type 'char' [-Wchar-subscripts]
  118 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 4) % mod;
      |                                                                                                                                                                                                     ^
cubeword.cpp:125:65: warning: array subscript has type 'char' [-Wchar-subscripts]
  125 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] * chgl[per[j]][per[h]][per[glx]]) % mod * chgl[per[h]][per[hh]][per[glx]]) % mod * chgl[per[j]][per[hh]][per[glx]] % mod * 6) % mod;
      |                                                                 ^
cubeword.cpp:125:73: warning: array subscript has type 'char' [-Wchar-subscripts]
  125 |                                     anss = (anss + ((chgl[per[j]][per[h]][per[hh]] *
# Verdict Execution time Memory Grader output
1 Correct 415 ms 33308 KB Output is correct
2 Correct 421 ms 33616 KB Output is correct
3 Correct 410 ms 33408 KB Output is correct
4 Correct 426 ms 33360 KB Output is correct
5 Correct 408 ms 33328 KB Output is correct
6 Correct 408 ms 33396 KB Output is correct
7 Correct 435 ms 33272 KB Output is correct
8 Correct 444 ms 33404 KB Output is correct
9 Correct 423 ms 33600 KB Output is correct
10 Correct 408 ms 33364 KB Output is correct
11 Correct 417 ms 33620 KB Output is correct
12 Correct 469 ms 33364 KB Output is correct
13 Correct 421 ms 33600 KB Output is correct
14 Correct 409 ms 33320 KB Output is correct
15 Correct 422 ms 33400 KB Output is correct
16 Correct 411 ms 33640 KB Output is correct
17 Correct 410 ms 33284 KB Output is correct
18 Correct 428 ms 33620 KB Output is correct
19 Correct 411 ms 33384 KB Output is correct
20 Correct 415 ms 33400 KB Output is correct
21 Correct 411 ms 33364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 415 ms 33308 KB Output is correct
2 Correct 421 ms 33616 KB Output is correct
3 Correct 410 ms 33408 KB Output is correct
4 Correct 426 ms 33360 KB Output is correct
5 Correct 408 ms 33328 KB Output is correct
6 Correct 408 ms 33396 KB Output is correct
7 Correct 435 ms 33272 KB Output is correct
8 Correct 444 ms 33404 KB Output is correct
9 Correct 423 ms 33600 KB Output is correct
10 Correct 408 ms 33364 KB Output is correct
11 Correct 417 ms 33620 KB Output is correct
12 Correct 469 ms 33364 KB Output is correct
13 Correct 421 ms 33600 KB Output is correct
14 Correct 409 ms 33320 KB Output is correct
15 Correct 422 ms 33400 KB Output is correct
16 Correct 411 ms 33640 KB Output is correct
17 Correct 410 ms 33284 KB Output is correct
18 Correct 428 ms 33620 KB Output is correct
19 Correct 411 ms 33384 KB Output is correct
20 Correct 415 ms 33400 KB Output is correct
21 Correct 411 ms 33364 KB Output is correct
22 Correct 424 ms 33868 KB Output is correct
23 Correct 417 ms 34056 KB Output is correct
24 Correct 432 ms 34068 KB Output is correct
25 Correct 410 ms 34132 KB Output is correct
26 Correct 421 ms 34044 KB Output is correct
27 Correct 437 ms 34152 KB Output is correct
28 Correct 404 ms 34056 KB Output is correct
29 Correct 405 ms 33876 KB Output is correct
30 Correct 420 ms 34044 KB Output is correct
31 Correct 418 ms 34052 KB Output is correct
32 Correct 438 ms 34060 KB Output is correct
33 Correct 430 ms 34024 KB Output is correct
34 Correct 423 ms 33896 KB Output is correct
35 Correct 406 ms 33872 KB Output is correct
36 Correct 419 ms 33876 KB Output is correct
37 Correct 435 ms 34132 KB Output is correct
38 Correct 411 ms 33872 KB Output is correct
39 Correct 444 ms 34060 KB Output is correct
40 Correct 420 ms 33864 KB Output is correct
41 Correct 436 ms 34120 KB Output is correct
42 Correct 410 ms 33996 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 415 ms 33308 KB Output is correct
2 Correct 421 ms 33616 KB Output is correct
3 Correct 410 ms 33408 KB Output is correct
4 Correct 426 ms 33360 KB Output is correct
5 Correct 408 ms 33328 KB Output is correct
6 Correct 408 ms 33396 KB Output is correct
7 Correct 435 ms 33272 KB Output is correct
8 Correct 444 ms 33404 KB Output is correct
9 Correct 423 ms 33600 KB Output is correct
10 Correct 408 ms 33364 KB Output is correct
11 Correct 417 ms 33620 KB Output is correct
12 Correct 469 ms 33364 KB Output is correct
13 Correct 421 ms 33600 KB Output is correct
14 Correct 409 ms 33320 KB Output is correct
15 Correct 422 ms 33400 KB Output is correct
16 Correct 411 ms 33640 KB Output is correct
17 Correct 410 ms 33284 KB Output is correct
18 Correct 428 ms 33620 KB Output is correct
19 Correct 411 ms 33384 KB Output is correct
20 Correct 415 ms 33400 KB Output is correct
21 Correct 411 ms 33364 KB Output is correct
22 Correct 424 ms 33868 KB Output is correct
23 Correct 417 ms 34056 KB Output is correct
24 Correct 432 ms 34068 KB Output is correct
25 Correct 410 ms 34132 KB Output is correct
26 Correct 421 ms 34044 KB Output is correct
27 Correct 437 ms 34152 KB Output is correct
28 Correct 404 ms 34056 KB Output is correct
29 Correct 405 ms 33876 KB Output is correct
30 Correct 420 ms 34044 KB Output is correct
31 Correct 418 ms 34052 KB Output is correct
32 Correct 438 ms 34060 KB Output is correct
33 Correct 430 ms 34024 KB Output is correct
34 Correct 423 ms 33896 KB Output is correct
35 Correct 406 ms 33872 KB Output is correct
36 Correct 419 ms 33876 KB Output is correct
37 Correct 435 ms 34132 KB Output is correct
38 Correct 411 ms 33872 KB Output is correct
39 Correct 444 ms 34060 KB Output is correct
40 Correct 420 ms 33864 KB Output is correct
41 Correct 436 ms 34120 KB Output is correct
42 Correct 410 ms 33996 KB Output is correct
43 Correct 424 ms 34272 KB Output is correct
44 Correct 422 ms 34132 KB Output is correct
45 Correct 414 ms 34132 KB Output is correct
46 Correct 416 ms 34500 KB Output is correct
47 Correct 412 ms 34260 KB Output is correct
48 Correct 420 ms 34036 KB Output is correct
49 Correct 442 ms 34128 KB Output is correct
50 Correct 417 ms 34128 KB Output is correct
51 Correct 446 ms 34264 KB Output is correct
52 Correct 422 ms 34076 KB Output is correct
53 Correct 413 ms 34388 KB Output is correct
54 Correct 415 ms 34032 KB Output is correct
55 Correct 425 ms 34132 KB Output is correct
56 Correct 425 ms 34272 KB Output is correct
57 Correct 419 ms 34132 KB Output is correct
58 Correct 429 ms 34132 KB Output is correct
59 Correct 410 ms 34276 KB Output is correct
60 Correct 423 ms 34260 KB Output is correct
61 Correct 409 ms 34268 KB Output is correct
62 Correct 421 ms 34268 KB Output is correct
63 Correct 449 ms 34520 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 415 ms 33308 KB Output is correct
2 Correct 421 ms 33616 KB Output is correct
3 Correct 410 ms 33408 KB Output is correct
4 Correct 426 ms 33360 KB Output is correct
5 Correct 408 ms 33328 KB Output is correct
6 Correct 408 ms 33396 KB Output is correct
7 Correct 435 ms 33272 KB Output is correct
8 Correct 444 ms 33404 KB Output is correct
9 Correct 423 ms 33600 KB Output is correct
10 Correct 408 ms 33364 KB Output is correct
11 Correct 417 ms 33620 KB Output is correct
12 Correct 469 ms 33364 KB Output is correct
13 Correct 421 ms 33600 KB Output is correct
14 Correct 409 ms 33320 KB Output is correct
15 Correct 422 ms 33400 KB Output is correct
16 Correct 411 ms 33640 KB Output is correct
17 Correct 410 ms 33284 KB Output is correct
18 Correct 428 ms 33620 KB Output is correct
19 Correct 411 ms 33384 KB Output is correct
20 Correct 415 ms 33400 KB Output is correct
21 Correct 411 ms 33364 KB Output is correct
22 Correct 424 ms 33868 KB Output is correct
23 Correct 417 ms 34056 KB Output is correct
24 Correct 432 ms 34068 KB Output is correct
25 Correct 410 ms 34132 KB Output is correct
26 Correct 421 ms 34044 KB Output is correct
27 Correct 437 ms 34152 KB Output is correct
28 Correct 404 ms 34056 KB Output is correct
29 Correct 405 ms 33876 KB Output is correct
30 Correct 420 ms 34044 KB Output is correct
31 Correct 418 ms 34052 KB Output is correct
32 Correct 438 ms 34060 KB Output is correct
33 Correct 430 ms 34024 KB Output is correct
34 Correct 423 ms 33896 KB Output is correct
35 Correct 406 ms 33872 KB Output is correct
36 Correct 419 ms 33876 KB Output is correct
37 Correct 435 ms 34132 KB Output is correct
38 Correct 411 ms 33872 KB Output is correct
39 Correct 444 ms 34060 KB Output is correct
40 Correct 420 ms 33864 KB Output is correct
41 Correct 436 ms 34120 KB Output is correct
42 Correct 410 ms 33996 KB Output is correct
43 Correct 424 ms 34272 KB Output is correct
44 Correct 422 ms 34132 KB Output is correct
45 Correct 414 ms 34132 KB Output is correct
46 Correct 416 ms 34500 KB Output is correct
47 Correct 412 ms 34260 KB Output is correct
48 Correct 420 ms 34036 KB Output is correct
49 Correct 442 ms 34128 KB Output is correct
50 Correct 417 ms 34128 KB Output is correct
51 Correct 446 ms 34264 KB Output is correct
52 Correct 422 ms 34076 KB Output is correct
53 Correct 413 ms 34388 KB Output is correct
54 Correct 415 ms 34032 KB Output is correct
55 Correct 425 ms 34132 KB Output is correct
56 Correct 425 ms 34272 KB Output is correct
57 Correct 419 ms 34132 KB Output is correct
58 Correct 429 ms 34132 KB Output is correct
59 Correct 410 ms 34276 KB Output is correct
60 Correct 423 ms 34260 KB Output is correct
61 Correct 409 ms 34268 KB Output is correct
62 Correct 421 ms 34268 KB Output is correct
63 Correct 449 ms 34520 KB Output is correct
64 Correct 449 ms 34328 KB Output is correct
65 Correct 445 ms 35420 KB Output is correct
66 Correct 439 ms 35240 KB Output is correct
67 Correct 446 ms 35240 KB Output is correct
68 Correct 448 ms 35068 KB Output is correct
69 Correct 434 ms 35012 KB Output is correct
70 Correct 431 ms 35416 KB Output is correct
71 Correct 450 ms 35240 KB Output is correct
72 Correct 447 ms 35156 KB Output is correct
73 Correct 458 ms 35240 KB Output is correct
74 Correct 451 ms 35080 KB Output is correct
75 Correct 451 ms 35412 KB Output is correct
76 Correct 430 ms 35236 KB Output is correct
77 Correct 457 ms 35236 KB Output is correct
78 Correct 439 ms 35244 KB Output is correct
79 Correct 443 ms 35236 KB Output is correct
80 Correct 455 ms 35412 KB Output is correct
81 Correct 439 ms 35052 KB Output is correct
82 Correct 450 ms 35284 KB Output is correct
83 Correct 448 ms 35152 KB Output is correct
84 Correct 459 ms 35148 KB Output is correct