QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#396517 | #2850. 蛋糕 | ucup-team1251 | WA | 24ms | 3720kb | C++17 | 1.1kb | 2024-04-22 21:02:28 | 2024-04-22 21:02:29 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int long long
const int N = 1e6 + 10;
const int M = 1e3 + 10;
const int mod = 2148473648;
int a[5];
void solve()
{
for (int i = 1; i <= 4; i++)
cin >> a[i];
int ans1 = 1;
int ans2 = 0;
for (int i = 1; i <= 4; i++)
ans1 = ans1 * (a[i] - 2);
for (int i = 1; i <= 4; i++)
for (int j = 1; j <= 4; j++)
{
for (int k = 1; k <= 4; k++)
if (i != j && i != k && j != k)
ans2 += (a[i] - 2) * (a[j] - 2) * (a[k] - 2);
}
ans2 /= 3;
int ans3 = 0;
for (int i = 1; i <= 4; i++)
for (int j = 1; j <= 4; j++)
{
for (int k = 1; k <= 4; k++)
for (int q = 1; q <= 4; q++)
if (i != j && i != k && j != k && q != k && i != q && j != q)
ans3 += (((a[i] - 2) + (a[j] - 2) + (a[k] - 2)) * (a[q] - 2));
}
ans3 /= 3;
int ans4 = 1;
int ans5 = 16;
ans4 = (a[1] - 2 + a[2] - 2 + a[3] - 2 + a[4] - 2) * 8;
cout << ans1 % mod << " " << ans2 % mod << " " << ans3 % mod << " " << ans4 % mod << " " << ans5 % mod << " "
<< "0 0 0 0" << endl;
}
signed main()
{
int t = 1;
cin >> t;
while (t--)
{
solve();
}
// system("pause");
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 24ms
memory: 3720kb
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:
-278697304 74184132 966026244 789408 16 0 0 0 0 -939058608 1123292560 1509348140 602336 16 0 0 0 0 -928825136 1107433240 1500061664 744792 16 0 0 0 0 1239780156 506705424 73742516 1370608 16 0 0 0 0 -1301039668 2145345144 1816812716 2484832 16 0 0 0 0 1713974672 -410227320 409476052 1001680 16 0 0 0...
result:
wrong answer 1st lines differ - expected: '0 0 278697304 483210476 394708 8 0 0 0', found: '-278697304 74184132 966026244 789408 16 0 0 0 0'