CSES - COCI 2006/2007 #6 - Results
Submission details
Task:Magija
Sender:henrikaalto
Submission time:2019-07-25 16:21:32 +0300
Language:C++ (C++17)
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.01 sdetails
#2ACCEPTED0.01 sdetails
#3ACCEPTED0.01 sdetails
#4ACCEPTED0.01 sdetails
#5ACCEPTED0.01 sdetails
#6ACCEPTED0.01 sdetails
#7ACCEPTED0.01 sdetails
#8ACCEPTED0.01 sdetails
#9ACCEPTED0.01 sdetails
#10ACCEPTED0.01 sdetails

Code

#include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define F first
#define S second
using pi=pair<int,int>;
using ii=long long;
int main()
{
    int n, m;
    cin >> n >> m;
    vector<string>v(n);
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
    }
    vector<string>res(n*2);
    for (int i = 0; i < n; ++i) {
        res[i] = v[i];
    }
    for (int i = 0; i < n; ++i) {
        res[n * 2 - i - 1] = v[i];
    }
    for (int i = 0; i < n * 2; ++i) {
        string b = res[i];
        reverse(all(b));
        res[i] += b;
    }
    int x, y;
    cin >> y>> x;
    y--;
    --x;
    res[y][x]=res[y][x]=='#'?'.':'#';
    for (int i = 0; i < n * 2; ++i) {
        cout << res[i] << "\n";
    }
}

Test details

Test 1

Verdict: ACCEPTED

input
1 1
#
2 2

correct output
##
#.

user output
##
#.

Test 2

Verdict: ACCEPTED

input
5 5
.....
#.##.
.#.#.
..#.#
...

correct output
..........
#.##..##.#
.#.#..#.#.
..#.##.#..
#..#..#..#
...

user output
..........
#.##..##.#
.#.#..#.#.
..#.##.#..
#..#..#..#
...
Truncated

Test 3

Verdict: ACCEPTED

input
10 10
..#.###.##
#.......#.
....#..###
.####..#.#
...

correct output
..#.###.####.###.#..
#.......#..#.......#
....#..######..#....
.####..#.##.#..####.
.##.#.#.....##.#.##.
...

user output
..#.###.####.###.#..
#.......#..#.......#
....#..######..#....
.####..#.##.#..####.
.##.#.
...
Truncated

Test 4

Verdict: ACCEPTED

input
20 20
######..###.#..####.
#..#.#.##.#.#.###.#.
#..##...#..#.#.#.#.#
#####..#.##.#.#..##.
...

correct output
######..###.#..####..####..#.#...

user output
######..###.#..####..####..#.#...
Truncated

Test 5

Verdict: ACCEPTED

input
34 33
#.##..#.####..#.#.#.#..#.#.##....

correct output
#.##..#.####..#.#.#.#..#.#.##....

user output
#.##..#.####..#.#.#.#..#.#.##....
Truncated

Test 6

Verdict: ACCEPTED

input
41 42
#.....#.#####..###...#.##...##...

correct output
#.....#.#####..###...#.##...##...

user output
#.....#.#####..###...#.##...##...
Truncated

Test 7

Verdict: ACCEPTED

input
42 14
##...#.#....##
#....#.#.##..#
.#.#..#.######
...#..###..##.
...

correct output
##...#.#....####....#.#...##
#....#.#.##..##..##.#.#....#
.#.#..#.############.#..#.#.
...#..###..##..##..###..#...
#.####.#####....#####.####.#
...

user output
##...#.#....####....#.#...##
#....#.#.##..##..##.#.#....#
.#.#..#.############.#..#.#.
...

...
Truncated

Test 8

Verdict: ACCEPTED

input
1 49
####.##.##..#####...#...#.##.....

correct output
####.##.##..#####...#...#.##.....

user output
####.##.##..#####...#...#.##.....
Truncated

Test 9

Verdict: ACCEPTED

input
47 2
#.
.#
.#
..
...

correct output
#..#
.##.
.##.
....
#..#
...

user output
#..#
.##.
.##.
....
#..#
...
Truncated

Test 10

Verdict: ACCEPTED

input
49 49
###..#.##..#.#####.###.####.##...

correct output
###..#.##..#.#####.###.####.##...

user output
###..#.##..#.#####.###.####.##...
Truncated