我好像在报错的同时进入了C++的头文件库!!! 在一天我写程序的时候,日常语法报错,可是在我查看报错的时候,突然点进了一个数据库,应该是头文件库,粘贴出来给大家看看: // C++ includes used for precompiling -- C++ --
// Copyright (C) 2003-2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version.
// This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/// http://www.gnu.org/licenses/. * @file stdc++.h This is an implementation file for a precompiled header. */
// 17.4.1.2 Headers
然后下面就是一堆头文件,有C的,有C++的!!!非常全面,基本上都有了!!!!!!
哪位大神知道啥意思啊??? 源程序如下:
include
//必须要用万能头文件!!!!!!!!!
#define N 1000005
#define ll long long
using namespace std;
int a[N],n;
int m,max;
int maxf(int x, int y){return x>y?x:y;}
bool check(int x)
{
int s = 0;
for (int i = 1; i <= n; i++)
{
s+=maxf(a[i] - x,0);
if (s >= m) return true;
}
return false;
}
int main()
{
scanf("%d%lld", &n, &m);
for (int i = 1; i <= n; i++)
{
scanf("%d", &a[i]);
if (a[i] > max)
max = a[i];
}
int l=0,r=max;
int ans = 0;
while (l < r)
{
int mid = (l + r) / 2;
if (check(mid))
{
l = mid + 1;
ans = mid;
}
else r = mid;
}
printf("%d", ans);
}
//end
除了前三条报错以外,其他的报错点击进去,都能进入一个新世界!!!
大佬帮我看看咋回事????
@xushuoxin