QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#296518#6310. Dining ProfessorstangledWA 4ms3620kbC++20522b2024-01-03 09:02:172024-01-03 09:02:18

Judging History

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

  • [2024-01-03 09:02:18]
  • 评测
  • 测评结果:WA
  • 用时:4ms
  • 内存:3620kb
  • [2024-01-03 09:02:17]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
using i64 = long long;
void solve()
{
    int n, a;
    cin >> n >> a;
    i64 ans = 0;
    for (int i = 0; i < n; i++)
    {
        int x;
        cin >> x;
        if (x)
            ans += 3ll;
        else
            ans += (i64)(n - 3);
    }
    cout << ans << endl;
}
signed main()
{
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int tc = 1;
    // cin >> tc;
    while (tc--)
        solve();
    return 0;
}

详细

Test #1:

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

input:

5 2
1 0 1 0 1

output:

13

result:

ok 1 number(s): "13"

Test #2:

score: -100
Wrong Answer
time: 4ms
memory: 3524kb

input:

100000 33292
1 1 1 1 0 1 1 0 0 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 0 1 1 1 0 1 0 0 1 1 0 0 0 1 0 1 0 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0...

output:

4998200108

result:

wrong answer 1st numbers differ - expected: '279236', found: '4998200108'