Submission #53293848


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef long long ll;
typedef pair<int,int> PII;
const ll MOD=1e9+7;
// head
const int N=1005;
char s[N][N];
signed main() 
{
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int n;cin>>n;
    for(int i=0;i<n;i++) for(int j=0;j<n;j++) cin>>s[i][j];
    bool flag=true;
    for(int i=0;i<n;i++){
    	for(int j=0;j<n;j++){
    		if(s[i][j]=='W'&&s[j][i]!='L') flag=false;
    		if(s[i][j]=='L'&&s[j][i]!='W') flag=false;
    		if(s[i][j]=='D'&&s[j][i]!='D') flag=false;
		}
	}
	if(flag) cout<<"correct"<<endl;
	else cout<<"incorrect"<<endl;
}

Submission Info

Submission Time
Task B - Tournament Result
User gangbengr
Language C++ 20 (gcc 12.2)
Score 200
Code Size 826 Byte
Status AC
Exec Time 15 ms
Memory 4584 KiB

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 14 ms 4584 KiB
random_02.txt AC 12 ms 4372 KiB
random_03.txt AC 14 ms 4388 KiB
random_04.txt AC 12 ms 4520 KiB
random_05.txt AC 14 ms 4580 KiB
random_06.txt AC 13 ms 4404 KiB
random_07.txt AC 14 ms 4468 KiB
random_08.txt AC 6 ms 3984 KiB
random_09.txt AC 14 ms 4396 KiB
random_10.txt AC 4 ms 3872 KiB
random_11.txt AC 15 ms 4416 KiB
random_12.txt AC 3 ms 3856 KiB
random_13.txt AC 14 ms 4424 KiB
random_14.txt AC 11 ms 4232 KiB
random_15.txt AC 14 ms 4392 KiB
random_16.txt AC 4 ms 3944 KiB
sample_01.txt AC 1 ms 3436 KiB
sample_02.txt AC 1 ms 3360 KiB