• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






何以解忧唯理甚慷

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 2 3 4 5 6 ··· 10 下一页

2019年2月17日

cf1113 C. Sasha and a Bit of Relax
摘要: #include using namespace std; int cnt[2][1100000]; int a[300010]; int main() { int n; scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&a[i]); int tmp=0; long long ans=0; ... 阅读全文
posted @ 2019-02-17 20:56 何以解忧唯理甚慷 阅读(178) 评论(0) 推荐(0)
 

2019年2月15日

D. Jongmah cf1110
摘要: #include using namespace std; int a[1000010]; long long dp[1000010][3][3]; int main() { int n,m; scanf("%d%d",&n,&m); for(int i=1;ia[i]) continue; ... 阅读全文
posted @ 2019-02-15 20:41 何以解忧唯理甚慷 阅读(181) 评论(0) 推荐(0)
 
cf992 D. Nastya and a Game
摘要: #include using namespace std; typedef long long ll; ll a[200010]; int vis[200010]; ll ans; int main() { ll n,k; scanf("%lld%lld",&n,&k); for(int i=1;i=1;i--) { if(a[i]>1) ... 阅读全文
posted @ 2019-02-15 11:40 何以解忧唯理甚慷 阅读(398) 评论(0) 推荐(0)
 

2019年2月14日

洛谷p1430 序列取数
摘要: #include//别人的代码 #include #include #include using namespace std; #define R register inline int read() { char ch=getchar(); int x=0;bool s=1; while(!isdigit(ch)){if(ch=='-')s=0;... 阅读全文
posted @ 2019-02-14 11:03 何以解忧唯理甚慷 阅读(151) 评论(0) 推荐(0)
 

2019年2月12日

洛谷 P2054 [AHOI2005]洗牌
摘要: 逆元是积性函数,这道题还用了一个mul函数,防止爆long long 阅读全文
posted @ 2019-02-12 18:32 何以解忧唯理甚慷 阅读(121) 评论(0) 推荐(0)
 

2019年2月11日

1114D . Flood Fill
摘要: 这道题还可以转化成最长回文串,实际的答案是 离散化后的数组最长回文串切成一半有几个数字,这些数字就是中间的数字需要对齐的对象,所以不用改变 阅读全文
posted @ 2019-02-11 17:18 何以解忧唯理甚慷 阅读(211) 评论(0) 推荐(0)
 
cf1114 D. Flood Fill
摘要: 区间dp,要明确当前区间到哪里去 阅读全文
posted @ 2019-02-11 16:34 何以解忧唯理甚慷 阅读(254) 评论(0) 推荐(0)
 
cf1114 C. Trailing Loves (or L'oeufs?)
摘要: 注意题目中一旦有大于1e9的数字,所有变量全用Longlong替代,包括i,j 或者一开始直接define int longlong ,然后之后主函数用int32_t,输入输出用int32_t替代 阅读全文
posted @ 2019-02-11 11:01 何以解忧唯理甚慷 阅读(389) 评论(0) 推荐(0)
 

2019年2月10日

快速幂模板
摘要: ll modpow(ll a, ll b) { ll ans = 1, base = a%MOD; while(b != 0) { if(b&1 != 0) ans = (ans*base)%MOD; base = (base*base)%MOD; b >>= 1; } return... 阅读全文
posted @ 2019-02-10 21:20 何以解忧唯理甚慷 阅读(96) 评论(0) 推荐(0)
 
cf992 C. Nastya and a Wardrobe
摘要: #include using namespace std; const int MOD=(int)1e9+7; typedef long long ll; ll poww(ll a, ll b) { ll ans = 1, base = a%MOD; while(b != 0) { if(b&1 != 0) ans = (ans*b... 阅读全文
posted @ 2019-02-10 21:19 何以解忧唯理甚慷 阅读(245) 评论(0) 推荐(0)
 
上一页 1 2 3 4 5 6 ··· 10 下一页