QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#536900#4563. Radio TowersAldk#0 1ms4088kbC++201.5kb2024-08-29 17:57:222024-08-29 17:57:23

Judging History

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

  • [2024-08-29 17:57:23]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:4088kb
  • [2024-08-29 17:57:22]
  • 提交

answer

#include "towers.h"
#include<bits/stdc++.h>
#define pb push_back
#define pf push_front
//#define mp make_pair
#define F first
#define S second
#define ff first
#define ss second
#define str string
#define ll int
#define ull unsigned ll
#define ld long double
#define pll pair<ll,ll>
#define plll pair<ll,pll>
#define pllll pair<pll,pll>
#define pld pair<ld,ld>
#define vl vector<ll>
#define vll vector<pll>
#define vlll vector<plll>
#define vllll vector<pllll>
#define vb vector<bool>
#define sz size()
#define fr front()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define bk back();
//#pragma GCC target( "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC optimize("Ofast,unroll-loops,fast-math,O3")
using namespace std;
const ld pi=acos(-1.0);
const ll e5=1e5;
const ll e6=1e6;
const ll e9=1e9;
const ll inf=1e9;
const ll mod=1e9+7;
const ll mod2=998244353;
//const ll MOD=106710087877475399;
const ll N=3e2+10;
ll bpm(ll x,ll y,ll m){if(y==0)return 1%m;if(y==1)return x%m;ll p=bpm(x,y/2,m);
if(y%2==0)return p*p%m;else return p*p%m*x%m;}
ll bp(ll x,ll y){if(y==0)return 1;if(y==1)return x;ll p=bp(x,y/2);
if(y%2==0)return p*p;else return p*p*x;}
ll a[N],mx=0;
void init(int N, std::vector<int> H){
    for(ll i=0;i<N;i++){
        a[i]=H[i];
        if(a[i]>a[mx]) mx=i;
    }
}
int max_towers(int L, int R, int D){
    if(L<=mx&&mx<=R&&a[mx]-D>=a[L]&&a[mx]-D>=a[R]) return 2;
    else return 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
Wrong Answer

Test #8:

score: 0
Wrong Answer
time: 1ms
memory: 4088kb

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:

1

result:

wrong answer 3rd lines differ - expected: '13', found: '1'

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Runtime Error

Test #65:

score: 0
Runtime Error

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:


result:


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
Skipped

Dependency #4:

0%

Subtask #7:

score: 0
Skipped

Dependency #1:

0%