QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#928259#10124. King's Festival中国入民小学附属信息I队 (Zicheng Wang, Shubang Liu, Minkai Shao)#AC ✓35ms3712kbC++143.6kb2025-03-08 09:49:552025-03-08 09:50:03

Judging History

This is the latest submission verdict.

  • [2025-03-08 09:50:03]
  • Judged
  • Verdict: AC
  • Time: 35ms
  • Memory: 3712kb
  • [2025-03-08 09:49:55]
  • Submitted

answer

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <cstring>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <random>
#include <ctime>
#include <chrono>
#include <iomanip>
#include <cassert>

typedef long long ll;
typedef double lf;

// #define DEBUG 1
struct IO
{
    #define MAXSIZE (1 << 20)
    #define isdigit(x) (x >= '0' && x <= '9')
    char buf[MAXSIZE], *p1, *p2;
    char pbuf[MAXSIZE], *pp;
    #if DEBUG
    #else
    IO() : p1(buf), p2(buf), pp(pbuf) {}
    ~IO() {fwrite(pbuf, 1, pp - pbuf, stdout);}
    #endif
    #define gc() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, MAXSIZE, stdin), p1 == p2) ? ' ' : *p1++)
    #define blank(x) (x == ' ' || x == '\n' || x == '\r' || x == '\t')

    template <typename T>
    void Read(T &x)
    {
        #if DEBUG
        std::cin >> x;
        #else
        bool sign = 0; char ch = gc(); x = 0;
        for (; !isdigit(ch); ch = gc())
            if (ch == '-') sign = 1;
        for (; isdigit(ch); ch = gc()) x = x * 10 + (ch ^ 48);
        if (sign) x = -x;
        #endif
    }
    void Read(char *s)
    {
        #if DEBUG
        std::cin >> s;
        #else
        char ch = gc();
        for (; blank(ch); ch = gc());
        for (; !blank(ch); ch = gc()) *s++ = ch;
        *s = 0;
        #endif
    }
    void Read(char &c) {for (c = gc(); blank(c); c = gc());}

    void Push(const char &c)
    {
        #if DEBUG
        putchar(c);
        #else
        if (pp - pbuf == MAXSIZE) fwrite(pbuf, 1, MAXSIZE, stdout), pp = pbuf;
        *pp++ = c;
        #endif
    }
    template <typename T>
    void Write(T x)
    {
        if (x < 0) x = -x, Push('-');
        static T sta[35];
        int top = 0;
        do sta[top++] = x % 10, x /= 10; while (x);
        while (top) Push(sta[--top] ^ 48);
    }
    template <typename T>
    void Write(T x, char lst) {Write(x), Push(lst);}
} IO;
#define Read(x) IO.Read(x)
#define Write(x, y) IO.Write(x, y)
#define Put(x) IO.Push(x)

using namespace std;

int n, cnt = 0, tmp;
char str[105];
ll res;

void dfs(ll s, int dep, int c)
{
    if (c > tmp) return;
    if (dep == n)
    {
        if (c < tmp) tmp = c, res = s;
        return;
    }

    dfs(s | (1ll << dep), dep + 1, c + 1);
    if ((s >> dep) & 1) return;
    for (int x = 1; x <= dep / 2; x++)
        if (!(s & (1ll << (dep - x))) && !(s & (1ll << (dep - x - x)))) return;
    dfs(s, dep + 1, c);
}

int main()
{
    // freopen(".in", "r", stdin);
    // freopen("k.out", "w", stdout);
    #if DEBUG
    #else
    ios::sync_with_stdio(0), cin.tie(0);
    #endif

    cin >> str, n = strlen(str); int m1 = 0, m2 = 0;
    if (n == 1) return cout << "1\n#", 0;
    ll S1 = 0, S2 = 0;
    for (int i = 0; i < n; i += 2)
    {
        if (str[i] == '#') S1 |= (1ll << m1);
        m1++;
    }
    for (int i = 1; i < n; i += 2)
    {
        if (str[i] == '#') S2 |= (1ll << m2);
        m2++;
    }
    
    tmp = 1005, n = m1, dfs(S1, 0, 0);
    int ans = tmp + m2; ll R = res;

    tmp = 1005, n = m2, dfs(S2, 0, 0);
    cout << min(ans, m1 + tmp) << "\n";
    if (ans < m1 + tmp)
    {
        int c = 0;
        for (int i = 0; i < m1 + m2; i++)
        {
            if (i & 1) cout << '#';
            else cout << (((R >> c) & 1) ? '#' : '.'), c++;
        }
    }
    else
    {
        int c = 0;
        for (int i = 0; i < m1 + m2; i++)
        {
            if (!(i & 1)) cout << '#';
            else cout << (((res >> c) & 1) ? '#' : '.'), c++;
        }
    }
    return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:

......

output:

4
###.#.

result:

ok Accepted. Used 4 queens.

Test #2:

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

input:

.#.#...

output:

4
.###.#.

result:

ok Accepted. Used 4 queens.

Test #3:

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

input:

.....

output:

3
#.#.#

result:

ok Accepted. Used 3 queens.

Test #4:

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

input:

.###.

output:

3
.###.

result:

ok Accepted. Used 3 queens.

Test #5:

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

input:

.#.##

output:

3
.#.##

result:

ok Accepted. Used 3 queens.

Test #6:

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

input:

.#.#.#

output:

4
##.#.#

result:

ok Accepted. Used 4 queens.

Test #7:

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

input:

#.#.#.

output:

4
###.#.

result:

ok Accepted. Used 4 queens.

Test #8:

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

input:

###...

output:

4
###.#.

result:

ok Accepted. Used 4 queens.

Test #9:

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

input:

...###

output:

4
.#.###

result:

ok Accepted. Used 4 queens.

Test #10:

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

input:

....

output:

2
#.#.

result:

ok Accepted. Used 2 queens.

Test #11:

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

input:

..

output:

1
#.

result:

ok Accepted. Used 1 queens.

Test #12:

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

input:

#.

output:

1
#.

result:

ok Accepted. Used 1 queens.

Test #13:

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

input:

.#

output:

1
.#

result:

ok Accepted. Used 1 queens.

Test #14:

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

input:

##

output:

2
##

result:

ok Accepted. Used 2 queens.

Test #15:

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

input:

.

output:

1
#

result:

ok Accepted. Used 1 queens.

Test #16:

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

input:

#

output:

1
#

result:

ok Accepted. Used 1 queens.

Test #17:

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

input:

...............

output:

11
#####.#.###.#.#

result:

ok Accepted. Used 11 queens.

Test #18:

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

input:

.....#####.....

output:

11
#.#.#######.#.#

result:

ok Accepted. Used 11 queens.

Test #19:

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

input:

#####.....#####

output:

13
#######.#.#####

result:

ok Accepted. Used 13 queens.

Test #20:

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

input:

...#........#..

output:

11
#####.#.###.#.#

result:

ok Accepted. Used 11 queens.

Test #21:

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

input:

.....#.....#...

output:

11
###.###.#.###.#

result:

ok Accepted. Used 11 queens.

Test #22:

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

input:

........................................

output:

31
#.###.#####.#.#########.###.#.#######.#.

result:

ok Accepted. Used 31 queens.

Test #23:

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

input:

...#.............................#.....#

output:

31
.###.#####.#.#########.###.#.#######.#.#

result:

ok Accepted. Used 31 queens.

Test #24:

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

input:

.........................................

output:

32
#.###.#####.#.#########.###.#.#######.#.#

result:

ok Accepted. Used 32 queens.

Test #25:

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

input:

.........#.............#.........#......#

output:

32
#.#.#######.#.###.#########.#.#####.###.#

result:

ok Accepted. Used 32 queens.

Test #26:

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

input:

##..........######............######.#.##

output:

33
###.#.###.#.#########.#.###.#.###########

result:

ok Accepted. Used 33 queens.

Test #27:

score: 0
Accepted
time: 31ms
memory: 3584kb

input:

................................................................

output:

51
#.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 51 queens.

Test #28:

score: 0
Accepted
time: 35ms
memory: 3584kb

input:

...............................................................#

output:

51
.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.#

result:

ok Accepted. Used 51 queens.

Test #29:

score: 0
Accepted
time: 22ms
memory: 3712kb

input:

##..............................................................

output:

52
#####.###.#.#######.#.###.#################.###.#.#######.#.###.

result:

ok Accepted. Used 52 queens.

Test #30:

score: 0
Accepted
time: 4ms
memory: 3712kb

input:

...#.......#.####.....####.........#.#...##.............##.....#

output:

53
#######.#.#######.###.#######.#########.###.#.#######.#.###.####

result:

ok Accepted. Used 53 queens.

Test #31:

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

input:

################################################################

output:

64
################################################################

result:

ok Accepted. Used 64 queens.

Test #32:

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

input:

.......###################......................################

output:

56
###.#.#####################.###.#.#######.###.#.################

result:

ok Accepted. Used 56 queens.

Test #33:

score: 0
Accepted
time: 29ms
memory: 3584kb

input:

............................#...................................

output:

51
#.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 51 queens.

Test #34:

score: 0
Accepted
time: 29ms
memory: 3712kb

input:

.............................#..................................

output:

51
#.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 51 queens.

Test #35:

score: 0
Accepted
time: 27ms
memory: 3584kb

input:

...............................................................

output:

50
.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 50 queens.

Test #36:

score: 0
Accepted
time: 23ms
memory: 3584kb

input:

#..............................................................

output:

51
###.###.#.#######.#.###.#################.###.#.#######.#.###.#

result:

ok Accepted. Used 51 queens.

Test #37:

score: 0
Accepted
time: 24ms
memory: 3584kb

input:

.#.............................................................

output:

50
.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 50 queens.

Test #38:

score: 0
Accepted
time: 29ms
memory: 3584kb

input:

.............................................................#.

output:

50
.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 50 queens.

Test #39:

score: 0
Accepted
time: 16ms
memory: 3712kb

input:

.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.

output:

50
.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 50 queens.

Test #40:

score: 0
Accepted
time: 12ms
memory: 3712kb

input:

#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#

output:

51
###.###.#.#######.#.###.#################.###.#.#######.#.###.#

result:

ok Accepted. Used 51 queens.

Test #41:

score: 0
Accepted
time: 17ms
memory: 3584kb

input:

#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.

output:

51
#.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 51 queens.

Test #42:

score: 0
Accepted
time: 17ms
memory: 3584kb

input:

.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#

output:

51
.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.#

result:

ok Accepted. Used 51 queens.

Test #43:

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

input:

...

output:

1
.#.

result:

ok Accepted. Used 1 queens.

Test #44:

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

input:

..#

output:

2
#.#

result:

ok Accepted. Used 2 queens.

Test #45:

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

input:

.#.

output:

1
.#.

result:

ok Accepted. Used 1 queens.

Test #46:

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

input:

#..

output:

2
#.#

result:

ok Accepted. Used 2 queens.

Test #47:

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

input:

.##

output:

2
.##

result:

ok Accepted. Used 2 queens.

Test #48:

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

input:

#.#

output:

2
#.#

result:

ok Accepted. Used 2 queens.

Test #49:

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

input:

##.

output:

2
##.

result:

ok Accepted. Used 2 queens.

Test #50:

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

input:

###

output:

3
###

result:

ok Accepted. Used 3 queens.

Test #51:

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

input:

.......

output:

4
.###.#.

result:

ok Accepted. Used 4 queens.

Test #52:

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

input:

........

output:

5
#.###.#.

result:

ok Accepted. Used 5 queens.

Test #53:

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

input:

.........

output:

5
.#.###.#.

result:

ok Accepted. Used 5 queens.

Test #54:

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

input:

..........

output:

6
#.#.###.#.

result:

ok Accepted. Used 6 queens.

Test #55:

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

input:

...........

output:

7
#.#.###.#.#

result:

ok Accepted. Used 7 queens.

Test #56:

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

input:

............

output:

8
###.#.###.#.

result:

ok Accepted. Used 8 queens.

Test #57:

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

input:

.............

output:

9
###.#.###.#.#

result:

ok Accepted. Used 9 queens.

Test #58:

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

input:

.###############################################################

output:

63
.###############################################################

result:

ok Accepted. Used 63 queens.

Test #59:

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

input:

###############################################################.

output:

63
###############################################################.

result:

ok Accepted. Used 63 queens.

Test #60:

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

input:

.....#.#...##...#..#...#.#..##

output:

22
.#.###.#.#########.#.###.#.###

result:

ok Accepted. Used 22 queens.

Test #61:

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

input:

.#.#.###..#...##......#......#.

output:

23
.#.#####.###.#####.#.#####.###.

result:

ok Accepted. Used 23 queens.

Test #62:

score: 0
Accepted
time: 32ms
memory: 3584kb

input:

............................................................#...

output:

51
#.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 51 queens.

Test #63:

score: 0
Accepted
time: 25ms
memory: 3584kb

input:

..................................................#..#..........

output:

51
#.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 51 queens.

Test #64:

score: 0
Accepted
time: 21ms
memory: 3712kb

input:

.............#.#....................................#...........

output:

51
.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.#

result:

ok Accepted. Used 51 queens.

Test #65:

score: 0
Accepted
time: 19ms
memory: 3712kb

input:

....................#............#.#....#....................#..

output:

52
#####.###.#.#######.#.###.#################.###.#.#######.#.###.

result:

ok Accepted. Used 52 queens.

Test #66:

score: 0
Accepted
time: 12ms
memory: 3584kb

input:

............#...#.....#......#.#...............#......##........

output:

52
###.###.#####.#.#####.###.###############.###.#####.#.#####.###.

result:

ok Accepted. Used 52 queens.

Test #67:

score: 0
Accepted
time: 2ms
memory: 3584kb

input:

#.#..##.##.#.#..##.#.#...#...#..#.........#..#.#..#.....##.####.

output:

54
#.#.###################.#######.#####.###.#######.###.#.#######.

result:

ok Accepted. Used 54 queens.

Test #68:

score: 0
Accepted
time: 30ms
memory: 3584kb

input:

..............................................................#

output:

51
###.###.#.#######.#.###.#################.###.#.#######.#.###.#

result:

ok Accepted. Used 51 queens.

Test #69:

score: 0
Accepted
time: 20ms
memory: 3584kb

input:

.....................#............#............................

output:

50
.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 50 queens.

Test #70:

score: 0
Accepted
time: 20ms
memory: 3712kb

input:

......................#....#..............#....................

output:

51
###.###.#.#######.#.###.#################.###.#.#######.#.###.#

result:

ok Accepted. Used 51 queens.

Test #71:

score: 0
Accepted
time: 13ms
memory: 3584kb

input:

...............#..........#...#............#....#..............

output:

50
.#.###.#######.#.###.###############.#####.#.#####.###.#####.#.

result:

ok Accepted. Used 50 queens.

Test #72:

score: 0
Accepted
time: 10ms
memory: 3584kb

input:

...#.##...#..........#...............#.......#.....#...........

output:

50
.#.#####.###.#####.#.#####.###############.###.#.#######.###.#.

result:

ok Accepted. Used 50 queens.

Test #73:

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

input:

..##....##......#.##.#.#.............##.###.#####...##.#.##...#

output:

51
.###.#.###.#############.#.#######.#.#############.###.#.###.##

result:

ok Accepted. Used 51 queens.

Test #74:

score: 0
Accepted
time: 24ms
memory: 3584kb

input:

..............................................................

output:

50
###.###.#.#######.#.###.#################.###.#.#######.#.###.

result:

ok Accepted. Used 50 queens.

Test #75:

score: 0
Accepted
time: 21ms
memory: 3712kb

input:

.............................................................

output:

49
#.###.#.#######.#.###.#################.###.#.#######.#.###.#

result:

ok Accepted. Used 49 queens.

Test #76:

score: 0
Accepted
time: 18ms
memory: 3584kb

input:

............................................................

output:

48
#.###.#.#######.#.###.#################.###.#.#######.#.###.

result:

ok Accepted. Used 48 queens.

Test #77:

score: 0
Accepted
time: 15ms
memory: 3584kb

input:

...........................................................

output:

47
.###.#.#######.#.###.#################.###.#.#######.#.###.

result:

ok Accepted. Used 47 queens.

Test #78:

score: 0
Accepted
time: 11ms
memory: 3584kb

input:

..........................................................

output:

47
#######.###.#.#######.#.###.#########.#######.###.#####.#.

result:

ok Accepted. Used 47 queens.

Test #79:

score: 0
Accepted
time: 9ms
memory: 3584kb

input:

.........................................................

output:

46
#####.###.#.#######.#.###.#########.#######.###.#####.#.#

result:

ok Accepted. Used 46 queens.

Test #80:

score: 0
Accepted
time: 7ms
memory: 3584kb

input:

#.#..........#......#.............#...#.#...##.#.........#....#

output:

51
#.###.#.#######.###.###############.#####.#.#####.###.#####.#.#

result:

ok Accepted. Used 51 queens.

Test #81:

score: 0
Accepted
time: 7ms
memory: 3712kb

input:

#.........#.....#.....###...................###..#.....#....#..

output:

51
##.###.#.###.#############.#.#######.#.#############.###.#.###.

result:

ok Accepted. Used 51 queens.

Test #82:

score: 0
Accepted
time: 10ms
memory: 3584kb

input:

#.........#.....#.....##....................###..#.....#....#..#

output:

52
##.###.#.###.#############.#.#######.#.#############.###.#.###.#

result:

ok Accepted. Used 52 queens.

Test #83:

score: 0
Accepted
time: 9ms
memory: 3584kb

input:

........##.....#.#..................#.#........#....#....####...

output:

52
###.#.#####.#.###########.#####.###.#####.###########.#.#####.#.

result:

ok Accepted. Used 52 queens.

Test #84:

score: 0
Accepted
time: 9ms
memory: 3584kb

input:

#................#.#.#....#............#.#..#.#.........#...#..#

output:

52
#.###.#.###.#############.#.#######.#.#############.###.#.###.##

result:

ok Accepted. Used 52 queens.

Test #85:

score: 0
Accepted
time: 6ms
memory: 3584kb

input:

.#....#......#.###....#.............#...#.#.#.#.................

output:

52
#####.###.#.#######.#.###.#################.###.#.#######.#.###.

result:

ok Accepted. Used 52 queens.

Test #86:

score: 0
Accepted
time: 6ms
memory: 3584kb

input:

###.#...........#.......#.........#....#....##.........##.......

output:

52
#####.###.#.#######.#.###.#################.###.#.#######.#.###.

result:

ok Accepted. Used 52 queens.

Test #87:

score: 0
Accepted
time: 3ms
memory: 3712kb

input:

#.##..#......#......#..##.......#.#...#.#...##.#......#..#....#

output:

51
#.###.#.#######.###.###############.#####.#.#####.###.#####.#.#

result:

ok Accepted. Used 51 queens.

Test #88:

score: 0
Accepted
time: 2ms
memory: 3584kb

input:

.#...#........######...#.#.........#....###.#....##.........#..

output:

51
##.###.#.###.#############.#.#######.#.#############.###.#.###.

result:

ok Accepted. Used 51 queens.

Test #89:

score: 0
Accepted
time: 2ms
memory: 3584kb

input:

##...#.........#..#....##.#......#.#....#....#..##..##.#.#.....

output:

51
##.###.#######.#.###.###############.#####.#.#####.###.#####.#.

result:

ok Accepted. Used 51 queens.

Test #90:

score: 0
Accepted
time: 2ms
memory: 3584kb

input:

###.#...........#.......#........##...##....##.....##..###.#...

output:

52
#####.#.#########.###.#.#######.###########.###.#.###.#######.#

result:

ok Accepted. Used 52 queens.

Test #91:

score: 0
Accepted
time: 4ms
memory: 3584kb

input:

#.##..#......#......#..##.......#.#...#.#...##.#......#..#....#.

output:

52
#.###.#.#######.###.###############.#####.#.#####.###.#####.#.##

result:

ok Accepted. Used 52 queens.

Test #92:

score: 0
Accepted
time: 4ms
memory: 3712kb

input:

#........#.......#.#.#....#.........#.##.#..#.##....#...#..##..#

output:

52
#.###.#.###.#############.#.#######.#.#############.###.#.###.##

result:

ok Accepted. Used 52 queens.

Test #93:

score: 0
Accepted
time: 5ms
memory: 3584kb

input:

#.#..........#......#..##.......#.#...#.#...##.#.........#....#

output:

51
#.###.#.#######.###.###############.#####.#.#####.###.#####.#.#

result:

ok Accepted. Used 51 queens.

Test #94:

score: 0
Accepted
time: 5ms
memory: 3584kb

input:

#.........#.....#.#...###..#................###..#.....#.#..#..

output:

51
##.###.#.###.#############.#.#######.#.#############.###.#.###.

result:

ok Accepted. Used 51 queens.

Test #95:

score: 0
Accepted
time: 5ms
memory: 3584kb

input:

...#...#......#...#.#...........#..#.#....#..##.#..#.........##

output:

51
.###.#.###.#############.#.#######.#.#############.###.#.###.##

result:

ok Accepted. Used 51 queens.

Test #96:

score: 0
Accepted
time: 3ms
memory: 3712kb

input:

##...#.........#..#..............#.#....#....#..##..##.#.#.....

output:

51
##.###.#######.#.###.###############.#####.#.#####.###.#####.#.

result:

ok Accepted. Used 51 queens.

Test #97:

score: 0
Accepted
time: 3ms
memory: 3712kb

input:

...........#.##......#..#.#.#..#.....##...#..#..#..#..........#

output:

51
#.###.#.#######.###.###############.#####.#.#####.###.#####.#.#

result:

ok Accepted. Used 51 queens.

Test #98:

score: 0
Accepted
time: 6ms
memory: 3584kb

input:

#.........#.....#.#...##...#................###..#.....#.#..#..#

output:

52
##.###.#.###.#############.#.#######.#.#############.###.#.###.#

result:

ok Accepted. Used 52 queens.

Test #99:

score: 0
Accepted
time: 5ms
memory: 3584kb

input:

........##.....#.#......#...........#.#........#..###....####...

output:

52
###.#.#####.#.###########.#####.###.#####.###########.#.#####.#.

result:

ok Accepted. Used 52 queens.

Test #100:

score: 0
Accepted
time: 5ms
memory: 3584kb

input:

#........#.......#.#.#....#...........##.#..#.#.....#...#...#..#

output:

52
#.###.#.###.#############.#.#######.#.#############.###.#.###.##

result:

ok Accepted. Used 52 queens.

Test #101:

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

input:

.#.#.#....#...######...#.#.........#....###.#....##.........##.

output:

51
##.###.#.###.#############.#.#######.#.#############.###.#.###.

result:

ok Accepted. Used 51 queens.

Test #102:

score: 0
Accepted
time: 2ms
memory: 3712kb

input:

.##..##.....######..###........#....#...#.#.###.......#........

output:

52
###.#####.#.###########.#####.###.#####.###########.#.#####.#.#

result:

ok Accepted. Used 52 queens.

Test #103:

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

input:

###.#...........#.......#....#...##..###.#..##.....##..###.#...

output:

52
#####.#.#########.###.#.#######.###########.###.#.###.#######.#

result:

ok Accepted. Used 52 queens.

Test #104:

score: 0
Accepted
time: 2ms
memory: 3712kb

input:

.#.#.#....#...######...#.#.........#....###.#....##.........##..

output:

52
##.###.#.###.#############.#.#######.#.#############.###.#.###.#

result:

ok Accepted. Used 52 queens.

Test #105:

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

input:

###.#...........#.......#....#...##...##.#..##.....##..###.#...#

output:

53
#####.#.#########.###.#.#######.###########.###.#.###.#######.##

result:

ok Accepted. Used 53 queens.

Extra Test:

score: 0
Extra Test Passed