QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#859110#9717. Defuse the BombszhenghanyunCompile Error//C11276b2025-01-17 15:14:582025-01-17 15:14:58

Judging History

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

  • [2025-01-17 15:14:58]
  • 评测
  • [2025-01-17 15:14:58]
  • 提交

answer

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