QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#955560#10124. King's FestivalIllusionaryDominance#AC ✓2ms3712kbC++201.3kb2025-03-29 15:02:472025-03-29 15:02:58

Judging History

This is the latest submission verdict.

  • [2025-03-29 15:02:58]
  • Judged
  • Verdict: AC
  • Time: 2ms
  • Memory: 3712kb
  • [2025-03-29 15:02:47]
  • Submitted

answer

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int MAX_N = 1 << 16;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    
    string s, cur, ans;
    cin >> s; cur = s;
    if ((int)s.size() == 1) {
        cout << "1\n#\n";
        return 0;
    }
    for (auto &ch : cur) ch = '#';
    ans = cur;
    int n = s.size(), bs = 0;
    auto dfs = [&](auto &&dfs, int i, int m, int d, int cnt, ll mask) -> void {
        if (i == m) {
            if (bs < cnt) {
                bs = cnt;
                ans = cur;
            }
            return ;
        }
        if ((m - i + 1 >> 1) + cnt < bs) return ;
        mask <<= 1;
        if (s[i << 1 | d] != '#') {
            bool flag = true;
            for (int j = 1; j <= (i >> 1); j ++) {
                if ((mask >> j & 1) && (mask >> (j << 1) & 1)) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                cur[i << 1 | d] = '.';
                dfs(dfs, i + 1, m, d, cnt + 1, mask | 1);
                cur[i << 1 | d] = '#';
            }
        }
        dfs(dfs, i + 1, m, d, cnt, mask);
    };
    dfs(dfs, 0, n + 1 >> 1, 0, 0, 0);
    dfs(dfs, 0, n >> 1, 1, 0, 0);
    cout << n - bs << '\n' << ans << '\n';
    
    return 0;
}

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

詳細信息

Test #1:

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

input:

......

output:

4
.#.###

result:

ok Accepted. Used 4 queens.

Test #2:

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

input:

.#.#...

output:

4
.#.###.

result:

ok Accepted. Used 4 queens.

Test #3:

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

input:

.....

output:

3
.#.##

result:

ok Accepted. Used 3 queens.

Test #4:

score: 0
Accepted
time: 0ms
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: 3712kb

input:

...###

output:

4
.#.###

result:

ok Accepted. Used 4 queens.

Test #10:

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

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: 0ms
memory: 3712kb

input:

#.

output:

1
#.

result:

ok Accepted. Used 1 queens.

Test #13:

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

input:

.#

output:

1
.#

result:

ok Accepted. Used 1 queens.

Test #14:

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

input:

##

output:

2
##

result:

ok Accepted. Used 2 queens.

Test #15:

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

input:

.

output:

1
#

result:

ok Accepted. Used 1 queens.

Test #16:

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

input:

#

output:

1
#

result:

ok Accepted. Used 1 queens.

Test #17:

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

input:

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

output:

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

result:

ok Accepted. Used 11 queens.

Test #18:

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

input:

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

output:

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

result:

ok Accepted. Used 11 queens.

Test #19:

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

input:

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

output:

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

result:

ok Accepted. Used 13 queens.

Test #20:

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

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: 1ms
memory: 3712kb

input:

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

output:

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

result:

ok Accepted. Used 32 queens.

Test #26:

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

input:

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

output:

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

result:

ok Accepted. Used 33 queens.

Test #27:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #28:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #29:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #30:

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

input:

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

output:

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

result:

ok Accepted. Used 53 queens.

Test #31:

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

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: 0ms
memory: 3712kb

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #34:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #35:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #36:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #37:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #38:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #39:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #40:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #41:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #42:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #43:

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

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: 3712kb

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: 3712kb

input:

###

output:

3
###

result:

ok Accepted. Used 3 queens.

Test #51:

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

input:

.......

output:

4
.#.###.

result:

ok Accepted. Used 4 queens.

Test #52:

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

input:

........

output:

5
.#.###.#

result:

ok Accepted. Used 5 queens.

Test #53:

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

input:

.........

output:

5
.#.###.#.

result:

ok Accepted. Used 5 queens.

Test #54:

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

input:

..........

output:

6
.#.###.#.#

result:

ok Accepted. Used 6 queens.

Test #55:

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

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: 0ms
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: 3712kb

input:

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

output:

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

result:

ok Accepted. Used 22 queens.

Test #61:

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

input:

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

output:

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

result:

ok Accepted. Used 23 queens.

Test #62:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #63:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #64:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #65:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #66:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #67:

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

input:

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

output:

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

result:

ok Accepted. Used 54 queens.

Test #68:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #69:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #70:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #71:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #72:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #73:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #74:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #75:

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

input:

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

output:

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

result:

ok Accepted. Used 49 queens.

Test #76:

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

input:

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

output:

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

result:

ok Accepted. Used 48 queens.

Test #77:

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

input:

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

output:

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

result:

ok Accepted. Used 47 queens.

Test #78:

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

input:

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

output:

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

result:

ok Accepted. Used 47 queens.

Test #79:

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

input:

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

output:

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

result:

ok Accepted. Used 46 queens.

Test #80:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #81:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #82:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #83:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #84:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #85:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #86:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #87:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #88:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #89:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #90:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #91:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #92:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #93:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #94:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #95:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #96:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #97:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #98:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #99:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #100:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #101:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #102:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #103:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #104:

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

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