编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#5145 #1033. 电子钱包 Wrong Answer 20 5403 ms 16768 K C++ 17 / 1.7 K t330026189 2024-02-25 16:08:49
显示原始代码
#include <iostream>
//#include <stdio.h>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <queue>
#include <vector>
#include <stack>
#include <string>
#define ll long long

using namespace std;
//#define Max 2000006
struct point {
    ll n, m;
};
bool cmp(point x, point y) { return x.n > y.n; }
void read(ll &x) {
    ll res = 0;
    char c = getchar();
    while (c < '0' || c > '9') c = getchar();
    while (c >= '0' && c <= '9') {
        res = res * 10 + c - '0';
        c = getchar();
    }
    x = res;
}
point a[2000006];
ll map[1000006] = { 0 };
int main(void) {
    ll n, m, k, t;
    cin >> n >> m >> k;
    for (ll i = 0; i < n; ++i) {
        for (ll j = 1; j <= m; ++j) {
            cin >> t;
            a[m * i + j].n = t;
            a[m * i + j].m = j;
        }
    }
    sort(&a[1], &a[m * n + 1], cmp);

    ll ans = 0, cnt = 0;
    for (ll i = 1; cnt <= m - k + 1 && i <= m * n; ++i) {
        if (a[i].m >= k && a[i].m <= m - k) {
            if (map[a[i].m] < k) {
                map[a[i].m]++;
                ans += a[i].n;
                cnt++;
            }
        } else {
            if (a[i].m < k) {
                if (map[a[i].m] < a[i].m) {
                    map[a[i].m]++;
                    ans += a[i].n;
                    cnt++;
                }
            } else {
                if (map[a[i].m] < m - a[i].m + 1) {
                    map[a[i].m]++;
                    ans += a[i].n;
                    cnt++;
                }
            }
        }
    }
    cout << ans << endl;
    return 0;
}
子任务 #1
Wrong Answer
得分:20
测试点 #1
Accepted
得分:100
用时:7 ms
内存:244 KiB

输入文件(1.in

3 5 1
-2 -1 1 -5 5
-10 6 -9 2 -3
3 18 -4 15 8

答案文件(1.out

45

用户输出

45

系统信息

Exited with return code 0
测试点 #2
Wrong Answer
得分:0
用时:7 ms
内存:268 KiB

输入文件(2.in

2 4 2
8 10 1 18
0 18 19 4

答案文件(2.out

55

用户输出

65

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #3
Wrong Answer
得分:0
用时:7 ms
内存:268 KiB

输入文件(3.in

4 2 2
7 13
20 -10
12 3
-1 -1

答案文件(3.out

20

用户输出

33

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #4
Wrong Answer
得分:0
用时:6 ms
内存:352 KiB

输入文件(4.in

5 5 3
826018350 77963601 542836249 494007192 621079892
339932393 365261088 341892848 167738021 989
<160 bytes omitted>

答案文件(4.out

2567369718

用户输出

3391474642

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #5
Wrong Answer
得分:0
用时:3 ms
内存:356 KiB

输入文件(5.in

5 2 2
363463500 698098024
78546565 146763659
618817 532703722
689924184 208284721
130754951 842
<8 bytes omitted>

答案文件(5.out

842390266

用户输出

1532314450

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #6
Wrong Answer
得分:0
用时:4 ms
内存:360 KiB

输入文件(6.in

5 5 4
315095729 849945216 941621294 681161505 413055707
187320319 658718870 162242863 513206677 55
<160 bytes omitted>

答案文件(6.out

1850556110

用户输出

2700501326

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #7
Accepted
得分:100
用时:10 ms
内存:376 KiB

输入文件(7.in

8 960 1
439522032 143659183 704614095 858726745 834941321 705143579 174376856 214547472 66507029 15
<75818 bytes omitted>

答案文件(7.out

853670661390

用户输出

853670661390

系统信息

Exited with return code 0
测试点 #8
Wrong Answer
得分:0
用时:14 ms
内存:396 KiB

输入文件(8.in

8 964 4
882229056 985391405 426944910 497713492 702025464 240938286 233023176 161580397 109394271 5
<76203 bytes omitted>

答案文件(8.out

901553927440

用户输出

905933875968

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #9
Wrong Answer
得分:0
用时:11 ms
内存:484 KiB

输入文件(9.in

9 1000 7
778888049 221031413 866094670 467903517 788959338 303167339 456245818 516821715 412045756 
<88868 bytes omitted>

答案文件(9.out

939250128508

用户输出

941498614295

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #10
Wrong Answer
得分:0
用时:10 ms
内存:480 KiB

输入文件(10.in

10 984 10
823698119 556835313 592881930 37651090 646871595 883418970 65325689 169924809 372953135 8
<97260 bytes omitted>

答案文件(10.out

926224744381

用户输出

927909183838

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #11
Wrong Answer
得分:0
用时:18 ms
内存:492 KiB

输入文件(11.in

9 970 5
256243760 649457260 237057804 190581169 229207641 925377945 957412615 966448209 51993027 94
<86247 bytes omitted>

答案文件(11.out

908866174114

用户输出

912438346704

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #12
Wrong Answer
得分:0
用时:9 ms
内存:392 KiB

输入文件(12.in

9 972 4
878959650 27217025 186275748 62587960 695097047 440398304 836223866 366283930 397510761 462
<86452 bytes omitted>

答案文件(12.out

913833501668

用户输出

918176297385

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #13
Accepted
得分:100
用时:755 ms
内存:15192 KiB

输入文件(13.in

9 99977 1
989698183 785489651 792844089 617789529 834645745 729795279 302672369 831519843 266741809
<8898340 bytes omitted>

答案文件(13.out

90005770557915

用户输出

90005770557915

系统信息

Exited with return code 0
测试点 #14
Accepted
得分:100
用时:595 ms
内存:13636 KiB

输入文件(14.in

8 99921 1
57360719 348323751 822040646 334737121 980871704 732125987 649339956 128380089 943126568 
<7904838 bytes omitted>

答案文件(14.out

88797397671136

用户输出

88797397671136

系统信息

Exited with return code 0
测试点 #15
Wrong Answer
得分:0
用时:465 ms
内存:13556 KiB

输入文件(15.in

8 99993 6
570271940 230862916 -44126637 -306643413 -559442167 971759845 -56279740 -785744455 147223
<8310648 bytes omitted>

答案文件(15.out

87090759500755

用户输出

87498028985456

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #16
Wrong Answer
得分:0
用时:671 ms
内存:16768 KiB

输入文件(16.in

10 99804 3
775758376 -53853367 721775156 771914116 816690640 -68382925 -125716285 -690701924 563611
<10367676 bytes omitted>

答案文件(16.out

88590134135670

用户输出

89775752970626

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #17
Wrong Answer
得分:0
用时:812 ms
内存:15152 KiB

输入文件(17.in

9 99878 8
-935097118 -415339545 991690508 -798189312 213125172 -273867542 -242633820 -951795287 738
<9338412 bytes omitted>

答案文件(17.out

88594394748770

用户输出

88805404161596

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #18
Wrong Answer
得分:0
用时:769 ms
内存:16708 KiB

输入文件(18.in

10 99968 7
831110579 -51028942 -610367370 122313557 697677017 -351824431 -253519158 -981392158 4407
<10384563 bytes omitted>

答案文件(18.out

89770380601118

用户输出

90022492838599

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #19
Wrong Answer
得分:0
用时:614 ms
内存:13612 KiB

输入文件(19.in

8 99892 6
743351373 354455633 -381921520 164692660 -52467231 443771200 -658716573 -323953488 473650
<8302011 bytes omitted>

答案文件(19.out

87063038029784

用户输出

87464861666233

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #20
Wrong Answer
得分:0
用时:616 ms
内存:16704 KiB

输入文件(20.in

10 99959 5
328521328 -413386249 -180663692 -327435995 51903610 403437984 391694250 -34324363 -69569
<10385015 bytes omitted>

答案文件(20.out

89458913213599

用户输出

89931437705555

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0