QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#313961#5446. 琪露诺的符卡交换YeahPotato#20 4ms3984kbC++14417b2024-01-25 10:46:482024-07-04 03:21:23

Judging History

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

  • [2024-07-04 03:21:23]
  • 评测
  • 测评结果:20
  • 用时:4ms
  • 内存:3984kb
  • [2024-01-25 10:46:48]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int T, n, a[205][205], f;
int main() {
	cin >> T;
	while (T --) {
		scanf ("%d", &n), f = 1;
		for (int i=1; i<=n; i++)
			for (int j=1; j<=n; j++)
				scanf ("%d", &a[i][j]), f &= a[i][j] == a[i][1];
		if (f) {
			printf ("%d\n", n * (n - 1) >> 1);
			for (int i=n; i; i--)
				for (int j=i-1; j; j--)
					printf ("%d %d %d %d\n", i, j, j, i);
		}
	}
}

详细

Subtask #1:

score: 20
Accepted

Test #1:

score: 20
Accepted
time: 3ms
memory: 3968kb

input:

7
132
96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 96 ...

output:

8646
132 131 131 132
132 130 130 132
132 129 129 132
132 128 128 132
132 127 127 132
132 126 126 132
132 125 125 132
132 124 124 132
132 123 123 132
132 122 122 132
132 121 121 132
132 120 120 132
132 119 119 132
132 118 118 132
132 117 117 132
132 116 116 132
132 115 115 132
132 114 114 132
132 113...

result:

ok your solution is correct.

Test #2:

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

input:

8
14
13 13 13 13 13 13 13 13 13 13 13 13 13 13
7 7 7 7 7 7 7 7 7 7 7 7 7 7
8 8 8 8 8 8 8 8 8 8 8 8 8 8
14 14 14 14 14 14 14 14 14 14 14 14 14 14
5 5 5 5 5 5 5 5 5 5 5 5 5 5
4 4 4 4 4 4 4 4 4 4 4 4 4 4
1 1 1 1 1 1 1 1 1 1 1 1 1 1
10 10 10 10 10 10 10 10 10 10 10 10 10 10
2 2 2 2 2 2 2 2 2 2 2 2 2 2
9...

output:

91
14 13 13 14
14 12 12 14
14 11 11 14
14 10 10 14
14 9 9 14
14 8 8 14
14 7 7 14
14 6 6 14
14 5 5 14
14 4 4 14
14 3 3 14
14 2 2 14
14 1 1 14
13 12 12 13
13 11 11 13
13 10 10 13
13 9 9 13
13 8 8 13
13 7 7 13
13 6 6 13
13 5 5 13
13 4 4 13
13 3 3 13
13 2 2 13
13 1 1 13
12 11 11 12
12 10 10 12
12 9 9 12...

result:

ok your solution is correct.

Test #3:

score: 0
Accepted
time: 2ms
memory: 3868kb

input:

4
82
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1...

output:

3321
82 81 81 82
82 80 80 82
82 79 79 82
82 78 78 82
82 77 77 82
82 76 76 82
82 75 75 82
82 74 74 82
82 73 73 82
82 72 72 82
82 71 71 82
82 70 70 82
82 69 69 82
82 68 68 82
82 67 67 82
82 66 66 82
82 65 65 82
82 64 64 82
82 63 63 82
82 62 62 82
82 61 61 82
82 60 60 82
82 59 59 82
82 58 58 82
82 57 5...

result:

ok your solution is correct.

Test #4:

score: 0
Accepted
time: 4ms
memory: 3972kb

input:

8
3
1 1 1
3 3 3
2 2 2
3
1 1 1
3 3 3
2 2 2
1
1
11
5 5 5 5 5 5 5 5 5 5 5
3 3 3 3 3 3 3 3 3 3 3
1 1 1 1 1 1 1 1 1 1 1
9 9 9 9 9 9 9 9 9 9 9
4 4 4 4 4 4 4 4 4 4 4
11 11 11 11 11 11 11 11 11 11 11
2 2 2 2 2 2 2 2 2 2 2
6 6 6 6 6 6 6 6 6 6 6
8 8 8 8 8 8 8 8 8 8 8
10 10 10 10 10 10 10 10 10 10 10
7 7 7 7 7...

output:

3
3 2 2 3
3 1 1 3
2 1 1 2
3
3 2 2 3
3 1 1 3
2 1 1 2
0
55
11 10 10 11
11 9 9 11
11 8 8 11
11 7 7 11
11 6 6 11
11 5 5 11
11 4 4 11
11 3 3 11
11 2 2 11
11 1 1 11
10 9 9 10
10 8 8 10
10 7 7 10
10 6 6 10
10 5 5 10
10 4 4 10
10 3 3 10
10 2 2 10
10 1 1 10
9 8 8 9
9 7 7 9
9 6 6 9
9 5 5 9
9 4 4 9
9 3 3 9
9 2...

result:

ok your solution is correct.

Subtask #2:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Test #5:

score: 0
Wrong Answer
time: 1ms
memory: 3984kb

input:

5
17
9 9 9 9 9 9 9 9 9 9 9 9 9 2 9 9 9
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6
2 2 2 2 2 2 2 2 2 2 2 2 11 2 2 2 2
4 4 4 4 4 4 10 4 4 4 4 4 4 4 4 4 4
10 10 10 10 10 10 8 10 10 10 10 10 10 10 10 10 10
12 12 12 12 12 12 12 12 12 12 12 12 14 12 12 12 12
14 14 14 14 14 14 14 14 14 14 14 12 14 14 14 14 14
16 16...

output:

3
3 2 2 3
3 1 1 3
2 1 1 2

result:

wrong answer exist a kind of card which a person don't hold.

Subtask #3:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%