CSES - COCI 2006/2007 #6 - Results
Submission details
Task:Magija
Sender:untokarila
Submission time:2019-07-25 16:47:36 +0300
Language:C++ (C++11)
Status:READY
Result:0
Feedback
groupverdictscore
#10
Test results
testverdicttime
#1ACCEPTED0.01 sdetails
#2ACCEPTED0.01 sdetails
#3ACCEPTED0.01 sdetails
#4ACCEPTED0.01 sdetails
#50.01 sdetails
#60.01 sdetails
#70.01 sdetails
#80.01 sdetails
#90.01 sdetails
#10ACCEPTED0.01 sdetails

Code

#include <bits/stdc++.h>

using namespace std;

int main(){

    char k[100][100];
    int r, c, a, b;
    cin >> c >> r;

    for(int i=0; i<r; i++){
        for(int j=0; j<c; j++) cin >> k[i][j];
    }

    for(int i=0; i<r; i++){
        for(int j=0; j<c; j++){
            k[r+i][j] = k[r-i-1][j];
        }
    }
    for(int i=0; i<r*2; i++){
        for(int j=0; j<c; j++){
            k[i][c+j] = k[i][c-j-1];
        }
    }

    cin >> a >> b;
    a--; b--;

    if(k[a][b] == '.') k[a][b] = '#';
    else k[a][b] = '.';

    for(int i=0; i<r*2; i++){
        for(int j=0; j<c*2; j++){
            cout << k[i][j];
        }
        cout << '\n';
    }

    return 0;
}

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:

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

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

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

Test 6

Verdict:

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

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

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

Test 7

Verdict:

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

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

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

Test 8

Verdict:

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

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

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

Test 9

Verdict:

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

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

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

Test 10

Verdict: ACCEPTED

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

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

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