QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#458186#8830. Breaking Baducup-team3215#WA 0ms3916kbC++20489b2024-06-29 16:13:102024-06-29 16:13:12

Judging History

你现在查看的是最新测评结果

  • [2024-06-29 16:13:12]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3916kb
  • [2024-06-29 16:13:10]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

constexpr int N = 1e3;

int a[N][N], p[N];

int main() {
  cin.tie(0)->sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; p[i] = i, ++i)
  for (int j = 0; j < n; ++j) cin >> a[i][j];
  string s = "NNNNN";
  mt19937_64 rng(213132);
  for (int i = n * 10; i--; ) {
    shuffle(p, p + n, rng);
    int t = 0;
    for (int i = 0; i < n; ++i) t += a[i][p[i]];
    s[t % 5] = 'Y';
  }
  cout << s << '\n';
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3644kb

input:

2
0 4
4 0

output:

YNNYN

result:

ok "YNNYN"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

2
1 1
1 1

output:

NNYNN

result:

ok "NNYNN"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

4
0 0 1 0
0 1 0 1
0 0 0 0
1 1 0 0

output:

YYYYN

result:

ok "YYYYN"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

4
0 0 0 1
0 1 0 1
1 0 0 0
0 1 0 0

output:

YYYYN

result:

ok "YYYYN"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3916kb

input:

10
1 4 2 0 0 2 0 1 3 3
0 3 1 4 4 1 4 0 2 2
1 4 2 0 0 2 0 1 0 3
0 3 1 4 4 1 4 0 2 2
4 2 0 3 3 0 3 4 1 1
2 0 3 1 1 3 1 2 4 4
4 2 0 3 3 0 3 4 1 1
2 0 3 1 1 3 1 2 4 4
1 4 2 0 0 2 0 1 3 3
3 1 4 2 2 4 2 3 0 0

output:

NYNNY

result:

ok "NYNNY"

Test #6:

score: -100
Wrong Answer
time: 0ms
memory: 3676kb

input:

10
4 4 4 1 3 4 1 4 3 0
3 3 3 0 2 3 0 3 2 4
3 3 3 0 2 3 0 3 2 4
4 4 4 1 3 4 1 4 3 0
2 2 2 4 1 2 4 2 1 3
2 2 2 4 1 3 4 2 1 3
4 4 4 1 3 4 1 4 3 0
3 3 3 0 2 3 0 3 2 4
2 2 2 4 1 2 4 2 1 3
4 4 4 1 3 4 1 1 3 0

output:

YYNNY

result:

wrong answer 1st words differ - expected: 'YYYNY', found: 'YYNNY'