QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#818076#2809. Presentlinmouren100 ✓2413ms4472kbC++2060.0kb2024-12-17 16:14:392024-12-17 16:14:40

Judging History

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

  • [2024-12-17 16:14:40]
  • 评测
  • 测评结果:100
  • 用时:2413ms
  • 内存:4472kb
  • [2024-12-17 16:14:39]
  • 提交

answer



#include <bits/stdc++.h>

using namespace std;

#define maxn 600005
#define int long long

int _n,_cnt,_lst[40],_now[40],_have[114],_gc[40][40],_ans,_t;
set<int> _ms;
string sv[15001]={"1101010000000001100000001000000000000","1110101011100011110000100100000000000","1111100110011010000111101100000000000","1111011000001101101010001010000000000","1111101111100110000001110110000000000","1111110100110000110101010001000000000","1111111010101110101100010101000000000","1111110100100011100001110011000000000","1111111010010000001010111111000000000","1110101111000100001011110000100000000","1111111010110110111111000100100000000","1101100101000011101101101100100000000","1111101011111100100100001010100000000","1111010111011001101100110110100000000","1111011101100100111110010001100000000","1111101101110011100000010101100000000","1111010111000100100100110011100000000","1111011010011000000011011111100000000","1110001110100011001001000100010000000","1110110100000100001000110010010000000","1110011011000000110011100001010000000","1111011111010000110110110011010000000","1101100100001100100000001000110000000","1110110011110010111011101100110000000","1110110101000000001011110110110000000","1111011110110001010010110101110000000","1111100001100010110010000000001000000","1111111011011001110001001000001000000","1111001001011001000001100100001000000","1111110011010010101111011100001000000","1111111101100000001100101010001000000","1111101011101000011110001110001000000","1111111001101100010011110001001000000","1111111100110110111110110101001000000","1111111001100101101111001011001000000","1111100110111100101100000000101000000","1111110100001010110110001000101000000","1111011010110000111010100100101000000","1111110011010010100101011100101000000","1111110010100010010000101010101000000","1111110011011111101100001110101000000","1111001100000000101001110001101000000","1111110011010110100100110101101000000","1111110011100111101001001011101000000","1111110000111011110010000000011000000","1111011011101100011010100100011000000","1111100100100010001000101010011000000","1111100100101100001000001001011000000","1111111110011000111010111011011000000","1111110001011000010010101000111000000","1111001100101111001000000010111000000","1111110011101010010011101110111000000","1111111001111011100001101101111000000","1110001101100100001011000000000100000","1111111110100000110111011000000100000","1111101000101101101011001100000100000","1111111011001110001101001010000100000","1111101110000101001001101110000100000","1111111100111110000100111001000100000","1111001110100001011101000011000100000","1111111000110101101101101111000100000","1110101111001000101001001000100100000","1111111101101111101010010100100100000","1111110000111000001001100010100100000","1111111110000100011100010110100100000","1111101101010101001101110001100100000","1111111100000011010111001101100100000","1111100010000000011100100111100100000","1111110010101000100011101000010100000","1111111111100010110110110010010100000","1111111101000111101111101001010100000","1111111111100001001111111111010100000","1111011101101001110001010100110100000","1111110110001001000011010110110100000","1111111100000000101000011101110100000","1111111000011000010110100000001100000","1111110000010010000010000100001100000","1111111000101111011101101100001100000","1111110110100000100000011010001100000","1111101001001001110000000001001100000","1111100101110101000101000101001100000","1111111110011011010010010011001100000","1011101010101010101100000000101100000","1111111100101101111110101000101100000","1111011100101101000000001100101100000","1111111101100011100100110010101100000","1111110001000000100010001110101100000","1111111000101110111000101001101100000","1111111111010100111101011101101100000","1111111110000100110101110111101100000","1111110010001001010001000100011100000","1111111110101100001010111010011100000","1111111011010101011100100101011100000","1111010101101101110000100000111100000","1111110010000100100000101100111100000","1111111111000011101100011110111100000","1111111110001101100010010011111100000","1110001100100010100001110000000010000","1111000111001001100110110100000010000","1110011010100001111010001010000010000","1110010110101001001000111110000010000","1111001000100000001101010101000010000","1111001110101100110110100111000010000","1111010100111100011000001000100010000","1110011010101101001000001100100010000","1110110010000100101000101010100010000","1110010000001100010000000001100010000","1111010100101000011001110101100010000","1111001100111000001010010111100010000","1110010010111100101001100100010010000","1110011101100001101001110110010010000","1111110011110111101101101011010010000","1110011010101000111001100100110010000","1110011011101000000011110110110010000","1111111001111011001111101011110010000","1111110101110100010001001000001010000","1110011110100100010001001100001010000","1111100111111101001101101010001010000","1011101000101011001110000001001010000","1111101010000011111110001101001010000","1111001010110110001001110111001010000","1110100011010010101000101000101010000","1110010000100100011000101100101010000","1111100111001010101110011010101010000","1011000110110001001000100001101010000","1111100100001001111100101101101010000","1110101010101110011001001111101010000","1111010101100100010101110100011010000","1111110110110000110011011110011010000","1111011010111101000011100111011010000","1110111110101111100011110100111010000","1110110101001110000000111110111010000","1111011110101100111011100111111010000","1111010100011101110000000100000110000","1110101011101011001001100010000110000","1110010110101101001000111110000110000","1111001100101001011010101101000110000","1111110010010110011100000000100110000","1111001001011001000010100100100110000","1111100101101000001110001010100110000","1111001100000010111010100001100110000","1011100010110011100100100011100110000","1110110100000110011000001000010110000","1111010111000100011100100110010110000","1111100101101110001000100111010110000","1111010100010010001000000010110110000","1111001100001001101010100101110110000","1110010100101111100000110000001110000","1110010110000000001000101100001110000","1110010010000111101000100110001110000","1111110101100110111001111001001110000","1111001110101111001010000111001110000","1111010000111001101000101000101110000","1110011010101010001000000010101110000","1110101001001110000000001110101110000","1111001100101101000011100101101110000","1111100100010001000100001111101110000","1110011010101100110000000010011110000","1111011010001001110010100101011110000","1110101011101111000000000100111110000","1110101001101011101011001110111110000","1111110101110000100101111111111110000","1101101001000101000010001000000001000","1111010001110001000110100100000001000","1111101001011010101101011100000001000","1100101101100001100001101010000001000","1111101001101011000111001110000001000","1101110100011101010001001001000001000","1100101000001100001010001101000001000","1111111011101000110011011011000001000","1101101001101001111101000000100001000","1101001000010100100001101000100001000","1111010101000001101110010100100001000","1111101001011011000001000010100001000","1101000010100000001000000110100001000","1111101001010110000100111110100001000","1111101001011110001101011001100001000","1111111010010010011110011101100001000","1111011001000000100110100111100001000","1101111101110000010101110000010001000","1110111011101011111001101100010001000","1111011111011101110101110110010001000","1101110101001100000100110101010001000","1110111011110000011001000000110001000","1110011011011100100011100100110001000","1110111010101010010001011010110001000","1111101101001110100110101001110001000","1111011000110010000000100111110001000","1110110100101011110011010000001001000","1101101110000000110001000100001001000","1110110110001010111000101100001001000","1111010100100000000101110010001001000","1111011110100001010111010110001001000","1111011010001110000010010001001001000","1101110100010000011000010101001001000","1111101011000010101001110011001001000","1111101010101110101101111111001001000","1111110110110000011100001000101001000","1110100010101001011010100100101001000","1101110001110100100101011100101001000","1111010110011100000001101010101001000","1110111000111100101011001110101001000","1101100111101100100001001001101001000","1111001010100101000010001101101001000","1111101101011011001101011011101001000","1111011100011010111010100000011001000","1111011110110000010000110100011001000","1110111011010100101001000110011001000","1111110101010110111000000101011001000","1111011010100100001001110111011001000","1111011011100101111100000100111001000","1110110110100000100010010010111001000","1101101100001000000001100001111001000","1111011111010001110100010011111001000","1101110001111100011101100000000101000","1111110101111111011101000100000101000","1110110111000010000010111100000101000","1110101010101000011010000110000101000","1111010100111010001000100001000101000","1111011010000100011011100101000101000","1111101110001000011101101011000101000","1111101011100011100100100000100101000","1101100101000101010100000100100101000","1101001100001000111001101100100101000","1111101101011011000001011010100101000","1101100101001001110100000001100101000","1101100101001101110000100101100101000","1111101010000011000000001011100101000","1111011011111100011000100000010101000","1101100001001111101000101100010101000","1110111101100010101011011110010101000","1111011110101101101011010011010101000","1111110111010011010100011000110101000","1110110100100001100000001010110101000","1111110111000000010000111001110101000","1101011101100100110000000000001101000","1111101101000100010110101000001101000","1110110111000011000000001100001101000","1110101110001010001001110010001101000","1111101011101011010101001110001101000","1111101101101010000011101001001101000","1111010100111100001100000011001101000","1101100111001100101100101111001101000","1110110010000001101001001000101101000","1110111101001111110001010100101101000","1110101000001011000011100010101101000","1111010110011000101100110110101101000","1111101100000110101001001001101101000","1101111101001100111101101101101101000","1111110111100010111000110111101101000","1110101110001001001010000100011101000","1111110110110111000000011010011101000","1101101000000100100000100101011101000","1111011000110011101011000000111101000","1111110101010111011001001100111101000","1110110101001010001001101110111101000","1111011010010100101001100011111101000","1110101111100100100011110000000011000","1110101010100000110000001100000011000","1110100010111000100001101010000011000","1111101011101011100001000001000011000","1111010110011100001000101101000011000","1111101101101100100111001111000011000","1110111010001110100010011000100011000","1110111000111010111001011100100011000","1111010100010100100000100110100011000","1110111000001000001000001001100011000","1111011010100101001010100011100011000","1110101110100110001010100000010011000","1111111011010111100010100010010011000","1111110110110011001001111001010011000","1110111011101000010101100000110011000","1110101101101000000011100010110011000","1111011011001001111100000101110011000","1110101111001100111000100000001011000","1111110101110110011100100100001011000","1111011110100100011111100010001011000","1111101010110000100110001110001011000","1101001101100101000000100101001011000","1111101011011111100000000111001011000","1110110100100001110010110000101011000","1110110101100100010001110100101011000","1110110010000110111000101010101011000","1111010100100101010100000001101011000","1111101101101010010110001101101011000","1111010010100101111000001111101011000","1110110001111000011010110100011011000","1110111011100000111001011110011011000","1111010101101101100101100111011011000","1111110101010111010000001100111011000","1110101000001110000000000001111011000","1111111011101110100111010111111011000","1111010100010001100110000100000111000","1111010100110011001000110010000111000","1111010110110100101101000001000111000","1111010111100101010001000011000111000","1110101001101000101010100000100111000","1111101010011010000000001100100111000","1111011010110001111010000110100111000","1111010110000101001000011001100111000","1111010100011000000100000111100111000","1110110110000010110000010100010111000","1111011101100100110011100001010111000","1111011101111101010111100000110111000","1110101100101010101000000110110111000","1111111010110110001010101011110111000","1110111110001100111010111000001111000","1111011010111100000110100010001111000","1111101101111010101100111110001111000","1111110110100010110000011101001111000","1111110101111011111001000000101111000","1111010110010001000100010100101111000","1110110110100111001001011010101111000","1111101101001011100010001001101111000","1111101011011001101000101011101111000","1110110101100101111001000100011111000","1110111110100000011010111110011111000","1110101010101100001001000000111111000","1111110101011001001010001010111111000","1111011010010111100000100011111111000","1110110100000001001000101000000000100","1111110110100011001100011100000000100","1111110010000010110001010110000000100","1111111000100111001110100101000000100","1111111000111110000110101111000000100","1111111110010011011011111000100000100","1111111011101000110100100010100000100","1111100011101010001000011110100000100","1111111011000010000101101101100000100","1111111111011001011001010000010000100","1110111011110110001000000110010000100","1111111110100110111001110111010000100","1111111010101000011011000010110000100","1111111101101110111100111101110000100","1111101010100011111000101000001000100","1111111010000000100110011100001000100","1111111101001111101101010110001000100","1111011000000101001001100101001000100","1111101110101000011001101111001000100","1110111100101100100000000100101000100","1111101110111101100010100010101000100","1111101100000110100010011110101000100","1111111010000011100011101101101000100","1110111011111100000000110000011000100","1111101110101000001010000110011000100","1111101001100000000010001111011000100","1110100010000010101000100010111000100","1111111110100101010011111101111000100","1111111101101000110101011000000100100","1110001110101001101010110010000100100","1111111010101110011110001001000100100","1111111101001011100010010111000100100","1111101000100011111001000100100100100","1110101011001100010001101010100100100","1111111101101101000101111001100100100","1111111101001001001111011111100100100","1111101000001001000000100110010100100","1101111101111100010101010000110100100","1111111111011011111010011110110100100","1111111110100000011110010000001100100","1111101101101110010011101100001100100","1111111010011101101001101110001100100","1111111010101110000100100011001100100","1111101000000011110001001000101100100","1111111010010111101110000010101100100","1111101010100000111101000001101100100","1111101000101011000100101011101100100","1110110001101000100001101100011100100","1111111111010011011000110011011100100","1111111111101101110100010010111100100","1111111011000010101111001111111100100","1111110001101001001000101100000010100","1111101111101001101011011110000010100","1111101011101000010011000111000010100","1111011000010000100010010100100010100","1111111010110010000110110110100010100","1111111101011101100110110011100010100","1110111000011010100010100010010010100","1111101000000001101000100000110010100","1111111101100100010110010001110010100","1111110101101000101100011000001010100","1111100010001010001000011010001010100","1111111101110100011011110101001010100","1111101001100111001000001000101010100","1111011100000001101000110010101010100","1111111101100001000101111001101010100","1111110111100000111000001000011010100","1111101001100000100000000101011010100","1111110011100010010000100010111010100","1111101101100101010010000000000110100","1111101101101011000001010010000110100","1111111010101101000111001101000110100","1111111010010011010100000100100110100","1111101001001010100000101110100110100","1111111010101111001001001111100110100","1111111111101001011101111001010110100","1111110101101001001100100110110110100","1111111100000010001100011000001110100","1111110111000001111000110110001110100","1111101010100101111010100111001110100","1111111110100100011110011100101110100","1111111111011001101100111001101110100","1111101001101010000001100100011110100","1111101000101011001001000000111110100","1111111010100010000001101101111110100","1111111100010000000011011000000001100","1111111011010111001001000010000001100","1111100011100001110101101110000001100","1110101000001110001001101101000001100","1100101011001100100100100000100001100","1111101110000011101010010100100001100","1111110110001011111101101010100001100","1111111100001110010010001001100001100","1111111010011000100010011011100001100","1110111100001001111001010100010001100","1111111110110000110000101001010001100","1111111000110100110000011000110001100","1111101100100010101010101110110001100","1111111011001000101101000000001001100","1111110101010011001101100100001001100","1110100110001001100000101010001001100","1111001100111000101000110001001001100","1111111011101011111011001011001001100","1111111100011110100001001000101001100","1101101101101011000101101100101001100","1111111010000000001110010110101001100","1111011100000001011001100101101001100","1111111101001001101000011111101001100","1111111011011000101101100010011001100","1111101001101000101000100011011001100","1111101101000110100011001100111001100","1111111101100111011101000101111001100","1111101000100110101101001000000101100","1111011010001001101011000010000101100","1111101101001101101001100001000101100","1111111010010111100100000111000101100","1110111101000100111000000100100101100","1111101001100011000000101010100101100","1111111110100110111011011001100101100","1111111101001011000101011111100101100","1111111101010100001011000110010101100","1110110101100000000001010000110101100","1111111101010000100000011110110101100","1111011100011001111001010000001101100","1111101110101100000010011100001101100","1111101100101010100000111110001101100","1111101100110000001001110011001101100","1111101100100010101001101000101101100","1111111011000010110111100010101101100","1101101111101100110000001001101101100","1111111010011011001111100111101101100","1111111110110110101011110010011101100","1111111110100111000000011111011101100","1111111110110111010000100110111101100","1111111101010101011110100000000011100","1111101100111100101000100010000011100","1111111010000101100110101001000011100","1111101011101011110000100000100011100","1111111010110010001010000010100011100","1111111010001110100110001001100011100","1111111000111100011000100000010011100","1111111101100110011110110001010011100","1111111101100100000110011100110011100","1111111100100000101001101111110011100","1111111011110000101111101100001011100","1111111101011011010100100001001011100","1111111011101011110100101111001011100","1111111010111000011100101100101011100","1111101100101000100010000001101011100","1111111010101000000111110111101011100","1111111101010101001000001110011011100","1110111011110110110010100100111011100","1111111110100100110010010011111011100","1111111101110110110111101100000111100","1111111010101110101000000101000111100","1111110111000000001100101000100111100","1111111111000100111000010110100111100","1111111010010110000110100111100111100","1111111110100110101010010001010111100","1111101011101001100001101010110111100","1111111010011100000010101000001111100","1111111101010011100010010110001111100","1111101110110000100001100111001111100","1111111101101011111101111100101111100","1111111011100000001100100101101111100","1111110100001001110000101100011111100","1111101000001001101000001000111111100","1111111110110010010001001011111111100","1111101011100100010010101000000000010","1111111110111000010100101100000000010","1111101110100001010001001110000000010","1111101101101001110100000101000000010","1111110010110100101000101011000000010","1111110101110000011100110000100000010","1111111100110111101101010100100000010","1111110011011001001100000110100000010","1111111001000111010101001001100000010","1111111110011111000011111101100000010","1111111010010011100010001000010000010","1111011101110101010001000001010000010","1111011101101000101100100000110000010","1111011010011000011010100110110000010","1111111011000010010001001111110000010","1111110100010001101111101000001000010","1111101000100010001011101100001000010","1111110110101000111111101110001000010","1111011101101101011101000101001000010","1111111011010111110100000111001000010","1111110100100111001100001000101000010","1111110110100110110000001100101000010","1111110110010110001100100110101000010","1111010100001001010001101001101000010","1111000111000101111000100011101000010","1111111100010110111000011000011000010","1111111011000101010111100001011000010","1111011001010000001101010000111000010","1111111011100000111101101110111000010","1111010001111001101100000000000100010","1111010000110100110000100100000100010","1111000010100001011100000110000100010","1111111011111100010101101001000100010","1111111011111010111000001011000100010","1111110110001010011010001000100100010","1111101000101100010101101100100100010","1111101111100101110011000001100100010","1111101111111001101011110101100100010","1111011001100001011101000000010100010","1111011100101001100001100001010100010","1111111011110101000001101000110100010","1111110111100001100001000101110100010","1111101111111001101111110000001100010","1111110111000010101100101100001100010","1111011100110000010001000001001100010","1111110111110110100100010101001100010","1111011100011000100000000000101100010","1111000110101100011101000100101100010","1111110111101011100111101010101100010","1111110101011010101100101001101100010","1111101111100100000011100011101100010","1111110100111011111010010100011100010","1111111101110010110011101101011100010","1111110111110001001101100010111100010","1111110111111100100000110111111100010","1111010011110000011011100100000010010","1111101011011000001000111110000010010","1111101010100000011100000011000010010","1111110101010101101100101000100010010","1111111011000100101110001010100010010","1111110100100111010101000101100010010","1111110110011011101000010000010010010","1111110111100000000001100101010010010","1111110011011010110010001010110010010","1111110110101110111100100000001010010","1111110110100000101110101100001010010","1111101111110001100001010001001010010","1111101111100000100001000111001010010","1111101100110011100011000100101010010","1111010011111000100001010110101010010","1111111011110010100111001101101010010","1111110111111101000001100100011010010","1111110111110000111100100111011010010","1111111101111010110110100001111010010","1111110111101010000001101000000110010","1111111011111100111100001110000110010","1111111011111100110010000011000110010","1111101110101000010010000100100110010","1111101110101100100100000001100110010","1111110111100000110100001011100110010","1111110100100110111000100001010110010","1111111110111101111010001010110110010","1111101111110101101001110000001110010","1111111011111110110000000110001110010","1111111011101111001110001101001110010","1111100010010010100100101000101110010","1111101111111101101000010110101110010","1111110111110100000100111101101110010","1111110111110100110100000110011110010","1111111111110110010011110100111110010","1111101110001110011001000000000001010","1111110101101111001001000100000001010","1111000110101001111100100010000001010","1111110111000011101100100001000001010","1111101111110100100111110101000001010","1111101100101011000000000000100001010","1111110111111010100111111000100001010","1111110111110010101101111100100001010","1111011100001101000001000001100001010","1111101111010001001101100101100001010","1111101110011100100000001111100001010","1111111101111011100101111100010001010","1111111101111011010001011101010001010","1111010010111000111011110100110001010","1111111000101011101011100101110001010","1111101111010101100010110000001001010","1111111011111110010100110100001001010","1111110011111001010011000110001001010","1111111011001011110110101001001001010","1111101111111000101000100011001001010","1111011100001101011101100000101001010","1111101111100101001101100100101001010","1111101011000000100011101010101001010","1111110111001111110100001001101001010","1111011100010000100001011101101001010","1111111101111111111101110000011001010","1111011001101001101100000001011001010","1111111011111110001000100000111001010","1111111011111101100010100110111001010","1111111110111100010010001111111001010","1111110111001001010101000100000101010","1111110111111000001111101010000101010","1111011100011001100001101001000101010","1111101111111001100101110011000101010","1111111011000100100001001000100101010","1111111011110101000111101100100101010","1111101100001111111000100001100101010","1111101010100001110001001101100101010","1111110100101010100011100000010101010","1111111101101101110010001001010101010","1111111101111111010110000100110101010","1111110110010110111001100101110101010","1111110001010100011101001000001101010","1111110111110010100111011100001101010","1111101111001000110010100001001101010","1111111101111101010011001101001101010","1111110111111000110111000000101101010","1111110110011010011011100100101101010","1111101111110100100101110110101101010","1111110111100110010101000101101101010","1111111011111110111100100111101101010","1111111011111101011001101010011101010","1111110100101111110000000000111101010","1111111011111110100101000001111101010","1111101110011101101110100000000011010","1111010000111100001000111100000011010","1111111011111111001011001001000011010","1111101010110100101011001111000011010","1111101110110111100001010100100011010","1111101111111000101010000001100011010","1111101110111100001001010011100011010","1111111110111010100011110010010011010","1111111000101100111010001000110011010","1111111101111110010011001101110011010","1111110111100011111101000100001011010","1111111011011010111110110110001011010","1111111011110100001110101101001011010","1111110100111001110011001000101011010","1111110111000101101100001010101011010","1111101111110000000000100101101011010","1111110111010000011110110000011011010","1111110111111101010001110101011011010","1110111010110110010010000110111011010","1111101111111101100101010000000111010","1111101110010110101000000110000111010","1111111011100101011111001101000111010","1111110111111001101111101000100111010","1111110111101010100010101110100111010","1111101111100100010101100011100111010","1111111011111110011100000001010111010","1111110111111101101100100010110111010","1111101100111001001011010000001111010","1111110010110010111000000110001111010","1111110111111011000000101101001111010","1111111101111010010000011000101111010","1111110111100011001010101110101111010","1111110111100110011101100011101111010","1111111000101011100010000001011111010","1111111010010111010010100010111111010","1111111101110011111101010000000000110","1111111011110000110101110010000000110","1111111011110111101001001101000000110","1111111011001000111111101000100000110","1111111110111101101010110110100000110","1111111110001100101001001011100000110","1111111101111101110011001001010000110","1111111111011111010000111110110000110","1111111011011110100000111000001000110","1111111010001001001001001110001000110","1111101010100101001101101011001000110","1111111011110010000111100100101000110","1111111011011110100000010001101000110","1111111011111010101000100000011000110","1111111110111110011011000111011000110","1111111001010100011101101101111000110","1111101001011101001001101100000100110","1111111110111010010011010101000100110","1111111011100010010010000100100100110","1111011110110000111001110001100100110","1111111110111110101010011000010100110","1101111101111101000000110100110100110","1111110101001011101000101000001100110","1111111011001000010110000001001100110","1111110010101001001000000000101100110","1111011110111101011010110010101100110","1111101100110100001101111101101100110","1111111101111011110000100101011100110","1111111101111111101111101101111100110","1011101110101011001100101010000010110","1111001010010001101010000000100010110","1111111011111010100010101110100010110","1111111101111001000000110100010010110","1111111101111011001000000001110010110","1111111011111100101111011100001010110","1111111110011101001110111011001010110","1111111010101100011001101010101010110","1111111101111110010111100000011010110","1111111101111001100000111100111010110","1111110111110000001001101100000110110","1111111110111111100010011111000110110","1111111011001001010100001001100110110","1111111101111110001001000101010110110","1111111011111101100011001000001110110","1111111110111111010101110101001110110","1111111011001000111010001010101110110","1111111011111001111100000100011110110","1111111101111110111111001101111110110","1111111011001111010010001100000001110","1111111011110100101010101001000001110","1111110111011001101101100000100001110","1111101010111110001000010010100001110","1111111001101001110001001101100001110","1111111111011111010101001010010001110","1111111110010100111011101100110001110","1111111110001100111100001000001001110","1111111110111111001001011010001001110","1111111011111000100110111101001001110","1111001000001000110011000100101001110","1111111001100100101101000001101001110","1111111011110110001001101111101001110","1111111111011110010110000011011001110","1111111101111110101010010101111001110","1111110110001010001000101100000101110","1111111011111100000111100101000101110","1111111011100100010110000100100101110","1111111011111010100010001001100101110","1111111011110011011001000100010101110","1111111101111111000011001100110101110","1111110110100010101101101000001101110","1111111011100111011010100001001101110","1111110111000011100000100000101101110","1111111011111000100110000110101101110","1101101111101000001001101011101101110","1111111110111110000010001011011101110","1111111011111111100000000000000011110","1111111011100100111110101110000011110","1111111100101100000000101000100011110","1111111011111011101011101001100011110","1111111101111111011011100001010011110","1111111110111100100010001111110011110","1111110111101010111001001110001011110","1111111011110000100110001000101011110","1111111011110000101100101001101011110","1111111101111100101010000001011011110","1111111110111101111000000111111011110","1111111011110110100000001001000111110","1111111011111000000110001100100111110","1111111110111111111100001111100111110","1111111011111001111100101110110111110","1111111011110100100110000110001111110","1111110111100011000100101000101111110","1111111101111111010111001101101111110","1111111101111011001010101000111111110","1111001111001000110110100000000000001","1111100111111010100010011000000000001","1101010101010101000100110100000000001","1011101110011010100000100010000000001","1101000101000101101100000110000000001","1110101111000000101001111110000000001","1111110011100110111001011001000000001","1101110100101001011100011101000000001","1101101111101101100000100111000000001","1001100100100000001010100000100000001","1110101111101110001000011000100000001","1110011000101010100000110100100000001","1111010110111011011011000010100000001","1111100111111010101000000110100000001","1110101001110100000010111110100000001","1101111101011001101100011001100000001","1111101100001101001111101101100000001","1111100111001011111101000111100000001","1101011001101000111101010000010000001","1100111100100001111001001100010000001","1111110111010010111011100110010000001","1111010110001110110001100101010000001","1010110000000000100000000000110000001","1101011001011101100000100100110000001","1111110011111001000100001010110000001","1111010110010111100000110001110000001","1111110011111111000100101011110000001","1110101101000011001011100000001000001","1010100110100001001010111000001000001","1111110011100010111111110100001000001","1110011000000011001001100010001000001","1111010110011001111011000110001000001","1111101011100111010110000001001000001","1111001111011001101000000101001000001","1100100001101100100000000011001000001","1111010111100100110000010111001000001","1101011100010000011101100000101000001","1110101111001101101000111000101000001","1110101101101010000011110100101000001","1111001111011001101110100010101000001","1111001101010101101101000110101000001","1111110101000111101100000001101000001","1111010110001100000000000101101000001","1111100111101010000101111101101000001","1101000110101100011101100111101000001","1110110001100110101000001000011000001","1100111100100001001000011100011000001","1110101111100111100000001110011000001","1111110101111111110001110101011000001","1111001111100101101101000000111000001","1110011110000101100011100100111000001","1111110011111100011100011010111000001","1101101101101100100100101001111000001","1111101101000110000011000111111000001","1111010111110000010110110000000100001","1111001111111000001110100100000100001","1110101111001110101001000010000100001","1110101111000111110000100110000100001","1101011100111000100101100001000100001","1101010101011101100000110101000100001","1111110110100011101100111011000100001","1110011100000101110010100000100100001","1101101111101101100100000100100100001","1110101111001010011001101100100100001","1111100111110011000011101010100100001","1110101111000010001011111110100100001","1101011000100000110001000101100100001","1111001111100100001111100011100100001","1110011110000010001010000000010100001","1100110101000100011001110100010100001","1110101111100000000010001110010100001","1111001111000001000010000011010100001","1111110011111010011001001000110100001","1110011110101000100001100010110100001","1101100001100011101000001001110100001","1111110011111000100000001111110100001","1111100111111111100001001000001100001","1111100111110010001100010100001100001","1110011111001001000001100010001100001","1111001110011011100000010110001100001","1111010111111100110001110001001100001","1111110011111010011101001101001100001","1111100111111110000100100111001100001","1111001111001000111111100000101100001","1110011100001000110011000100101100001","1101000100111100100001111100101100001","1111010010100101000100000110101100001","1111100111100011111101000001101100001","1101010001001101000001100101101100001","1111101011001100111001001011101100001","1100111100100001000001100000011100001","1101110100110001111001101100011100001","1111110011111111111000000001011100001","1111100111100001001001001011011100001","1110110111001011111001111000111100001","1110110111100001010011001010111100001","1111010111111101010100000101111100001","1111001111111001101100000000000010001","1110011101000000010000000100000010001","1011000110000000000100000010000010001","1110010001000001100010100110000010001","1111101011110100000010001001000010001","1111001111110101101010100011000010001","1111001111100001111110000000100010001","1110010011011000100010000100100010001","1011100010010010101110000010100010001","1110011010110000010011100110100010001","1110101011000110101000101001100010001","1111010010011000001100010011100010001","1111001111101000101101100000010010001","1110011000100000100001100010010010001","1111010111101000010000000101010010001","1111010100110000100011100000110010001","1110110011110010110001100010110010001","1111010111101101110000000101110010001","1110011011110000100000100000001010001","1111001100111000100101000100001010001","1011000110111000001000100010001010001","1111010111011000010110010110001010001","1111100111111010000000011001001010001","1111011110111110010010110011001010001","1111010001100001101100100000101010001","1110011111100101001000100100101010001","1110011110100101101010100010101010001","1111110011111010110100110110101010001","1111100111110111000100111001101010001","1111101100011011100010001011101010001","1110011001111000010011110000011010001","1111110011010000000100001010011010001","1111010111111001000100010101011010001","1110011111101000011011110000111010001","1010100001100000101100001010111010001","1111110011111010011100010101111010001","1110101111101011001011100000000110001","1111100111101101001100001100000110001","1110011100100000001010000110000110001","1111101011111011000110101001000110001","1111100101001011000100011011000110001","1110101111100000010010001000100110001","1110011110001001010010011100100110001","1111001100110010000010010110100110001","1111001010001001100000100101100110001","1111001111110101101111100111100110001","1111100111100110001100101100010110001","1111110101111100001001111001010110001","1110101111000111101000101000110110001","1110011111000001011000010110110110001","1111010111111101000000110111110110001","1110011111100100010010000100001110001","1111101100011010101100010010001110001","1111100111101110101000000001001110001","1111101101111000101110011101001110001","1111001110100001111110000000101110001","1111010100111011110001100100101110001","1111100111110101101000101010101110001","1111010111111001010000010001101110001","1111001100110010001011100011101110001","1110101111100111001000101000011110001","1110011110000110001000010110011110001","1111011101110001000011010111011110001","1111110011111111111101000010111110001","1111010111110100101000110101111110001","1101101101100010001001100000000001001","1101101100101100000100111000000001001","1111101101111111001011110100000001001","1100001000000100000101100010000001001","1101000101101101001100100110000001001","1110011000101000000011000001000001001","1111100111101111100101000101000001001","1111001111111101000111000011000001001","1101000100101000101000001111000001001","1101011001011000011101010000100001001","1100110001001100100001000100100001001","1100111100000000101000101100100001001","1110011111000001010001110010100001001","1110111011110100110011010110100001001","1111010111111000010100010001100001001","1101011001001100100000010101100001001","1111101011111010001110110011100001001","1111100111111110100001111111100001001","1100111000000100000000100100010001001","1110110111100010111000001010010001001","1111110011111010110000110001010001001","1111100111100111101100101011010001001","1110110110001000011011001000110001001","1110110110001110110001111100110001001","1110110011000010010110101110110001001","1111101000101011001000101101110001001","1101011001011000001101000000001001001","1110111011100110010110101000001001001","1110101101101110001010010100001001001","1111001110101101100110000010001001001","1100100101000001000000000110001001001","1111001100110100000000111110001001001","1101010100011101010001011001001001001","1111110011110110110100011101001001001","1111100111101011101100100111001001001","1100111000010000001001100000101001001","1100111100000000111000111000101001001","1110011101101000001011110100101001001","1110011010100010111001100010101001001","1111001110011000001100100110101001001","1101011001010100111101000001101001001","1101100001100010100101000101101001001","1110011010100100011011000011101001001","1100100001101100001000001111101001001","1111111100111111110010011000011001001","1110010011001001101011000010011001001","1100111000100000101000000001011001001","1111010111100100110000000011011001001","1110110101101010111000010000111001001","1111110011100011010100001100111001001","1110010100101010101001100110111001001","1101011001100101001100100101111001001","1111111001111110000011011111111001001","1100100111000001111000101000000101001","1100110101000001110001110100000101001","1111001111101000001111010010000101001","1111100111110010001010001110000101001","1101101000101001101110101001000101001","1111100111111111000101111101000101001","1111100111111001100101001111000101001","1111100111111000101010001000100101001","1110011100100010101000010100100101001","1111001110011111100001100010100101001","1110011110001101001001010110100101001","1101110001010001010100001001100101001","1111101011001001110110101101100101001","1111100111111110100100010111100101001","1110011111001001010000000100010101001","1111100111001010100100101010010101001","1111001111001000100001000101010101001","1101011001011101110001000000110101001","1100111100000101101000001100110101001","1110101111000111100011001110110101001","1111011000110010001011000011110101001","1111001111010000101011100000001101001","1110011111100101101011000100001101001","1110110111100100111001111100001101001","1110011111100101100001000110001101001","1101010101101101010100100001001101001","1101010101011000000100010101001101001","1111101101111011001010011011001101001","1111001111111000100010100000101101001","1111001110010011100010000100101101001","1111100110111010100011101100101101001","1111110110111010010000111010101101001","1111001111101001011010000001101101001","1101011000100100010100100101101101001","1111001110010000100010001011101101001","1111010110011010001010100000011101001","1100111100000101000001101100011101001","1101101000101110100000000001011101001","1111100111100001001000001011011101001","1100111100001101101000111000111101001","1110101110101100100001001010111101001","1111010110010111010000000101111101001","1111010111111100010100000000000011001","1110011111000101100010000100000011001","1110011111100001101001000010000011001","1110011000110000001001010110000011001","1111011100101001111011011001000011001","1111101011110011101110001011000011001","1110001111101101011011100000100011001","1110011001111000001000010100100011001","1111001111110100100010110010100011001","1110110010101000011011101110100011001","1111010111100100111000010101100011001","1111001110110110101010100111100011001","1110011100001101011000100100010011001","1111011110110110010011010110010011001","1111111011000110111010001011010011001","1110011100000111011010100100110011001","1111011101110101001110110110110011001","1110101001100010000001101011110011001","1110101101001011010000101000001011001","1111100110001111010100101100001011001","1111101011111100000111111010001011001","1111001110101101111111100001001011001","1111100111111010101001111101001011001","1110011010001110100000000000101011001","1111001110011011101000000100101011001","1111001110011011100010000010101011001","1110011111001100111000010110101011001","1111100111100010000000011001101011001","1111001110100110101011110011101011001","1111010111111100100001110000011011001","1111110011110100101100001010011011001","1111011101111001001010010101011011001","1110110110001110011000001000111011001","1110101101100110000000101010111011001","1111011000101010010010110101111011001","1111011101111100011110010000000111001","1110101110101111010000101100000111001","1110011010100101111010100110000111001","1111001111101100001110000101000111001","1111001110101010101001100111000111001","1111001100110101000000111000100111001","1111001111101100111100100010100111001","1110011110100001010001011110100111001","1111010100111000110001101101100111001","1110011111000001010000100000010111001","1111110011111011011000101010010111001","1111100111100110001101100011010111001","1110110111100010101011110100110111001","1111110011111010111100001001110111001","1110101101101111011010100000001111001","1111100111111111100000001100001111001","1111010111011001110110000110001111001","1111100111110101001100011001001111001","1111100111001011010100000111001111001","1110011110000000000010101000101111001","1111100111111010100010000010101111001","1111101011111100100111001110101111001","1111100111000010001000001101101111001","1111101101111100101010111111101111001","1110011010101011001011100010011111001","1111110011111111101101101101011111001","1111010111111000001010100100111111001","1111100111001010000000100001111111001","1111101000100010100011000000000000101","1100101100000001000001100100000000101","1111100101010001100100001010000000101","1111101011011111001110100001000000101","1111101011110111100111100011000000101","1110101111000010101011010000100000101","1100101011101101111000001100100000101","1111111010111100111101111010100000101","1101111101001001000001101001100000101","1111101011001010110100000111100000101","1110111010100111010000001100010000101","1101111000101000001001011001010000101","1110111010010010110000111000110000101","1110110110100010001000011110110000101","1110001000001100111011000000001000101","1110101110000010110001100100001000101","1010111000011010100010001010001000101","1101001000111001001001100001001000101","1111101001001010001100010011001000101","1011101110010000100000110000101000101","1101101101010000101100001100101000101","1110001010010100000000000110101000101","1111101100001111000101101001101000101","1111101011100000000110000111101000101","1100101001000110100100001100011000101","1111111001111010011000111001011000101","1110111010001100001010111000111000101","1111110110111001010001011110111000101","1001100000001000001000100000000100101","1100110101101000100001001100000100101","1111001110011000101010110110000100101","1111101011100110110001101101000100101","1111100111011011000001010000100100101","1111101011010100001011101100100100101","1110101111000110111001101110100100101","1111111010110001010100100011100100101","1110111011100101110011100100010100101","1101111000101000011000001101010100101","1101110101011001100101101100110100101","1111101011001001000010001011110100101","1110110011000001010001000100001100101","1010101010101011000010101010001100101","1111101101111111101111011001001100101","1111101011100100111111101111001100101","1110101111000111111001100100101100101","1110101110101110010010000110101100101","1111101010010111001001100101101100101","1101110101011001010101100000011100101","1110101110101001101010101110011100101","1110101111101011001001101000111100101","1111111001111110001010001001111100101","1110111011100100100110101000000010101","1111100101011010100100101010000010101","1111111001111010010100010101000010101","1111110011110000110100110000100010101","1010100110101001001000010010100010101","1111111001111100111111101001100010101","1110111010001100010010010000010010101","1111111010001100010000101001010010101","1110111010001000011010111100110010101","1111111001111100001000111111110010101","1111101011000101100110101100001010101","1111100111100010001101111110001010101","1111101110100110110001100111001010101","1111001110010001100000110100101010101","1111100111101000100100001110101010101","1111101011100101110110001011101010101","1111110101111001001001010010011010101","1111101001101011101111100000111010101","1111111001111110100110001001111010101","1110101101101100101011000100000110101","1111101011111101001111101110000110101","1111101101111000001010011111000110101","1111101011101110100100100010100110101","1111001100110100001001010101100110101","1110110111100001001000011100010110101","1111111001111111110000101000110110101","1111111101101111000111111011110110101","1110101101101010001000000010001110101","1111011100101100101001000101001110101","1110101111000110111000101000101110101","1110101110001111010010100110101110101","1111101101111111100010111011101110101","1110111101100100001010011110011110101","1111111101101111100111010010111110101","1101111001100000001101100000000001101","1110011100100001010010110100000001101","1111110011111010010100111010000001101","1111101011001101111010101001000001101","1111101011001011010110000111000001101","1110101111100011111001101000100001101","1110101110001100100001111100100001101","1100100101000000101001001110100001101","1111101011100110111100001101100001101","1101110001011001000100100000010001101","1111110011111001111101101010010001101","1111101011100100000110000111010001101","1100111100100100111001111100110001101","1111111001111011111010101101110001101","1100101001100101011000101000001001101","1100111000101100001001011100001001101","1110011000101000000011110110001001101","1101011000011100100000110101001001101","1110111000001111001000000000101001101","1100101011100101001000100100101001101","1110101001011010101011110010101001101","1111101011101011101110100001101001101","1111001100101000100001010011101001101","1110111000100110100000000100011001101","1111111001111100000111111110011001101","1111111101011111000110110000111001101","1110101110000110000000100110111001101","1111111001111101001010101111111001101","1111101011100111010111100100000101101","1110101111001010100000100110000101101","1111111100110010110001110101000101101","1100110001101001100001100000100101101","1111100111010001001100101100100101101","1100101011101101111000101110100101101","1111001010100001011011000011100101101","1101110001110000001101100100010101101","1111111101011110100111110101010101101","1111110011111000101001101100110101101","1111101011100110000000001011110101101","1101101001110000101101000100001101101","1110101111001100001000011010001101101","1101001000010101101001000101001101101","1110011110000001110010000000101101101","1111100111110001001101110100101101101","1111100111101011001100010110101101101","1111111001111111110100101101101101101","1111110101011010101000011000011101101","1111111001111010110000101001011101101","1110111011001001011011100100111101101","1101101101101101001100001101111101101","1110011010000100101000100100000011101","1111100111010010101100010110000011101","1111101101110111100110010011000011101","1111101011001001011110000100100011101","1111011110010000011010100110100011101","1111101011110101000100100011100011101","1111111101101111111101111100010011101","1110111010001100110000000000110011101","1111111001111111100111000001110011101","1110101110001110001010011000001011101","1111101100111100000010111010001011101","1111101011111000000110101101001011101","1111100111110010100001101000101011101","1110101101101000101000011010101011101","1111101011100111111010001101101011101","1111110011110000101100010100011011101","1111101011100111001001001011011011101","1111110011100011011101100110111011101","1111100111111011101101001000000111101","1110101110001010111010100110000111101","1111101011111011101110000111000111101","1110101111100110001010011100100111101","1111001100101100101010000101100111101","1110101110101000001000001100010111101","1110110111100001000000010000110111101","1111101011100101101100100011110111101","1110101111100110100001011100001111101","1111111001111100110110000101001111101","1111101011111001101110101000101111101","1110101111000111000000110110101111101","1111101101111011100100010111101111101","1111111001111110000010001001011111101","1110111110001100010000111010111111101","1011000100101001100110100000000000011","1101011001011100110100100100000000011","1111110011111010011101110010000000011","1111001111001100110011100001000000011","1111110011111010011001001101000000011","1111100111110111101100000000100000011","1101010101100101000000000100100000011","1111111100111111111011111100100000011","1111001100101110000010000001100000011","1111001111001100111110100101100000011","1111010111111000010101100111100000011","1111110011110001100010101100010000011","1101110101010100011100001101010000011","1111010111000000100011100100110000011","1101011001010000001001000101110000011","1110010011011000101011100000001000011","1111001111110001000101100100001000011","1111100111110100101100101010001000011","1111101011110110001110110001001000011","1111100111110111000001101101001000011","1101011000101101100101000000101000011","1111100111001011001110000100101000011","1111011110001110111011000010101000011","1111001111110001000111000001101000011","1111100111111111100100010101101000011","1111110011111101111001001111101000011","1111010110011011111010000010011000011","1111111001111100001011111101011000011","1111110100101010101000001100111000011","1111110011111010100000010101111000011","1111011000110100110010001000000100011","1111100111100011111001101100000100011","1111010111111101111101000001000100011","1111100111111011100101110101000100011","1001100100000001101100000000100100011","1101010001000100110000100100100100011","1111100111100110011100000110100100011","1101101000100001010101101001100100011","1111101010101100000100001011100100011","1111110011111000100110001100010100011","1111111011001011011011000011010100011","1111110011111000000010101010110100011","1111010011000100000000000000001100011","1101010101100000101101000100001100011","1111100110100010110011101010001100011","1111110011111110110100101001001100011","1101000110100101001101100011001100011","1101101110001100000000001000101100011","1101110001010000011100101100101100011","1101010001001001010001000001101100011","1111001111111100001100010101101100011","1101011001011001110000000000011100011","1101011101010101000101000001011100011","1111111001111101100010001000111100011","1111111100111111000010011001111100011","1111001100101100100010001000000010011","1111001010110100101101100010000010011","1111101101110111000110111001000010011","1111001111011100100100000000100010011","1111001111110100000101110100100010011","1111010111111100010001000001100010011","1111010111110101010100010011100010011","1111010110111011011011100010010010011","1111010110011001001010110000110010011","1111010111110001100000110101110010011","1110011001011100011000000100001010011","1111001111101000011101000110001010011","1111010100110010011000110101001010011","1011000100010010000000010000101010011","1110111011111010111001111100101010011","1111111001111111010110001001101010011","1111001111011100000010110111101010011","1111010111111000100101000001011010011","1110011001011000011010010100111010011","1111110011111110011000001111111010011","1111100111000010110110101100000110011","1111100111111111101101101001000110011","1011000100110001101110000000100110011","1111001111110101001001000010100110011","1111001111100000001001000101100110011","1111110101110010101010011000010110011","1111010111101101010000000000110110011","1111110101111111010001011101110110011","1111010100110111110000110100001110011","1111001111010100001100110001001110011","1111100111111100101100001111001110011","1111100111111001001000101100101110011","1111110110100000001100101001101110011","1111110011111111110101000000011110011","1111110011111110100100100011011110011","1111110011111110110100000101111110011","1110011010110000000010001000000001011","1101100011001001001100001100000001011","1111110011110011111101100110000001011","1111001110011000101011011001000001011","1111001111110000101100110011000001011","1111110011111010010101010000100001011","1111100111111111001001010100100001011","1111000111001000111010000110100001011","1101100011100101110000101001100001011","1111010111110000010001000011100001011","1110111011111110010001101000010001011","1101011001010101001001100001010001011","1101011101011000111100010000110001011","1111110011111011011010101110110001011","1101010001000001010100000000001001011","1101011000100001000100000100001001011","1110011011010000001010000010001001011","1111100111110010001101000001001001011","1111001111111001000100010101001001011","1111101011001110111011001111001001011","1111100111111011100000011000101001011","1111100111110010001111101100101001011","1111110110110011011011111110101001011","1101011000100000110100100101101001011","1111001110010110001010100111101001011","1111110110110000010000101100011001011","1101110001010000010000001101011001011","1111011100101100000011100100111001011","1101011100100001101001000101111001011","1111001111111100000110110000000101011","1101101000100000010100101100000101011","1111100111111011101001000001000101011","1111001111111000101100110101000101011","1101011001010000011100000000100101011","1101010001000101110100100100100101011","1111001010001111110011000110100101011","1101011000100100000000000101100101011","1111011110111101010011101011100101011","1111110101110010110110111100010101011","1111010111111000000000000111010101011","1111010010101010011011100110110101011","1111001111100001101110000000001101011","1111001111100101000110100100001101011","1101000110100101101100100110001101011","1111010011001101000100000101001101011","1101000110100100101000000111001101011","1111010110010000110001101000101101011","1111101011100111010011000010101101011","1111001111001100111111100001101101011","1111100111001010110101101101101101011","1101110101010101110101101000011101011","1101011100101001011001000101011101011","1111010111111001101001010100111101011","1111111001111111111111101101111101011","1110010010111000011001000100000011011","1111001111110101100000110110000011011","1111110011111010111100101101000011011","1111100111101011101001001000100011011","1111001110000101100000001010100011011","1111100111100110011101000101100011011","1110111011111110010000110000010011011","1111011011111000001011010101010011011","1110110010101010000000000110110011011","1111001100100001110101100000001011011","1111110101110010010011111100001011011","1111100111111001000100101001001011011","1111101011001001010110101111001011011","1111010110011011111000110100101011011","1111001111101101101001000001101011011","1111110011111110010000001011101011011","1111110110010010011000101010011011011","1110111011111100011000101000111011011","1111110011111011011001101101111011011","1111001111110100001011010100000111011","1111010110011001110000001001000111011","1111101011001010110110101111000111011","1111100111111111100000011100100111011","1111001111001000010100000101100111011","1111110011110000110000101000010111011","1111111010111110000010001111010111011","1111111001111110110111001101110111011","1111001111010100000000110100001111011","1111100111100011001000001001001111011","1111001010110100100001101111001111011","1111100111111110000100011100101111011","1111010111111100110100000101101111011","1111110011110011101000101000011111011","1111111011011111011110001111011111011","1111110011110100010000101101111111011","1101101000100100000101100100000000111","1111111011101000100101100001000000111","1111110111100001011000000000100000111","1111101011100000111110101100100000111","1111101011111010000101111001100000111","1111111001111001110011000100010000111","1110111000101110001000101000110000111","1111101011101111110110000000001000111","1110111011001010010011101100001000111","1111001100101001101010000101001000111","1111111010011100010101110000101000111","1101101010100101111001001010101000111","1111101011100110000100101101101000111","1111111111010111111100011010011000111","1111111110011100000000111100111000111","1101100001001000010000101000000100111","1111101011001011110010000001000100111","1011001010001001100000000000100100111","1111101110110110001001010010100100111","1101111101111101100100111101100100111","1111111001111110010011000101010100111","1111111011001001010101101101110100111","1111100111101011011101101100001100111","1111101101111100101111110101001100111","1101111100101101100001000100101100111","1111101110000001100100001001101100111","1101110100101000001000000100011100111","1111110011110001110100001100111100111","1111110101111001110001111000000010111","1111101011111101101001000101000010111","1111101101111101001010110100100010111","1111101011100101111111101101100010111","1111111011011111010110100111010010111","1111101100100110100000001000001010111","1111011010011000110010110001001010111","1111011010011101110000000100101010111","1111001100101101000000100101101010111","1111111001111001001000000101011010111","1111101011100101010110000000000110111","1111101011111110001100101001000110111","1111100111111001100000101100100110111","1111111010111110110010001111100110111","1111111010111111101010101110110110111","1111100111111001001101011010001110111","1111110110100001100100001000101110111","1111111001111100011110100101101110111","1111110011111001110100000000111110111","1111101011110100100111001000000001111","1111110011111010111101000110000001111","1111001110010100101010100011000001111","1111101100110110101010100100100001111","1101101011000100100001100001100001111","1101110001010000011001000000010001111","1111111010111100111010111011010001111","1101111101111101100001101101110001111","1111001110010001001001110100001001111","1111101011001011011001001001001001111","1111001110000100010010100000101001111","1101000110000001010000100010101001111","1101001000111000100001110101101001111","1111111010111101000011000010011001111","1111111001111111100101001100111001111","1111101011111111101110001000000101111","1111101110111110100010111110000101111","1111101110111111100101011111000101111","1111100111011010100000001010100101111","1101001110101101001001000011100101111","1111111100111110110011010101010101111","1111111010111111001010100011110101111","1111101010100000100100000010001101111","1111101011111011101100101101001101111"};
void add(int x){
	int w = x;
	_have[w]++;
	if(_have[w]==1){
		_ms.erase(w);
	}
}

void del(int x){
	int w = x;
	_have[w]--;
	if(_have[w]==0){
		_ms.insert(w);
	}
}

void out(){
	_ans=0;
	for(int i = 1;i <= 37;i++){
		if(_now[i]){
			_ans++;
		}
	}
	cout << _ans << " ";
	for(int i = 1;i <= 37;i++){
		if(_now[i]){
			cout << i << " ";
		}
	}
	cout << endl;
}
signed main() {
//	freopen("set.in","r",stdin);
//	freopen("set.out","w",stdout);
	for(int i = 1;i <= 37;i++){
		for(int j = 1;j <= 37;j++){
			_gc[i][j]=__gcd(i,j);
		}
	}
	cin >> _t;
	while(_t--){
		cin >> _n;
		int mex = 0,st=0;
		memset(_now,0,sizeof(_now));
		if(_n>=1000000){
			st = (_n/1000000)-1;
			for(int i = 0;i <= 36;i++){
				_now[i+1]=sv[st][i]-'0';
			}
			st=(_n/1000000)*1000000;
			st++;
		}else{
			st = 1;
		}
		for(int k = st;k <= _n;k++){
			for(int i = 1;i <= 37;i++)
				if(_now[i]==0){
					mex = i;
					break;
				}
			_now[mex]=1;
			for(int i = mex-1;i >= 1;i--){
				if(_now[i]){
					_now[i]=0;
				}
			}
			for(int i = 37;i >= 1;i--){
				if(_now[i]){
					for(int j = i+1;j <= 37;j++){
						if(_now[j]){
							if(!_now[_gc[i][j]])_now[_gc[i][j]]=1;
						}
					}
				}
			}
		}
		out();
	}

	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 8
Accepted

Test #1:

score: 8
Accepted
time: 1ms
memory: 4460kb

input:

5
62
37
88
57
72

output:

5 1 2 5 6 7 
6 1 2 3 4 5 6 
4 1 2 6 8 
4 1 3 6 7 
4 1 2 3 8 

result:

ok 5 lines

Test #2:

score: 8
Accepted
time: 1ms
memory: 4228kb

input:

5
88
77
21
87
24

output:

4 1 2 6 8 
4 1 3 4 8 
5 1 2 3 4 5 
3 2 6 8 
2 2 6 

result:

ok 5 lines

Test #3:

score: 8
Accepted
time: 1ms
memory: 4200kb

input:

5
59
5
72
76
95

output:

5 1 2 4 6 7 
2 1 3 
4 1 2 3 8 
4 1 2 4 8 
6 1 2 4 5 6 8 

result:

ok 5 lines

Test #4:

score: 8
Accepted
time: 0ms
memory: 4232kb

input:

5
3
58
50
91
38

output:

2 1 2 
5 1 2 3 6 7 
5 1 2 3 5 7 
5 1 2 4 6 8 
1 7 

result:

ok 5 lines

Test #5:

score: 8
Accepted
time: 1ms
memory: 4460kb

input:

5
6
38
78
60
52

output:

3 1 2 3 
1 7 
5 1 2 3 4 8 
6 1 2 3 4 6 7 
5 1 2 4 5 7 

result:

ok 5 lines

Test #6:

score: 8
Accepted
time: 1ms
memory: 4428kb

input:

5
53
2
54
17
77

output:

5 1 3 4 5 7 
1 2 
6 1 2 3 4 5 7 
4 1 2 3 5 
4 1 3 4 8 

result:

ok 5 lines

Subtask #2:

score: 21
Accepted

Dependency #1:

100%
Accepted

Test #7:

score: 21
Accepted
time: 1051ms
memory: 4168kb

input:

5
967473
149056
95798
903699
54343

output:

14 1 2 3 6 7 9 14 15 17 18 21 22 23 24 
7 1 3 4 8 17 20 21 
9 1 2 5 7 11 15 17 19 20 
17 1 2 3 4 6 7 8 10 12 13 14 18 19 20 21 23 24 
7 1 2 4 8 11 18 19 

result:

ok 5 lines

Test #8:

score: 21
Accepted
time: 1578ms
memory: 4232kb

input:

5
824612
692511
834141
820975
111302

output:

14 1 2 3 4 5 6 7 9 10 11 12 18 23 24 
10 1 2 3 5 6 7 10 13 21 24 
11 1 3 7 8 9 11 13 15 19 23 24 
11 1 3 4 5 8 9 12 15 17 23 24 
10 1 2 3 4 6 11 12 13 16 21 

result:

ok 5 lines

Test #9:

score: 21
Accepted
time: 1235ms
memory: 4224kb

input:

5
115600
813100
742542
206782
714068

output:

13 1 2 3 5 6 7 9 10 11 13 15 17 21 
9 1 2 3 4 11 12 14 23 24 
12 1 2 3 5 6 11 12 14 17 18 22 24 
11 1 2 3 5 7 9 11 12 17 19 22 
14 1 2 3 4 5 6 9 10 13 17 18 19 21 24 

result:

ok 5 lines

Test #10:

score: 21
Accepted
time: 1448ms
memory: 4472kb

input:

5
271953
490598
560137
729339
980828

output:

14 1 2 3 4 6 7 8 9 11 13 16 17 21 22 
12 1 2 3 4 8 11 12 13 14 16 22 23 
12 1 2 4 6 7 10 16 17 18 20 22 23 
12 1 2 3 5 7 8 9 10 13 14 22 24 
17 1 2 3 4 5 6 7 10 11 12 15 17 20 21 22 23 24 

result:

ok 5 lines

Test #11:

score: 21
Accepted
time: 728ms
memory: 4176kb

input:

5
78005
94222
345802
240639
797525

output:

14 1 2 3 4 6 7 9 10 11 12 13 16 17 20 
12 1 2 3 4 5 6 7 11 13 17 19 20 
12 1 2 3 7 8 9 11 13 14 17 18 23 
13 1 2 3 4 5 6 7 10 13 16 18 20 22 
13 1 2 3 6 7 8 9 14 18 19 21 22 24 

result:

ok 5 lines

Test #12:

score: 21
Accepted
time: 1389ms
memory: 4188kb

input:

5
213815
388934
704608
638223
965441

output:

15 1 2 3 4 5 6 9 10 11 13 15 16 17 19 22 
11 1 2 3 4 7 10 13 14 16 20 23 
14 1 2 3 4 5 6 8 9 10 11 13 19 21 24 
8 1 2 4 8 11 14 16 24 
17 1 2 3 4 6 7 8 10 11 12 13 14 18 21 22 23 24 

result:

ok 5 lines

Subtask #3:

score: 41
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #13:

score: 41
Accepted
time: 1244ms
memory: 4232kb

input:

5
264009813
338082986
193952046
78609665
69397288

output:

21 1 2 3 4 5 6 7 8 9 10 12 15 17 18 19 21 24 25 29 33 34 
21 1 2 3 4 5 6 7 8 9 10 12 13 14 15 17 23 24 26 28 31 35 
20 1 2 3 4 5 7 10 11 13 14 15 16 17 20 21 22 23 28 31 34 
17 1 2 3 4 7 8 9 14 16 17 19 20 21 24 27 31 32 
18 1 2 3 4 5 6 7 8 10 13 15 17 18 19 24 26 30 32 

result:

ok 5 lines

Test #14:

score: 41
Accepted
time: 1174ms
memory: 4176kb

input:

5
150219445
322427094
31308257
148721382
412214364

output:

16 1 2 3 4 9 11 13 14 17 18 25 26 27 31 32 33 
16 1 2 3 4 5 7 9 10 11 12 17 21 23 24 27 35 
15 1 2 3 5 8 9 11 13 15 16 17 18 26 27 31 
19 1 2 3 5 8 9 10 11 13 16 17 18 21 22 23 26 31 32 33 
17 1 2 3 4 5 7 9 13 18 20 21 22 26 27 29 34 35 

result:

ok 5 lines

Test #15:

score: 41
Accepted
time: 1769ms
memory: 4236kb

input:

5
151756875
427011464
58969849
244330943
310625967

output:

21 1 2 3 4 5 6 7 8 9 10 11 18 19 20 23 24 27 28 31 32 33 
22 1 2 3 4 5 6 7 8 9 16 17 18 19 20 22 23 26 28 29 31 34 35 
15 1 2 4 5 7 8 10 14 16 19 22 24 25 28 32 
19 1 2 3 4 5 6 8 10 15 16 17 18 23 24 25 29 31 32 34 
25 1 2 3 4 5 6 7 10 11 12 13 14 15 17 20 21 22 23 26 27 28 31 32 33 34 

result:

ok 5 lines

Test #16:

score: 41
Accepted
time: 1318ms
memory: 4472kb

input:

5
179476159
129836662
494167066
336058841
348325607

output:

22 1 2 3 4 5 6 7 8 12 13 15 16 19 21 23 24 25 26 27 28 29 34 
22 1 2 3 4 5 6 8 9 10 11 13 14 17 18 20 22 25 27 28 30 31 33 
17 1 2 3 4 5 6 7 9 10 14 16 18 19 22 25 29 36 
22 1 2 3 4 5 7 8 9 10 11 12 13 14 15 19 20 23 24 25 26 31 35 
22 1 2 3 4 5 6 7 10 11 15 19 22 23 24 25 26 27 28 29 30 31 35 

result:

ok 5 lines

Test #17:

score: 41
Accepted
time: 1532ms
memory: 4240kb

input:

5
337931259
398093956
349469813
381304523
455533754

output:

15 1 2 3 5 6 7 9 13 15 21 22 26 28 31 35 
17 1 2 3 4 5 7 9 11 15 17 19 21 26 31 32 33 35 
18 1 2 3 4 5 7 8 10 11 12 14 15 16 21 25 26 32 35 
17 1 2 3 4 5 10 11 13 15 17 20 22 24 26 31 33 35 
22 1 2 3 4 5 6 7 8 9 10 13 14 16 18 19 20 21 23 26 33 34 35 

result:

ok 5 lines

Test #18:

score: 41
Accepted
time: 1772ms
memory: 4468kb

input:

5
5456876
29594798
37782325
167839691
354330184

output:

17 1 2 3 4 5 6 9 12 13 17 20 21 23 24 25 26 27 
12 1 2 3 4 5 14 16 18 22 25 26 31 
16 1 2 4 5 6 7 10 11 16 17 18 19 22 26 29 31 
18 1 2 3 4 5 6 8 9 10 13 14 15 17 20 23 24 28 34 
19 1 2 3 4 5 6 8 9 10 16 17 20 23 24 26 27 29 32 35 

result:

ok 5 lines

Subtask #4:

score: 14
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #19:

score: 14
Accepted
time: 2127ms
memory: 4188kb

input:

5
518437301
666694742
559265585
512923635
621833328

output:

20 1 2 3 4 5 7 8 9 10 12 13 15 17 19 21 22 23 24 32 36 
24 1 2 3 4 5 6 7 8 11 12 13 15 16 19 21 22 25 29 30 31 32 33 34 36 
25 1 2 3 4 6 7 8 9 10 11 12 13 14 16 19 20 22 23 24 27 28 29 31 33 36 
15 1 2 4 5 7 9 11 14 18 20 27 28 29 31 36 
21 1 2 3 4 5 6 8 9 11 12 16 19 20 21 22 25 26 31 32 34 36 

result:

ok 5 lines

Test #20:

score: 14
Accepted
time: 1856ms
memory: 4228kb

input:

5
633963943
615542568
828135456
568557686
770592955

output:

17 1 2 3 4 7 8 9 11 12 13 14 24 25 26 33 34 36 
16 1 2 3 4 6 7 10 13 17 20 26 28 29 32 34 36 
18 1 2 4 6 7 11 13 14 16 17 19 20 23 26 28 29 32 37 
18 1 2 3 4 5 6 7 11 12 16 17 21 22 26 30 32 33 36 
11 1 2 3 4 5 9 10 13 19 29 37 

result:

ok 5 lines

Test #21:

score: 14
Accepted
time: 1426ms
memory: 4168kb

input:

5
872589670
817203941
677799344
886039387
913475137

output:

20 1 2 3 4 5 6 8 11 12 15 16 17 19 23 25 26 27 30 33 37 
19 1 2 3 4 5 6 7 8 10 12 13 15 16 18 22 24 26 32 37 
23 1 2 3 4 5 6 7 9 10 12 13 14 16 19 21 22 23 25 26 28 31 35 36 
20 1 2 3 4 5 6 8 10 11 17 19 22 23 24 26 27 29 31 33 37 
27 1 2 3 4 5 6 7 8 10 11 12 13 14 16 19 20 21 22 23 24 25 27 28 31 3...

result:

ok 5 lines

Test #22:

score: 14
Accepted
time: 1238ms
memory: 4220kb

input:

5
670654397
910193787
921254051
975272734
607399529

output:

18 1 2 3 5 6 7 10 11 12 13 14 18 19 21 23 29 35 36 
20 1 2 3 4 5 6 7 9 10 12 13 19 20 21 23 26 31 32 33 37 
27 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 18 19 20 21 23 29 30 31 32 33 37 
17 1 2 3 5 6 9 14 22 23 25 26 28 29 30 31 34 37 
18 1 2 4 5 6 7 10 11 16 22 23 25 28 29 30 31 34 36 

result:

ok 5 lines

Test #23:

score: 14
Accepted
time: 1556ms
memory: 4192kb

input:

5
628012728
924251460
522922329
904744468
644444189

output:

20 1 2 3 4 6 8 12 14 16 17 19 20 22 26 28 29 31 32 34 36 
18 1 2 4 6 7 8 10 12 14 16 17 18 19 20 22 24 34 37 
19 1 2 3 4 6 7 8 9 10 12 14 17 18 22 23 24 29 32 36 
15 1 2 3 4 6 11 12 17 21 22 26 30 32 33 37 
22 1 2 3 4 5 6 8 10 11 12 14 15 16 18 19 20 25 28 31 33 34 36 

result:

ok 5 lines

Test #24:

score: 14
Accepted
time: 1020ms
memory: 4248kb

input:

5
980123780
914372233
788153300
820127076
873721786

output:

19 1 2 3 5 7 10 11 13 14 16 17 21 23 25 26 27 32 34 37 
24 1 2 3 4 5 6 7 8 10 11 15 17 18 19 20 21 22 23 24 29 31 32 33 37 
20 1 2 3 4 6 9 11 12 13 14 15 17 19 23 26 27 28 29 30 37 
11 1 4 5 8 11 16 23 24 28 32 37 
21 1 2 3 4 5 6 7 9 10 12 13 14 15 21 25 26 27 28 30 33 37 

result:

ok 5 lines

Subtask #5:

score: 16
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #25:

score: 16
Accepted
time: 1810ms
memory: 4240kb

input:

5
1358094333
1154803687
1277000267
1417906383
1326768836

output:

18 1 2 3 4 7 8 13 14 16 17 19 20 23 28 31 34 36 37 
20 1 2 3 4 5 8 10 11 13 16 17 20 23 25 26 29 32 33 35 37 
26 1 2 3 4 5 6 7 8 9 10 11 12 16 17 19 21 22 23 24 25 26 28 30 31 36 37 
22 1 2 3 4 5 6 7 8 10 13 15 20 21 23 25 28 29 32 33 34 36 37 
17 1 2 3 4 5 9 15 18 20 23 26 27 28 32 33 36 37 

result:

ok 5 lines

Test #26:

score: 16
Accepted
time: 1212ms
memory: 4228kb

input:

5
1100135829
1287342975
1408078880
1246372296
1263782767

output:

21 1 2 3 4 5 6 7 11 12 13 14 15 16 21 23 25 27 28 31 35 37 
22 1 2 3 4 5 6 7 9 10 11 14 18 19 20 21 23 26 28 29 32 36 37 
21 1 2 3 4 5 8 10 11 13 15 16 18 21 25 26 29 31 33 34 36 37 
24 1 2 3 4 5 6 7 10 12 14 15 16 18 19 23 25 28 29 31 32 33 34 35 37 
21 1 2 3 4 5 6 7 8 9 11 12 13 15 16 18 24 28 29 ...

result:

ok 5 lines

Test #27:

score: 16
Accepted
time: 1383ms
memory: 4248kb

input:

5
1306529540
1338402393
1435825745
1298031139
1263046790

output:

9 1 3 4 13 19 28 33 36 37 
22 1 2 3 4 5 6 7 9 10 11 13 14 19 20 21 27 30 31 32 33 36 37 
24 1 2 3 4 5 6 7 8 9 10 12 13 14 16 19 24 25 26 27 28 30 35 36 37 
22 1 2 3 4 5 6 7 9 11 12 13 14 16 22 23 25 26 29 31 32 36 37 
21 1 2 4 5 6 7 8 10 11 12 14 16 19 20 22 24 26 29 30 36 37 

result:

ok 5 lines

Test #28:

score: 16
Accepted
time: 1763ms
memory: 4392kb

input:

5
1299841326
1050490081
1319190964
1496700273
1351264279

output:

19 1 2 3 4 6 8 9 13 15 18 19 23 26 28 29 31 32 36 37 
22 1 2 3 4 5 6 7 9 10 12 14 17 21 23 26 27 28 30 31 33 34 37 
20 1 3 4 5 7 8 9 12 16 17 19 20 23 24 27 29 31 33 36 37 
27 1 2 3 4 5 6 7 8 9 10 12 13 15 16 17 18 20 21 22 25 27 30 32 34 35 36 37 
24 1 2 3 4 5 6 7 8 10 12 13 14 16 17 18 20 21 22 23...

result:

ok 5 lines

Test #29:

score: 16
Accepted
time: 1179ms
memory: 4236kb

input:

5
1126333587
1363542178
1219832547
1117001699
1052017949

output:

26 1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 18 19 22 23 25 26 29 31 32 35 37 
18 1 2 4 5 11 13 14 16 17 19 22 25 28 29 31 34 36 37 
23 1 2 3 4 5 6 7 8 9 11 14 16 17 18 19 22 23 25 29 33 34 35 37 
21 1 2 3 4 5 6 7 8 9 11 15 16 19 20 23 27 28 29 32 35 37 
20 1 2 3 4 5 8 9 10 11 13 21 23 25 27 29 30 31 33 3...

result:

ok 5 lines

Test #30:

score: 16
Accepted
time: 2413ms
memory: 4236kb

input:

5
1419871457
1342818229
1195637683
1225498668
1123546639

output:

22 1 2 3 4 5 6 9 11 13 14 15 16 19 23 27 28 30 32 33 34 36 37 
15 1 2 3 4 5 6 8 9 13 16 26 27 34 36 37 
24 1 2 3 4 5 6 7 8 9 10 11 12 13 14 18 19 20 22 24 27 32 34 35 37 
23 1 2 3 4 5 7 10 13 14 15 16 20 23 25 26 27 28 29 30 33 34 35 37 
23 1 2 3 4 5 6 7 8 10 11 13 15 16 17 21 24 25 26 27 31 32 35 37 

result:

ok 5 lines