Submission #914031

# Submission time Handle Problem Language Result Execution time Memory
914031 2024-01-20T19:58:17 Z CyberCow Cubeword (CEOI19_cubeword) C++17
84 / 100
410 ms 29072 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 <= 'p'; 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 = 0; h < per.size(); h++)
            {
                for (int hh = 0; 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 = 0; h < per.size(); h++)
            {
                for (int hh = 0; hh < per.size(); hh++)
                {
                    for (int glx = 0; glx < per.size(); 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[glx]][per[hh]][per[j]]) % mod;
                        if (anss >= mod)
                            anss %= mod;
                    }
                }
            }
        }
        for (j = 0; j < per.size(); j++)
        {
            for (int h = 0; h < per.size(); h++)
            {
                for (int hh = 0; 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 = 0; 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 = 0; 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 = 0; 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 = 0; hh < per.size(); hh++)
      |                                  ~~~^~~~~~~~~~~~
cubeword.cpp:106:43: 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 = 0; glx < per.size(); glx++)
      |                                       ~~~~^~~~~~~~~~~~
cubeword.cpp:108:53: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                     ^
cubeword.cpp:108:61: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                             ^
cubeword.cpp:108:70: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                      ^
cubeword.cpp:108:85: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                                     ^
cubeword.cpp:108:93: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                                             ^
cubeword.cpp:108:103: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                                                       ^
cubeword.cpp:108:125: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                                                                             ^
cubeword.cpp:108:134: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                                                                                      ^
cubeword.cpp:108:144: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                                                                                                ^
cubeword.cpp:108:168: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                                                                                                                        ^
cubeword.cpp:108:177: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                                                                                                                                 ^
cubeword.cpp:108:185: warning: array subscript has type 'char' [-Wchar-subscripts]
  108 |                         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[glx]][per[hh]][per[j]]) % mod;
      |                                                                                                                                                                                         ^
cubeword.cpp:115:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  115 |         for (j = 0; j < per.size(); j++)
      |                     ~~^~~~~~~~~~~~
cubeword.cpp:117:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  117 |             for (int h = 0; h < per.size(); h++)
      |                             ~~^~~~~~~~~~~~
cubeword.cpp:119:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  119 |                 for (int hh = 0; hh < per.size(); hh++)
      |                                  ~~~^~~~~~~~~~~~
cubeword.cpp:121:32: warning: array subscript has type 'char' [-Wchar-subscripts]
  121 |                     chgl[per[j]][per[h]][per[hh]] = 0;
      |                                ^
cubeword.cpp:121:40: warning: array subscript has type 'char' [-Wchar-subscripts]
  121 |                     chgl[per[j]][per[h]][per[hh]] = 0;
      |                                        ^
cubeword.cpp:121:49: warning: array subscript has type 'char' [-Wchar-subscripts]
  121 |                     chgl[per[j]][per[h]][per[hh]] = 0;
      |                                                 ^
cubeword.cpp:38:18: warning: unused variable 'x' [-Wunused-variable]
   38 |     int n, i, j, x, y;
      |                  ^
cubeword.cpp:38:21: warning: unused variable 'y' [-Wunused-variable]
   38 |     int n, i, j, x, y;
      |                     ^
# Verdict Execution time Memory Grader output
1 Correct 311 ms 27248 KB Output is correct
2 Correct 308 ms 27992 KB Output is correct
3 Correct 304 ms 28100 KB Output is correct
4 Correct 308 ms 27984 KB Output is correct
5 Correct 306 ms 28104 KB Output is correct
6 Correct 327 ms 28064 KB Output is correct
7 Correct 308 ms 28116 KB Output is correct
8 Correct 325 ms 28272 KB Output is correct
9 Correct 320 ms 28068 KB Output is correct
10 Correct 317 ms 28116 KB Output is correct
11 Correct 311 ms 27964 KB Output is correct
12 Correct 313 ms 28092 KB Output is correct
13 Correct 325 ms 27948 KB Output is correct
14 Correct 318 ms 27984 KB Output is correct
15 Correct 315 ms 28048 KB Output is correct
16 Correct 310 ms 27940 KB Output is correct
17 Correct 316 ms 28108 KB Output is correct
18 Correct 311 ms 28288 KB Output is correct
19 Correct 326 ms 28376 KB Output is correct
20 Correct 313 ms 27984 KB Output is correct
21 Correct 342 ms 28240 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 311 ms 27248 KB Output is correct
2 Correct 308 ms 27992 KB Output is correct
3 Correct 304 ms 28100 KB Output is correct
4 Correct 308 ms 27984 KB Output is correct
5 Correct 306 ms 28104 KB Output is correct
6 Correct 327 ms 28064 KB Output is correct
7 Correct 308 ms 28116 KB Output is correct
8 Correct 325 ms 28272 KB Output is correct
9 Correct 320 ms 28068 KB Output is correct
10 Correct 317 ms 28116 KB Output is correct
11 Correct 311 ms 27964 KB Output is correct
12 Correct 313 ms 28092 KB Output is correct
13 Correct 325 ms 27948 KB Output is correct
14 Correct 318 ms 27984 KB Output is correct
15 Correct 315 ms 28048 KB Output is correct
16 Correct 310 ms 27940 KB Output is correct
17 Correct 316 ms 28108 KB Output is correct
18 Correct 311 ms 28288 KB Output is correct
19 Correct 326 ms 28376 KB Output is correct
20 Correct 313 ms 27984 KB Output is correct
21 Correct 342 ms 28240 KB Output is correct
22 Correct 325 ms 28656 KB Output is correct
23 Correct 323 ms 28756 KB Output is correct
24 Correct 325 ms 28780 KB Output is correct
25 Correct 313 ms 28668 KB Output is correct
26 Correct 326 ms 28496 KB Output is correct
27 Correct 341 ms 28432 KB Output is correct
28 Correct 327 ms 28496 KB Output is correct
29 Correct 330 ms 28752 KB Output is correct
30 Correct 334 ms 28640 KB Output is correct
31 Correct 321 ms 28756 KB Output is correct
32 Correct 324 ms 28496 KB Output is correct
33 Correct 345 ms 28500 KB Output is correct
34 Correct 360 ms 28676 KB Output is correct
35 Correct 325 ms 28680 KB Output is correct
36 Correct 313 ms 28500 KB Output is correct
37 Correct 326 ms 28668 KB Output is correct
38 Correct 329 ms 28496 KB Output is correct
39 Correct 320 ms 28496 KB Output is correct
40 Correct 324 ms 28556 KB Output is correct
41 Correct 325 ms 28500 KB Output is correct
42 Correct 315 ms 28720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 311 ms 27248 KB Output is correct
2 Correct 308 ms 27992 KB Output is correct
3 Correct 304 ms 28100 KB Output is correct
4 Correct 308 ms 27984 KB Output is correct
5 Correct 306 ms 28104 KB Output is correct
6 Correct 327 ms 28064 KB Output is correct
7 Correct 308 ms 28116 KB Output is correct
8 Correct 325 ms 28272 KB Output is correct
9 Correct 320 ms 28068 KB Output is correct
10 Correct 317 ms 28116 KB Output is correct
11 Correct 311 ms 27964 KB Output is correct
12 Correct 313 ms 28092 KB Output is correct
13 Correct 325 ms 27948 KB Output is correct
14 Correct 318 ms 27984 KB Output is correct
15 Correct 315 ms 28048 KB Output is correct
16 Correct 310 ms 27940 KB Output is correct
17 Correct 316 ms 28108 KB Output is correct
18 Correct 311 ms 28288 KB Output is correct
19 Correct 326 ms 28376 KB Output is correct
20 Correct 313 ms 27984 KB Output is correct
21 Correct 342 ms 28240 KB Output is correct
22 Correct 325 ms 28656 KB Output is correct
23 Correct 323 ms 28756 KB Output is correct
24 Correct 325 ms 28780 KB Output is correct
25 Correct 313 ms 28668 KB Output is correct
26 Correct 326 ms 28496 KB Output is correct
27 Correct 341 ms 28432 KB Output is correct
28 Correct 327 ms 28496 KB Output is correct
29 Correct 330 ms 28752 KB Output is correct
30 Correct 334 ms 28640 KB Output is correct
31 Correct 321 ms 28756 KB Output is correct
32 Correct 324 ms 28496 KB Output is correct
33 Correct 345 ms 28500 KB Output is correct
34 Correct 360 ms 28676 KB Output is correct
35 Correct 325 ms 28680 KB Output is correct
36 Correct 313 ms 28500 KB Output is correct
37 Correct 326 ms 28668 KB Output is correct
38 Correct 329 ms 28496 KB Output is correct
39 Correct 320 ms 28496 KB Output is correct
40 Correct 324 ms 28556 KB Output is correct
41 Correct 325 ms 28500 KB Output is correct
42 Correct 315 ms 28720 KB Output is correct
43 Correct 391 ms 28860 KB Output is correct
44 Correct 394 ms 28880 KB Output is correct
45 Correct 368 ms 28664 KB Output is correct
46 Correct 377 ms 28752 KB Output is correct
47 Correct 381 ms 28848 KB Output is correct
48 Correct 375 ms 28756 KB Output is correct
49 Correct 410 ms 29072 KB Output is correct
50 Correct 396 ms 28864 KB Output is correct
51 Correct 386 ms 28852 KB Output is correct
52 Correct 391 ms 28848 KB Output is correct
53 Correct 378 ms 28752 KB Output is correct
54 Correct 367 ms 29008 KB Output is correct
55 Correct 373 ms 28752 KB Output is correct
56 Correct 385 ms 29012 KB Output is correct
57 Correct 382 ms 28840 KB Output is correct
58 Correct 402 ms 28648 KB Output is correct
59 Correct 375 ms 28752 KB Output is correct
60 Correct 371 ms 28868 KB Output is correct
61 Correct 402 ms 28796 KB Output is correct
62 Correct 369 ms 28844 KB Output is correct
63 Correct 377 ms 28988 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 311 ms 27248 KB Output is correct
2 Correct 308 ms 27992 KB Output is correct
3 Correct 304 ms 28100 KB Output is correct
4 Correct 308 ms 27984 KB Output is correct
5 Correct 306 ms 28104 KB Output is correct
6 Correct 327 ms 28064 KB Output is correct
7 Correct 308 ms 28116 KB Output is correct
8 Correct 325 ms 28272 KB Output is correct
9 Correct 320 ms 28068 KB Output is correct
10 Correct 317 ms 28116 KB Output is correct
11 Correct 311 ms 27964 KB Output is correct
12 Correct 313 ms 28092 KB Output is correct
13 Correct 325 ms 27948 KB Output is correct
14 Correct 318 ms 27984 KB Output is correct
15 Correct 315 ms 28048 KB Output is correct
16 Correct 310 ms 27940 KB Output is correct
17 Correct 316 ms 28108 KB Output is correct
18 Correct 311 ms 28288 KB Output is correct
19 Correct 326 ms 28376 KB Output is correct
20 Correct 313 ms 27984 KB Output is correct
21 Correct 342 ms 28240 KB Output is correct
22 Correct 325 ms 28656 KB Output is correct
23 Correct 323 ms 28756 KB Output is correct
24 Correct 325 ms 28780 KB Output is correct
25 Correct 313 ms 28668 KB Output is correct
26 Correct 326 ms 28496 KB Output is correct
27 Correct 341 ms 28432 KB Output is correct
28 Correct 327 ms 28496 KB Output is correct
29 Correct 330 ms 28752 KB Output is correct
30 Correct 334 ms 28640 KB Output is correct
31 Correct 321 ms 28756 KB Output is correct
32 Correct 324 ms 28496 KB Output is correct
33 Correct 345 ms 28500 KB Output is correct
34 Correct 360 ms 28676 KB Output is correct
35 Correct 325 ms 28680 KB Output is correct
36 Correct 313 ms 28500 KB Output is correct
37 Correct 326 ms 28668 KB Output is correct
38 Correct 329 ms 28496 KB Output is correct
39 Correct 320 ms 28496 KB Output is correct
40 Correct 324 ms 28556 KB Output is correct
41 Correct 325 ms 28500 KB Output is correct
42 Correct 315 ms 28720 KB Output is correct
43 Correct 391 ms 28860 KB Output is correct
44 Correct 394 ms 28880 KB Output is correct
45 Correct 368 ms 28664 KB Output is correct
46 Correct 377 ms 28752 KB Output is correct
47 Correct 381 ms 28848 KB Output is correct
48 Correct 375 ms 28756 KB Output is correct
49 Correct 410 ms 29072 KB Output is correct
50 Correct 396 ms 28864 KB Output is correct
51 Correct 386 ms 28852 KB Output is correct
52 Correct 391 ms 28848 KB Output is correct
53 Correct 378 ms 28752 KB Output is correct
54 Correct 367 ms 29008 KB Output is correct
55 Correct 373 ms 28752 KB Output is correct
56 Correct 385 ms 29012 KB Output is correct
57 Correct 382 ms 28840 KB Output is correct
58 Correct 402 ms 28648 KB Output is correct
59 Correct 375 ms 28752 KB Output is correct
60 Correct 371 ms 28868 KB Output is correct
61 Correct 402 ms 28796 KB Output is correct
62 Correct 369 ms 28844 KB Output is correct
63 Correct 377 ms 28988 KB Output is correct
64 Incorrect 357 ms 29012 KB Output isn't correct
65 Halted 0 ms 0 KB -