QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#797098#9481. Min NimKKT89AC ✓10ms3956kbC++17871b2024-12-02 16:22:312024-12-02 16:22:32

Judging History

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

  • [2024-12-02 16:22:32]
  • 评测
  • 测评结果:AC
  • 用时:10ms
  • 内存:3956kb
  • [2024-12-02 16:22:31]
  • 提交

answer

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) { return (ull)rng() % B; }

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int q;
    cin >> q;
    while (q--) {
        int n;
        cin >> n;
        vector<int> a(n);
        int cnt = 0, cnt1 = 0;
        for (int i = 0; i < n; ++i) {
            cin >> a[i];
            cnt1 += a[i] != 1;
        }
        sort(a.begin(), a.end());
        for (int i = 0; i < n; ++i) {
            if (a[i] != a[0]) cnt += 1;
        }
        if (n % 2 == 1 or cnt % 2 == 1 or cnt1 % 2 == 1) {
            cout << "First\n";
        } else {
            cout << "Second\n";
        }
    }
}

详细

Test #1:

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

input:

2
3
3 1 4
8
3 1 4 1 5 9 2 6

output:

First
Second

result:

ok 2 tokens

Test #2:

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

input:

1
100000
825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 8...

output:

Second

result:

ok "Second"

Test #3:

score: 0
Accepted
time: 6ms
memory: 3688kb

input:

1
99999
80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 8001...

output:

First

result:

ok "First"

Test #4:

score: 0
Accepted
time: 8ms
memory: 3552kb

input:

1
78425
68217 42000 55359 54442 49297 40030 519 53351 51488 77091 60533 19838 56156 25791 74518 20632 19144 65724 72247 50453 36895 63836 10801 66715 40374 44054 3217 33986 8221 8788 13517 70202 73285 10081 70046 28329 5125 12397 35407 40647 58512 18791 65149 10893 20811 65951 42479 72915 4876 74362...

output:

First

result:

ok "First"

Test #5:

score: 0
Accepted
time: 7ms
memory: 3632kb

input:

1
69098
27088 61575 24263 46325 34362 14135 54594 9913 68664 52710 63218 53742 24588 40288 28273 48305 11086 17622 67877 36595 15036 10490 56916 51589 47589 24068 25642 32137 51847 31661 22753 11345 62378 46432 8939 29319 63388 5644 1824 26407 15890 42482 31743 24179 35707 39181 1080 44846 65762 128...

output:

First

result:

ok "First"

Test #6:

score: 0
Accepted
time: 9ms
memory: 3588kb

input:

1
89686
29385 43836 41035 40615 33516 44816 11696 6796 14120 22703 24107 15943 12712 13466 16401 41739 43020 27407 15879 30708 12915 3570 43781 38302 3346 14786 22832 28928 37937 24684 22166 10116 13094 19379 1254 17197 28815 8187 17469 6276 15169 40474 44731 15607 4231 9871 40634 36378 4223 22367 1...

output:

Second

result:

ok "Second"

Test #7:

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

input:

1
1892
441 240 207 247 245 781 609 91 589 264 198 857 203 301 774 651 51 582 251 916 341 118 460 524 627 668 528 501 235 303 320 172 820 376 918 74 880 192 724 567 872 902 114 179 575 889 844 261 853 196 784 554 595 306 319 724 740 206 421 348 51 831 727 580 276 53 585 765 326 884 872 709 311 268 93...

output:

Second

result:

ok "Second"

Test #8:

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

input:

1
29519
344655803 344655803 488700102 344655803 344655803 344655803 437875513 344655803 995261600 344655803 344655803 344655803 344655803 344655803 829085853 344655803 344655803 344655803 344655803 344655803 344655803 344655803 344655803 344655803 344655803 847109453 344655803 344655803 344655803 34...

output:

First

result:

ok "First"

Test #9:

score: 0
Accepted
time: 8ms
memory: 3852kb

input:

1
91077
737359116 841674337 737359116 737359116 737359116 737359116 771086155 737359116 737359116 737359116 737359116 737359116 737359116 855009405 737359116 737359116 737359116 762093255 737359116 789625353 737359116 737359116 794610552 737359116 737359116 737359116 792739610 737359116 737359116 81...

output:

First

result:

ok "First"

Test #10:

score: 0
Accepted
time: 6ms
memory: 3636kb

input:

1
61733
566808123 472696215 472696215 713247896 831329805 935724855 472696215 505929087 472696215 472696215 753367519 857157241 829476044 472696215 472696215 856152057 472696215 472696215 472696215 472696215 472696215 472696215 472696215 472696215 574948527 472696215 472696215 836489787 735478160 47...

output:

First

result:

ok "First"

Test #11:

score: 0
Accepted
time: 10ms
memory: 3700kb

input:

1
97224
914613953 928017814 786769828 818278999 399101777 420460874 772964649 492709788 399101777 829706284 399101777 399101777 678756434 399101777 399101777 974404214 803205678 416904341 490304284 504487476 399101777 844036508 399101777 529406511 558923506 629894844 481644246 399101777 777533620 89...

output:

Second

result:

ok "Second"

Test #12:

score: 0
Accepted
time: 6ms
memory: 3580kb

input:

1
78463
617715983 199123118 199123118 199123118 199123118 199123118 199123118 199123118 199123118 332567524 199123118 199123118 199123118 199123118 199123118 199123118 851075520 199123118 199123118 199123118 199123118 199123118 199123118 199123118 199123118 199123118 199123118 648102149 199123118 19...

output:

First

result:

ok "First"

Test #13:

score: 0
Accepted
time: 5ms
memory: 3608kb

input:

1
50394
938481058 938481058 975950090 938481058 938481058 938481058 938481058 938481058 938481058 976795174 938481058 938481058 938481058 938481058 938481058 952857082 938481058 995516241 938481058 938481058 938481058 964057473 938481058 967119221 995304010 939424769 938481058 965505732 938481058 93...

output:

First

result:

ok "First"

Test #14:

score: 0
Accepted
time: 5ms
memory: 3608kb

input:

1
52521
367840899 710851509 367840899 367840899 367840899 611838415 367840899 865818441 367840899 367840899 367840899 367840899 536183635 367840899 367840899 367840899 764139535 367840899 367840899 367840899 367840899 367840899 847885966 367840899 871182084 367840899 367840899 995251125 367840899 36...

output:

First

result:

ok "First"

Test #15:

score: 0
Accepted
time: 7ms
memory: 3640kb

input:

1
79402
920267727 844540629 844540629 881730437 955831494 844540629 844540629 844540629 844540629 844540629 913619280 862813120 983275449 844540629 844540629 991711458 896901627 844540629 982521205 848144836 844540629 872858260 844540629 844540629 844540629 844540629 851042051 844540629 844540629 84...

output:

First

result:

ok "First"

Test #16:

score: 0
Accepted
time: 6ms
memory: 3640kb

input:

1
86352
764435916 448124079 631581933 650980393 603999447 402962974 779325908 791317340 450073776 660308742 637189829 456481766 654087764 974639543 883423113 659836385 877252502 730623254 536277763 500309472 982940963 588353653 668366633 492069987 750818737 383650573 605215328 590075493 559150585 63...

output:

First

result:

ok "First"

Test #17:

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

input:

1
10470
740419959 740419959 955610063 839009125 740419959 740419959 755261979 740419959 985133372 841588182 876381293 954882860 943120392 898619632 740419959 824046831 747921545 740419959 890934229 740419959 767047662 740419959 876091677 933013291 802621538 740419959 860403243 924287768 740419959 74...

output:

First

result:

ok "First"

Test #18:

score: 0
Accepted
time: 8ms
memory: 3680kb

input:

1972
82
822141026 675100982 26855093 26855093 120204950 322165579 602625623 660891600 960259208 26855093 26855093 753455633 176682800 480633850 126440186 26855093 479890204 127459596 266525805 434798933 136908447 936845242 26855093 55347874 160886164 892096933 795675298 58849617 310882207 33833085 2...

output:

First
First
Second
First
Second
First
First
First
First
First
First
First
First
First
First
First
First
Second
First
First
First
Second
First
First
First
Second
First
First
First
Second
First
First
First
First
First
Second
First
Second
First
First
First
First
First
Second
Second
First
First
First
Fi...

result:

ok 1972 tokens

Test #19:

score: 0
Accepted
time: 8ms
memory: 3864kb

input:

1983
79
466149729 466149729 466149729 466149729 736003741 466149729 466149729 466149729 466149729 688801860 466149729 466149729 466149729 466149729 774660401 466149729 684841445 466149729 466149729 784975677 466149729 466149729 466149729 466149729 981647005 466149729 752214872 843201167 511642394 46...

output:

First
Second
Second
First
First
Second
First
Second
First
First
Second
First
Second
First
First
First
First
Second
Second
First
Second
First
First
First
First
Second
First
First
First
First
First
First
Second
Second
First
Second
First
First
First
First
First
First
First
Second
First
Second
First
Fir...

result:

ok 1983 tokens

Test #20:

score: 0
Accepted
time: 8ms
memory: 3560kb

input:

1984
81
217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 21...

output:

First
Second
First
First
First
First
First
First
First
First
First
First
First
First
First
Second
First
First
First
First
First
First
First
Second
First
Second
First
Second
First
Second
First
First
First
First
Second
First
First
First
Second
Second
First
Second
First
Second
First
First
First
First
S...

result:

ok 1984 tokens

Test #21:

score: 0
Accepted
time: 8ms
memory: 3700kb

input:

1974
43
770952908 740021488 740021488 809623066 775797885 740021488 740021488 740021488 740021488 970384474 740021488 802772847 935425043 896564919 740021488 740021488 740021488 740021488 740021488 740021488 863123021 740021488 862151459 740021488 740021488 740021488 922989800 857417643 975202349 86...

output:

First
Second
First
First
First
First
First
Second
First
First
First
Second
First
First
First
First
First
First
First
First
First
First
First
First
First
First
First
First
Second
First
Second
First
First
First
First
First
First
First
Second
Second
First
First
Second
Second
Second
First
First
First
Fi...

result:

ok 1974 tokens

Test #22:

score: 0
Accepted
time: 4ms
memory: 3648kb

input:

1973
53
918426918 842825241 779845325 922542022 815889863 932033425 878404930 862946484 853000223 908399902 961996273 814051943 849711445 965035802 935046293 803990423 775582918 865304054 985119769 998563680 866379010 862937153 912992385 917826099 998939929 761018584 931338940 810165148 816173024 84...

output:

First
Second
First
Second
Second
First
First
First
Second
Second
First
First
Second
First
First
Second
First
First
First
First
First
First
First
First
First
First
First
First
First
Second
First
First
First
First
Second
Second
First
First
First
First
First
First
First
Second
Second
First
First
First
...

result:

ok 1973 tokens

Extra Test:

score: 0
Extra Test Passed