QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#43894 | #4563. Radio Towers | Y25t# | 0 | 26ms | 4916kb | C++11 | 435b | 2022-08-11 15:20:50 | 2024-05-26 01:04:19 |
Judging History
answer
#include"towers.h"
#include<bits/stdc++.h>
#define N 100005
int n,a[N],b[N];
void init(int n_,std::vector<int> A){
n=n_;
for(int i=1;i<=n;i++)
a[i]=A[i-1];
a[0]=a[n+1]=1e9+1;
for(int i=1;i<=n;i++)
b[i]=a[i]<a[i-1]&&a[i]<a[i+1];
for(int i=1;i<=n;i++)
b[i]+=b[i-1];
}
int max_towers(int L,int R,int D){
assert(D==1);
L++,R++;
if(L==R)
return 1;
return b[R-1]-b[L]+(a[L]<a[L+1])+(b[R]<b[R-1]);
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Runtime Error
Test #1:
score: 0
Runtime Error
input:
59640 49885 57346 58504 87383 113182 129676 204090 205404 259925 276583 300332 324014 333675 359377 364049 408489 414852 428310 438038 440113 458193 554789 643468 666525 683112 690791 707313 720088 741028 748785 789826 796576 800966 832867 851750 861044 862283 900756 926925 939560 955678 965636 9740...
output:
result:
Subtask #2:
score: 0
Runtime Error
Test #8:
score: 0
Runtime Error
input:
425 753881706 405729786 890889563 29736246 598281970 208352067 357783003 663497023 178397034 4832890 562140755 510307001 354540290 538848551 436879256 86659033 42928516 24145404 749159097 118423198 506851985 204895765 719719998 726244368 991372008 681703480 799303017 657138050 88278945 417801236 260...
output:
result:
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Wrong Answer
Test #65:
score: 0
Wrong Answer
time: 26ms
memory: 4916kb
input:
99308 491693640 24020487 317364185 726230755 737284540 951143270 709116045 641023337 360629062 964879440 47884022 532494780 803629825 635450854 688041998 573937055 113198481 191311841 929603572 636688 598629732 895342035 396521271 619919754 716589045 657789547 373121546 866402108 609316614 60046511 ...
output:
11902 4769 14277 13956 570 9307 4388 9 22096 16783 26036 2813 8487 16601 2028 6157 17236 29707 19863 12083 20815 18089 4195 11612 4622 6657 7659 623 9838 13011 14474 11799 14794 6365 7308 5981 13613 14207 15922 17324 6020 10291 1819 29076 3117 6637 5810 28746 14943 9540 5497 1014 5001 20937 305 1993...
result:
wrong answer 3rd lines differ - expected: '11903', found: '11902'
Subtask #5:
score: 0
Runtime Error
Test #86:
score: 0
Runtime Error
input:
23881 605288257 422163932 155875880 339929874 76049859 196344969 958160745 767945284 469191956 997116006 387749577 15911341 920437918 367576975 800789357 351557615 283723284 369507452 841548133 643412903 309731505 256549694 370065644 699518122 559017597 347646657 469353381 575240521 501893001 454519...
output:
result:
Subtask #6:
score: 0
Runtime Error
Test #97:
score: 0
Runtime Error
input:
88768 238644804 620122421 789364401 899010695 885388612 437964772 845379533 657562749 773925456 625793781 916240972 291506550 379611161 905077982 629848170 530056471 520438258 806293637 326792996 785404568 74285074 565304193 846963319 63529729 804909008 212070492 69936548 656129389 408708069 3070450...
output:
result:
Subtask #7:
score: 0
Skipped
Dependency #1:
0%