记录编号 |
574215 |
评测结果 |
AAAAAAAA |
题目名称 |
时钟 |
最终得分 |
100 |
用户昵称 |
lihaoze |
是否通过 |
通过 |
代码语言 |
C++ |
运行时间 |
0.000 s |
提交时间 |
2022-08-02 22:25:47 |
内存使用 |
0.00 MiB |
显示代码纯文本
#include <bits/stdc++.h>
int a[10], b[10];
#define P1 (p1 + p2 + p4)
#define P2 (p1 + p2 + p3 + p5)
#define P3 (p2 + p3 + p6)
#define P4 (p1 + p4 + p5 + p7)
#define P5 (p1 + p3 + p5 + p7 + p9)
#define P6 (p3 + p5 + p6 + p9)
#define P7 (p4 + p7 + p8)
#define P8 (p5 + p7 + p8 + p9)
#define P9 (p6 + p8 + p9)
#define FOR(x) for (int x = 0; x <= 3; ++ x)
#define IF(x) if (P##x % 4 == a[x])
#define AS(x) (b[x] = p##x)
int main() {
freopen("clocks.in", "r", stdin);
freopen("clocks.out", "w", stdout);
for (int i = 1; i <= 9; ++ i)
std::cin >> a[i], a[i] = (4 - a[i] / 3) % 4;
FOR (p1) FOR (p2) FOR (p3)
FOR (p4) FOR (p5) FOR (p6)
FOR (p7) FOR (p8) FOR (p9)
IF (1) IF (2) IF (3)
IF (4) IF (5) IF (6)
IF (7) IF (8) IF (9) {
AS (1); AS (2); AS (3);
AS (4); AS (5); AS (6);
AS (7); AS (8); AS (9);
for (int i = 1; i <= 9; ++ i)
if (b[i]) for (int j = 1; j <= b[i]; ++ j)
std::cout << i << ' ';
}
return 0;
}