QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#859122#9717. Defuse the BombszhenghanyunCompile Error//C11276b2025-01-17 15:33:092025-01-17 15:33:10

Judging History

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

  • [2025-01-17 15:33:10]
  • 评测
  • [2025-01-17 15:33:09]
  • 提交

answer

#import<iostream>
#define L long long
using namespace std;L l,r,m,n,t,i,j=1,s,a[1<<17];int main(){cin>>t;for(;j<=t;++j){cin>>n;for(i=0;i<n;++i)cin>>a[i];for(l=1,r=9e9;l<=r;m=l+r>>1,s=0){for(i=0;i<n;++i)s+=max(0ll,m-a[i]);s<=m?l=m+1:r=m-1;}cout<<"Case #"<<j<<": "<<l<<"\n";}}

Details

answer.code:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
 #import<iostream>
  ^~~~~~
answer.code:1:8: fatal error: iostream: No such file or directory
 #import<iostream>
        ^~~~~~~~~~
compilation terminated.