QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#112278#6605. The WitchwoodzararazaWA 0ms3384kbC++17402b2023-06-11 01:16:442023-06-11 01:16:46

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-11 01:16:46]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3384kb
  • [2023-06-11 01:16:44]
  • 提交

answer

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;


int mas[1050];

int main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    int n, k; cin >> n >> k;
    for (int i = 0; i < n; i++) cin >> mas[i];
    sort(mas, mas + n, greater<int>());
    int s = 0; for (int i = 0; i < k; i++) s += mas[i];
    cout << s << endl;
}

詳細信息

Test #1:

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

input:

5 2
9 8 10 2 4

output:

19

result:

ok 1 number(s): "19"

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3384kb

input:

1000 921
574477968 51255457 2508704 653253382 156645487 11643451 116234725 195749025 540495922 587734721 387247487 82940369 82316321 175268731 103171750 380698907 187565561 216028471 110586267 480573 340881497 991681048 336946159 326492497 16121404 512034084 427853141 42975101 324239541 337875097 51...

output:

-1573093738

result:

wrong answer 1st numbers differ - expected: '260419911318', found: '-1573093738'