传送门 解题思路 直接按奇偶层染色是错的,\(WA\)了好几次,所以要树形\(dp\),感觉最多\(log\)种颜色,不太会证. 代码 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; const int N=10005; inline int rd(){ int x=0,f=…
Search GO 说明:输入题号直接进入相应题目,如需搜索含数字的题目,请在关键词前加单引号 Problem ID Title Source AC Submit Y 1000 A+B Problem 10983 18765 Y 1036 [ZJOI2008]树的统计Count 5293 13132 Y 1588 [HNOI2002]营业额统计 5056 13607 1001 [BeiJing2006]狼抓兔子 4526 18386 Y 2002 [Hnoi2010]Bounce 弹飞绵羊 43…
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /Users/angela/.rbenv/versions/1.9.3-p545/bin/ruby -r ./siteconf20170106-59264-robjdg.rb extconf.rb --use-system-libraries checking if the C compiler accepts ... yes checking if the C…
使用下面命令安装报错 gem install pg 错误: [root@AS-test middle_database]# gem install pgBuilding native extensions. This could take a while...ERROR: Error installing pg: ERROR: Failed to build gem native extension. current directory: /usr/local/rvm/gems/rub…
OS X El Capitan 新特性(System Integrity Protection or SIP)中加强了权限,但是可以对这里进行操作 /usr/local/bin 可以尝试使用以下指令进行jekyll的安装(亲测可行,安装完毕后terminal中输入jekyll即可看到是否生效): sudo gem install -n /usr/local/bin/ jekyll 这条指令告诉gem,把jekyll安装到不受SIP保护的文件夹,而不是安装到默认/Library/Ruby/Gems…
Gemfile分平台加载gem 区分平台以便加载不同的web server,象tzinfo-data只适用于windows # Windows does not include zoneinfo files, so bundle the tzinfo-data gem if RUBY_PLATFORM=~ /win32|mingw/ gem 'tzinfo-data' gem 'thin' else gem 'puma' end…