QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#106819#6368. Zenyk, Marichka and Interesting Gameckiseki#WA 3ms3592kbC++20848b2023-05-19 13:51:422023-05-19 13:51:45

Judging History

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

  • [2024-07-31 22:32:12]
  • hack成功,自动添加数据
  • (/hack/769)
  • [2024-07-31 22:31:27]
  • hack成功,自动添加数据
  • (/hack/768)
  • [2024-07-31 22:00:17]
  • hack成功,自动添加数据
  • (/hack/765)
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-19 13:51:45]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3592kb
  • [2023-05-19 13:51:42]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int main() {
    cin.tie(nullptr) -> sync_with_stdio(false);
    int n, a, b;
    cin >> n >> a >> b;
    int x = 0, y = 0;
    while (n--) {
        int v;
        cin >> v;
        v %= (a + b);
        if (a <= b) {
            if (v >= b) {
                y += v;
            } else if (v >= a) {
                x += v;
            }
        } else {
            if (v >= a) {
                x += v;
            } else if (v >= b) {
                y += v;
            }
        }
    }
    if (a <= b) {
        if (x > 0 or (y & 1)) {
            cout << "Zenyk\n";
        } else {
            cout << "Marichka\n";
        }
    } else {
        if (y > 0 or (x % 2 == 0)) {
            cout << "Marichka\n";
        } else {
            cout << "Zenyk\n";
        }
    }
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3576kb

input:

4 4 7
7 2 14 7

output:

Marichka

result:

ok single line: 'Marichka'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3412kb

input:

20 1 1
6 10 2 4 7 8 8 1 5 5 7 7 4 1 10 9 9 4 8 1

output:

Marichka

result:

ok single line: 'Marichka'

Test #3:

score: 0
Accepted
time: 2ms
memory: 3408kb

input:

20 1 1
414 181 316 53 92 312 622 524 552 324 288 895 708 373 352 167 424 989 976 276

output:

Marichka

result:

ok single line: 'Marichka'

Test #4:

score: 0
Accepted
time: 2ms
memory: 3360kb

input:

20 1 1
2476 3753 129 43 5076 8018 4382 2175 8178 8843 3061 9366 3344 8642 2148 785 8670 2428 2300 2999

output:

Marichka

result:

ok single line: 'Marichka'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

20 1 1
137810 629048 57380 122292 841453 831316 109917 665931 784954 324075 599876 495466 276505 974952 967899 94960 447567 894845 70023 743552

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #6:

score: 0
Accepted
time: 2ms
memory: 3408kb

input:

20 1 1
603612750 319945652 916047899 984639911 36858338 307217388 346606441 854711869 9443937 55167056 157372379 873443436 183061243 692493631 554311914 5098733 188700177 947666284 993329795 896423950

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #7:

score: 0
Accepted
time: 2ms
memory: 3536kb

input:

20 1 100
10 6 9 7 4 4 8 9 2 10 8 7 9 1 4 7 7 5 9 1

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #8:

score: 0
Accepted
time: 2ms
memory: 3316kb

input:

20 1 100
940 930 560 776 668 23 120 32 523 711 918 281 404 927 41 192 200 170 290 586

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

20 1 100
1732 1420 551 8359 6871 8284 8135 8533 1164 8016 2713 1418 3996 8589 200 3404 1267 5804 4800 1991

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

20 1 100
105878 323662 468400 734087 321718 827773 628979 354725 176831 493726 43144 916118 866452 393003 80518 9044 918239 857346 851719 790018

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #11:

score: 0
Accepted
time: 2ms
memory: 3592kb

input:

20 1 100
114483985 70948228 933107906 581251601 63833847 760459167 522351316 314146499 763641131 554926752 234970125 609052828 134295972 504224598 56091200 116857047 508324783 942411783 72916944 843202913

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #12:

score: 0
Accepted
time: 2ms
memory: 3412kb

input:

20 1 100000
5 2 4 9 3 2 9 3 5 7 8 1 6 6 4 8 5 4 5 7

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #13:

score: 0
Accepted
time: 2ms
memory: 3448kb

input:

20 1 100000
376 743 445 925 699 607 565 466 862 611 945 677 243 264 604 622 335 920 718 386

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #14:

score: 0
Accepted
time: 3ms
memory: 3400kb

input:

20 1 100000
8252 8803 88 2291 6507 459 9824 9956 5719 7886 5332 9731 5642 1913 6440 6311 6787 7963 1445 2601

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #15:

score: 0
Accepted
time: 1ms
memory: 3412kb

input:

20 1 100000
10156 503199 586524 403723 453893 429463 330401 769280 620893 336345 848753 877763 697072 569244 147617 953077 240397 153991 729626 208934

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #16:

score: 0
Accepted
time: 2ms
memory: 3344kb

input:

20 1 100000
850297134 667239066 735269786 233353557 570873281 703424507 389900216 864638630 286356719 944248400 584368974 739146392 557877402 848545733 540305949 4903691 574760582 419674381 439788045 728944291

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3412kb

input:

20 1 1000000000
10 4 9 5 1 7 5 6 10 3 10 1 4 10 8 5 7 10 6 2

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #18:

score: 0
Accepted
time: 2ms
memory: 3456kb

input:

20 1 1000000000
817 750 402 647 322 952 532 291 566 123 647 379 210 775 168 307 531 377 481 120

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #19:

score: 0
Accepted
time: 2ms
memory: 3308kb

input:

20 1 1000000000
2063 4090 297 9490 5283 2521 545 3267 5312 3841 2871 8445 5531 9062 8231 3423 1084 7907 3366 8189

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #20:

score: 0
Accepted
time: 2ms
memory: 3364kb

input:

20 1 1000000000
138147 983408 916827 779795 505956 417480 153713 726169 786848 253884 851659 100356 496925 331035 754728 514670 573046 295912 885213 834849

output:

Zenyk

result:

ok single line: 'Zenyk'

Test #21:

score: -100
Wrong Answer
time: 1ms
memory: 3408kb

input:

20 1 1000000000
389741152 41754585 358701835 444625716 265402105 356196211 963731432 397616524 985364717 353003262 640362973 11306956 47119087 151033033 699134111 53713942 244495828 709295081 130562628 675461519

output:

Marichka

result:

wrong answer 1st lines differ - expected: 'Zenyk', found: 'Marichka'