QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#958510#10124. King's Festival36champ#AC ✓26ms3712kbC++201.6kb2025-03-31 01:36:172025-03-31 01:36:18

Judging History

This is the latest submission verdict.

  • [2025-03-31 01:36:18]
  • Judged
  • Verdict: AC
  • Time: 26ms
  • Memory: 3712kb
  • [2025-03-31 01:36:17]
  • Submitted

answer

#include <bits/stdc++.h>
#define ll long long
#define pb push_back

using namespace std;

void dfs(int i, int &n, vector<bool> &used, int &cnt, int &ans, string &s, string &t)
{
    if(cnt >= ans) return;

    if(i >= n)
    {
        ans = cnt;
        for(int k=0; k<n; k++)
        {
            if(used[k] || (k % 2) != (i % 2)) t[k] = '#';
            else t[k] = '.';
        }
        return;
    }

    if(s[i] == '#')
    {
        dfs(i + 2, n, used, cnt, ans, s, t);
        return;
    }

    bool ok = true;

    for(int j = 2; i - 2 * j >= 0; j += 2)
    {
        if(!ok) break;
        if(!used[i - j] && !used[i - 2 * j]) ok = false;
    }

    if(ok) dfs(i + 2, n, used, cnt, ans, s, t);

    used[i] = true;
    cnt++;
    dfs(i + 2, n, used, cnt, ans, s, t);
    used[i] = false;
    cnt--;
}

int main()
{
    ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	string s;
	cin >> s;

	int n = s.size(), ans = n;
	string t(n, '#');

	if(n == 1)
    {
        cout << "1\n#";
        return 0;
    }

	vector<bool> used(n, false);
	int cnt = 0, cnto = 0, cnte = 0;

	for(int i=0; i<n; i++)
    {
        if(s[i] == '#')
        {
            used[i] = true;

            if(i % 2 == 0) cnto++;
            else cnte++;
        }
    }

	//Odd Case
	cnt = cnto + n / 2;
	dfs(0, n, used, cnt, ans, s, t);

	for(int i=0; i<n; i++) if(s[i] == '#') used[i] = true;

	//Even Case
	cnt = cnte + (n + 1) / 2;
	dfs(1, n, used, cnt, ans, s, t);

	cout << ans << "\n";
	cout << t;
}
//................................................................

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

Details

Tip: Click on the bar to expand more detailed information

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

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

input:

.###.

output:

3
.###.

result:

ok Accepted. Used 3 queens.

Test #5:

score: 0
Accepted
time: 1ms
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: 1ms
memory: 3584kb

input:

###...

output:

4
###.#.

result:

ok Accepted. Used 4 queens.

Test #9:

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

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

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

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #28:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #29:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #30:

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

input:

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

output:

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

result:

ok Accepted. Used 53 queens.

Test #31:

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

input:

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

output:

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

result:

ok Accepted. Used 64 queens.

Test #32:

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

input:

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

output:

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

result:

ok Accepted. Used 56 queens.

Test #33:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #34:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #35:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #36:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #37:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #38:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #39:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #40:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #41:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #42:

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

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

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

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

input:

#.#

output:

2
#.#

result:

ok Accepted. Used 2 queens.

Test #49:

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

input:

.......

output:

4
.#.###.

result:

ok Accepted. Used 4 queens.

Test #52:

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

input:

........

output:

5
.#.###.#

result:

ok Accepted. Used 5 queens.

Test #53:

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

input:

.........

output:

5
.#.###.#.

result:

ok Accepted. Used 5 queens.

Test #54:

score: 0
Accepted
time: 0ms
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: 1ms
memory: 3584kb

input:

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

output:

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

result:

ok Accepted. Used 63 queens.

Test #59:

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

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: 26ms
memory: 3584kb

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #63:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #64:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #65:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #66:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #67:

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

input:

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

output:

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

result:

ok Accepted. Used 54 queens.

Test #68:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #69:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #70:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #71:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #72:

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

input:

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

output:

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

result:

ok Accepted. Used 50 queens.

Test #75:

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

input:

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

output:

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

result:

ok Accepted. Used 49 queens.

Test #76:

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

input:

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

output:

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

result:

ok Accepted. Used 48 queens.

Test #77:

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

input:

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

output:

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

result:

ok Accepted. Used 47 queens.

Test #78:

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

input:

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

output:

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

result:

ok Accepted. Used 47 queens.

Test #79:

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

input:

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

output:

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

result:

ok Accepted. Used 46 queens.

Test #80:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #81:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #82:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #83:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #84:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #85:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #86:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #87:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #91:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #92:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #93:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #94:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #95:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #96:

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

input:

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

output:

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

result:

ok Accepted. Used 51 queens.

Test #97:

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

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #100:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #103:

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

input:

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

output:

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

result:

ok Accepted. Used 52 queens.

Test #104:

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