QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#22506#2850. 蛋糕lindongli2004#WA 14ms3660kbC++141.2kb2022-03-09 19:17:562022-04-30 01:14:45

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-04-30 01:14:45]
  • 评测
  • 测评结果:WA
  • 用时:14ms
  • 内存:3660kb
  • [2022-03-09 19:17:56]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mkp make_pair
#define pb push_back
typedef pair <int, int> pii;
typedef unsigned int uint;

inline int read() {
	int x = 0, f = 0;
	char c = getchar();
	while (!isdigit(c)) {if (c == '-') f = 1; c = getchar();}
	while (isdigit(c)) x = (x << 1) + (x << 3) + (c & 15), c = getchar();
	return f? -x : x;
}

//const int MAXN = 1e6;
uint f[10], C[10][10];
int main() {
	//freopen ("std.in", "r", stdin);
	//freopen ("std.out", "w", stdout);
	int T = read(); C[0][0] = 1;
	for (int i = 1; i <= 4; ++i) {
		C[i][0] = 1;
		for (int j = 1; j <= 4; ++j)
			C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]);
	}
	while (T--) {
		int R[4];
		R[0] = read(), R[1] = read(), R[2] = read(), R[3] = read();
		memset(f, 0, sizeof(f));
		for (int i = 0; i < 16; ++i) {
			int cnt = 1, ff = 0;
			for (int j = 0; j < 4; ++j) {
				if (R[j] == 1) ++ff;
				if (i >> j & 1) cnt = cnt * min(2, R[j]), ++ff;
				else cnt = cnt * max(0, R[j] - 2);
			}
	//		if (ff == 4 && cnt) {
	//			cerr << "fuck" << endl;
	//		}
			f[ff] += cnt;
		}
		for (int i = 0; i < 9; ++i)
			printf("%d ", f[i]);
		printf("\n");
	}
	return 0;
}


详细

Test #1:

score: 0
Wrong Answer
time: 14ms
memory: 3660kb

input:

9999
18429 66560 1 13694
48994 1 16287 10018
26028 52162 14916 1
30285 52396 33384 55269
65461 96967 74820 73364
55054 70162 1 1
97285 88897 39444 35439
61069 20048 35664 1
21838 22945 6244 79240
46316 82624 33318 31522
90387 93765 7568 97379
22273 74037 1255 91257
67961 28295 1 36263
20958 87638 59...

output:

0 0 -573397288 485190476 394708 8 0 0 0 
0 0 -1821582336 -1391668992 301172 8 0 0 0 
0 0 -479823104 752197032 372400 8 0 0 0 
210762172 120505776 93542516 1370608 16 0 0 0 0 
1455446364 -1688149480 1882152716 2484832 16 0 0 0 0 
0 0 0 0 -432518976 250424 4 0 0 
645023874 205607214 1456723092 2088456...

result:

wrong answer 1st lines differ - expected: '0 0 278697304 483210476 394708 8 0 0 0', found: '0 0 -573397288 485190476 394708 8 0 0 0 '