QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#528921#2. Boatmadlogic9 1ms3864kbC++20631b2024-08-24 03:09:162024-08-24 03:09:16

Judging History

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

  • [2024-08-24 03:09:16]
  • 评测
  • 测评结果:9
  • 用时:1ms
  • 内存:3864kb
  • [2024-08-24 03:09:16]
  • 提交

answer

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

const int MOD = 1e9 + 7;

// % x
// < x

int main() {
    vector<long long> arra;
    vector<long long> sum;
    int n, x;

    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> x >> x;
        arra.push_back(x);
    }

    for (int i = 0; i < n; i++) {
        sum.push_back(1);
        for (int j = i; j >= 0; j--)
            if (arra[i] > arra[j])
                sum[i] = (sum[i] + sum[j]) % MOD;
    }
    long long s = 0;
    for (int i = 0; i < n; i++)
        s = (s + sum[i]) % MOD;
    cout << s << endl;
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 9
Accepted

Test #1:

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

input:

500
308810287 308810287
53564892 53564892
316377768 316377768
420249597 420249597
731165653 731165653
319087025 319087025
153776963 153776963
425464316 425464316
651047701 651047701
142502072 142502072
31632388 31632388
572337890 572337890
400220429 400220429
414382974 414382974
279400752 279400752
...

output:

553232367

result:

ok single line: '553232367'

Test #2:

score: 9
Accepted
time: 1ms
memory: 3864kb

input:

500
259419237 259419237
71604627 71604627
140848485 140848485
45258355 45258355
417882612 417882612
70908445 70908445
647789306 647789306
269825295 269825295
528839543 528839543
35956097 35956097
555387597 555387597
114446845 114446845
663753828 663753828
236039707 236039707
730686123 730686123
1874...

output:

818775560

result:

ok single line: '818775560'

Test #3:

score: 9
Accepted
time: 1ms
memory: 3828kb

input:

500
409222683 409222683
424488829 424488829
415529128 415529128
852855991 852855991
199702963 199702963
121993369 121993369
660424994 660424994
247915283 247915283
11387254 11387254
198385312 198385312
49663799 49663799
640850062 640850062
123783577 123783577
460294327 460294327
41816505 41816505
77...

output:

676116158

result:

ok single line: '676116158'

Test #4:

score: 9
Accepted
time: 1ms
memory: 3568kb

input:

500
619714633 619714633
470637076 470637076
88903555 88903555
219610285 219610285
213164397 213164397
438259138 438259138
640791314 640791314
306721667 306721667
225421135 225421135
233222391 233222391
205820722 205820722
692168797 692168797
48417870 48417870
398991106 398991106
393107546 393107546
...

output:

826747956

result:

ok single line: '826747956'

Test #5:

score: 9
Accepted
time: 1ms
memory: 3632kb

input:

500
781499655 781499655
32818153 32818153
128804256 128804256
106725036 106725036
373502067 373502067
522124816 522124816
327019589 327019589
28487843 28487843
242370575 242370575
340419621 340419621
156024191 156024191
293959833 293959833
651063779 651063779
185398156 185398156
23810548 23810548
15...

output:

796144690

result:

ok single line: '796144690'

Test #6:

score: 9
Accepted
time: 1ms
memory: 3632kb

input:

500
471686 471686
89197062 89197062
4486841 4486841
223318132 223318132
5382727 5382727
6119192 6119192
6920252 6920252
7400635 7400635
8953527 8953527
9453109 9453109
10297661 10297661
11088577 11088577
11747318 11747318
13120793 13120793
13620658 13620658
13858796 13858796
14388301 14388301
146049...

output:

287072213

result:

ok single line: '287072213'

Test #7:

score: 9
Accepted
time: 1ms
memory: 3620kb

input:

500
753345 753345
807697 807697
1544540 1544540
2467957 2467957
2620013 2620013
4381651 4381651
5343267 5343267
5650005 5650005
6291995 6291995
7239714 7239714
8727983 8727983
9137734 9137734
9167898 9167898
10039210 10039210
10042325 10042325
11550040 11550040
11642995 11642995
12967910 12967910
13...

output:

454779099

result:

ok single line: '454779099'

Test #8:

score: 9
Accepted
time: 1ms
memory: 3632kb

input:

500
2121408 2121408
2590977 2590977
2954510 2954510
3391039 3391039
3456654 3456654
3749072 3749072
4891660 4891660
5175214 5175214
25595893 25595893
8207147 8207147
8471111 8471111
8542387 8542387
8571053 8571053
9561645 9561645
9686851 9686851
9766228 9766228
10735337 10735337
11488198 11488198
11...

output:

794869016

result:

ok single line: '794869016'

Test #9:

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

input:

500
1067490 1067490
187728209 187728209
2331190 2331190
2402125 2402125
2635735 2635735
2952562 2952562
2996248 2996248
3434435 3434435
3506579 3506579
4727619 4727619
4948298 4948298
6100013 6100013
7237778 7237778
9714151 9714151
11703576 11703576
148126723 148126723
14940558 14940558
16312000 163...

output:

620087548

result:

ok single line: '620087548'

Test #10:

score: 9
Accepted
time: 1ms
memory: 3516kb

input:

500
2212852 2212852
2573958 2573958
3807064 3807064
4541303 4541303
4738320 4738320
5370702 5370702
5432558 5432558
371112074 371112074
8844474 8844474
8853776 8853776
9304445 9304445
11586488 11586488
12141143 12141143
12744747 12744747
15599671 15599671
15817906 15817906
146704510 146704510
163676...

output:

271082404

result:

ok single line: '271082404'

Test #11:

score: 9
Accepted
time: 1ms
memory: 3664kb

input:

500
524893 524893
2750062 2750062
3570891 3570891
4638547 4638547
4674487 4674487
4862482 4862482
5519675 5519675
9272918 9272918
9748535 9748535
9864262 9864262
10265009 10265009
15407366 15407366
16115070 16115070
16840848 16840848
17360063 17360063
17484830 17484830
17877302 17877302
19863611 198...

output:

822157788

result:

ok single line: '822157788'

Test #12:

score: 9
Accepted
time: 1ms
memory: 3640kb

input:

500
1540808 1540808
1937564 1937564
5283319 5283319
7804041 7804041
8433829 8433829
823139355 823139355
10494027 10494027
10546482 10546482
10621868 10621868
12153702 12153702
14415814 14415814
14426450 14426450
14804293 14804293
397985392 397985392
16988704 16988704
18836771 18836771
19696492 19696...

output:

455632768

result:

ok single line: '455632768'

Test #13:

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

input:

500
245210 245210
386280 386280
901085 901085
1260725 1260725
2429888 2429888
2654946 2654946
5006386 5006386
5371303 5371303
5813686 5813686
6154770 6154770
6350055 6350055
6508782 6508782
7456974 7456974
8140422 8140422
10003117 10003117
10268361 10268361
10642582 10642582
12660838 12660838
129157...

output:

902897517

result:

ok single line: '902897517'

Test #14:

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

input:

500
1114055 1114055
1562475 1562475
2053281 2053281
3495973 3495973
5137725 5137725
5658217 5658217
8216527 8216527
309196291 309196291
10687446 10687446
12153021 12153021
13249709 13249709
14657222 14657222
16140910 16140910
16171193 16171193
17460544 17460544
53076303 53076303
18954216 18954216
20...

output:

405249073

result:

ok single line: '405249073'

Test #15:

score: 9
Accepted
time: 1ms
memory: 3632kb

input:

500
1221260 1221260
1536448 1536448
1596219 1596219
3817144 3817144
5547038 5547038
5835095 5835095
8575834 8575834
13879314 13879314
13995687 13995687
14266986 14266986
16029893 16029893
16046286 16046286
16527064 16527064
35000863 35000863
18449319 18449319
18985127 18985127
19461392 19461392
1948...

output:

346378962

result:

ok single line: '346378962'

Test #16:

score: 9
Accepted
time: 1ms
memory: 3524kb

input:

500
158450518 158450518
398419544 398419544
15852367 15852367
147721606 147721606
189509271 189509271
12933510 12933510
38041970 38041970
268576530 268576530
752348312 752348312
158603479 158603479
515657574 515657574
277993122 277993122
158450518 158450518
8997617 8997617
841673344 841673344
117222...

output:

812086153

result:

ok single line: '812086153'

Test #17:

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

input:

500
557602055 557602055
181162629 181162629
632543712 632543712
666184058 666184058
682380195 682380195
553262662 553262662
632543712 632543712
635814815 635814815
229155517 229155517
208595757 208595757
472562424 472562424
714082069 714082069
728505635 728505635
321600780 321600780
109570005 109570...

output:

908497906

result:

ok single line: '908497906'

Test #18:

score: 9
Accepted
time: 1ms
memory: 3672kb

input:

500
98524121 98524121
114027386 114027386
126071599 126071599
190426100 190426100
3643106 3643106
98524121 98524121
818260656 818260656
177510656 177510656
149595703 149595703
114980573 114980573
163331808 163331808
98524121 98524121
114980573 114980573
659960023 659960023
7634737 7634737
662508335 ...

output:

456073831

result:

ok single line: '456073831'

Test #19:

score: 9
Accepted
time: 1ms
memory: 3600kb

input:

500
242086234 242086234
698376795 698376795
261877241 261877241
844564041 844564041
183035910 183035910
382328127 382328127
80253578 80253578
203346776 203346776
912382968 912382968
93064185 93064185
431774176 431774176
278790959 278790959
363084713 363084713
273437132 273437132
678641564 678641564
...

output:

340749954

result:

ok single line: '340749954'

Test #20:

score: 9
Accepted
time: 1ms
memory: 3628kb

input:

500
96243961 96243961
558940945 558940945
262224079 262224079
535961870 535961870
518474366 518474366
96243961 96243961
783348140 783348140
181632008 181632008
584798581 584798581
173499219 173499219
52148740 52148740
2733695 2733695
2733695 2733695
284315759 284315759
643050814 643050814
457614794 ...

output:

957883219

result:

ok single line: '957883219'

Subtask #2:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Test #21:

score: 0
Wrong Answer
time: 0ms
memory: 3620kb

input:

500
2425 2847
684 2839
462 1824
1522 4144
2140 3238
1750 4806
224 703
3351 5040
2882 2950
345 3747
794 2651
991 1127
639 2031
1118 2638
1264 2846
1537 2048
745 1969
4864 4903
3354 3752
1291 4991
448 4482
297 1945
4822 4929
2538 5080
1883 4299
828 4709
1273 4804
1927 4361
254 1956
832 1451
2791 2902
...

output:

595391332

result:

wrong answer 1st lines differ - expected: '359985632', found: '595391332'

Subtask #3:

score: 0
Wrong Answer

Test #41:

score: 0
Wrong Answer
time: 0ms
memory: 3524kb

input:

100
191358459 947004691
342443850 366915813
22574423 36448174
228846908 747282766
190110113 253913299
93029730 879223713
290883541 747723417
162887369 973643964
586349400 863191444
242642824 878391136
18343882 502405347
18658435 174450786
308510413 787915209
79222154 665119810
422422946 793255277
53...

output:

25747321

result:

wrong answer 1st lines differ - expected: '167281196', found: '25747321'

Subtask #4:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%