QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#859174 | #9717. Defuse the Bombs | IceKylin | Compile Error | / | / | C++17 | 219b | 2025-01-17 16:08:12 | 2025-01-17 16:08:14 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code:1:24: warning: multi-character character constant [-Wmultichar] 1 | long q,c,n,i,l,r,m,s,a['一'];main(){for(c=scanf("%d",&q);c<=q;printf("Case #%d: %d\n",c++,l)){for(scanf("%d",&n),i=n;i;)scanf("%d",a+i--);for(l=0,r=3e9;l<r;s<0?r=m:(l=m+1))for(s=m=l+r>>1,i=n;i;--i)a[i]<m?s-=m-a[i]:0;}} | ^~~~ answer.code:1:30: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 1 | long q,c,n,i,l,r,m,s,a['一'];main(){for(c=scanf("%d",&q);c<=q;printf("Case #%d: %d\n",c++,l)){for(scanf("%d",&n),i=n;i;)scanf("%d",a+i--);for(l=0,r=3e9;l<r;s<0?r=m:(l=m+1))for(s=m=l+r>>1,i=n;i;--i)a[i]<m?s-=m-a[i]:0;}} | ^~~~ answer.code: In function ‘int main()’: answer.code:1:43: error: ‘scanf’ was not declared in this scope 1 | long q,c,n,i,l,r,m,s,a['一'];main(){for(c=scanf("%d",&q);c<=q;printf("Case #%d: %d\n",c++,l)){for(scanf("%d",&n),i=n;i;)scanf("%d",a+i--);for(l=0,r=3e9;l<r;s<0?r=m:(l=m+1))for(s=m=l+r>>1,i=n;i;--i)a[i]<m?s-=m-a[i]:0;}} | ^~~~~ answer.code:1:63: error: ‘printf’ was not declared in this scope 1 | long q,c,n,i,l,r,m,s,a['一'];main(){for(c=scanf("%d",&q);c<=q;printf("Case #%d: %d\n",c++,l)){for(scanf("%d",&n),i=n;i;)scanf("%d",a+i--);for(l=0,r=3e9;l<r;s<0?r=m:(l=m+1))for(s=m=l+r>>1,i=n;i;--i)a[i]<m?s-=m-a[i]:0;}} | ^~~~~~ answer.code:1:1: note: ‘printf’ is defined in header ‘<cstdio>’; this is probably fixable by adding ‘#include <cstdio>’ +++ |+#include <cstdio> 1 | long q,c,n,i,l,r,m,s,a['一'];main(){for(c=scanf("%d",&q);c<=q;printf("Case #%d: %d\n",c++,l)){for(scanf("%d",&n),i=n;i;)scanf("%d",a+i--);for(l=0,r=3e9;l<r;s<0?r=m:(l=m+1))for(s=m=l+r>>1,i=n;i;--i)a[i]<m?s-=m-a[i]:0;}}