Submission #40210096


Source Code Expand

#ifdef DEBUG
#include "debug.h"
#endif // DEBUG
#ifndef DEBUG
template <typename T>
void debug(T &x){}
template <typename T>
void debug(T &x, int i, int j){}
#endif // DEBUG

#include <bits/stdc++.h>

using namespace std;

int main(){
    cin.tie(nullptr), ios::sync_with_stdio(false);
    string s[8];
    for(int i = 0; i < 8; i++) cin >> s[i];

    int row, col;
    for(int r = 0; r < 8; r++)
    for(int c = 0; c < 8; c++){
        if(s[r][c] == '*') row = r, col = c;
    }

    cout << (char)(col + 'a') << (8 - row);
}

Submission Info

Submission Time
Task B - Chessboard
User qjatn0120
Language C++ (GCC 9.2.1)
Score 200
Code Size 554 Byte
Status AC
Exec Time 8 ms
Memory 3628 KiB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:26:24: warning: ‘col’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   26 |     cout << (char)(col + 'a') << (8 - row);
      |                   ~~~~~^~~~~~
./Main.cpp:26:42: warning: ‘row’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   26 |     cout << (char)(col + 'a') << (8 - row);
      |                                          ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_01.txt AC 8 ms 3604 KiB
random_02.txt AC 2 ms 3584 KiB
random_03.txt AC 2 ms 3476 KiB
random_04.txt AC 2 ms 3600 KiB
random_05.txt AC 3 ms 3600 KiB
random_06.txt AC 2 ms 3556 KiB
random_07.txt AC 3 ms 3628 KiB
random_08.txt AC 3 ms 3560 KiB
sample_01.txt AC 3 ms 3536 KiB
sample_02.txt AC 2 ms 3596 KiB