Submission #33436787


Source Code Expand

#include <bits/stdc++.h>
#define all(a) a.begin(), a.end()
#define put(i) cout << i << endl
#define rep(i, s, n) for (long long i = s; i < (long long)(n); i++)
using namespace std;
using ll = long long;

int main() {
    ll n; cin >> n;
    vector<string> s(n);
    rep(i,0,n) cin >> s[i];

    rep(i,0,n){
        rep(j,0,n){
            if(s[i][j] == 'W' and s[j][i] != 'L' or
                s[i][j] == 'L' and s[j][i] != 'W' or
                s[i][j] == 'D' and s[j][i] != 'D'){
                    put("incorrect");
                    return 0;
                }
        }
    }

    put("correct");
}

Submission Info

Submission Time
Task B - Tournament Result
User aoken_7
Language C++ (GCC 9.2.1)
Score 200
Code Size 609 Byte
Status AC
Exec Time 36 ms
Memory 5540 KiB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:15:31: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   15 |             if(s[i][j] == 'W' and s[j][i] != 'L' or
./Main.cpp:17:32: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   17 |                 s[i][j] == 'D' and s[j][i] != 'D'){

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 18
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, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_01.txt AC 35 ms 5540 KiB
random_02.txt AC 28 ms 4432 KiB
random_03.txt AC 32 ms 5464 KiB
random_04.txt AC 27 ms 4464 KiB
random_05.txt AC 33 ms 5348 KiB
random_06.txt AC 26 ms 4444 KiB
random_07.txt AC 33 ms 5388 KiB
random_08.txt AC 16 ms 4184 KiB
random_09.txt AC 23 ms 5392 KiB
random_10.txt AC 11 ms 3976 KiB
random_11.txt AC 24 ms 5440 KiB
random_12.txt AC 6 ms 3660 KiB
random_13.txt AC 36 ms 5444 KiB
random_14.txt AC 21 ms 4476 KiB
random_15.txt AC 25 ms 5504 KiB
random_16.txt AC 11 ms 3728 KiB
sample_01.txt AC 2 ms 3480 KiB
sample_02.txt AC 2 ms 3552 KiB