训练记录

11.22 #不孤不咕

1001.A+B Problem
1002.【样题0】猜数
1003.【样题1】A-B Problem
1004.【样题2】人以群分
1005.【样题3】最小环
1006.【样题4】再猜一次
1007.【样题5】情人节

  • 1008.【样题6】组合数问题
    • 凭本事打的表!!
    • 1009.【样题7】随机动态图

1010.Welcome

  • 1011.Deadline Management
    • 输入不保证有序
      pair<int, int>t[N];
      
  • 1012.撕纸条
    • 与顺序无关
      • 不用保存数组
    • 1013.Counter-Strike: Global Offensive
    • 1014.子段和问题
  • 1015.加减乘除
    • 函数指针数组
      bool (*check[4])(int, int) = { check1,check2,check3,check4 };
      
      • 4个if也可
      • 用一张牌去匹配另一张牌
    • 1016.矩形
    • 1017.流星雨
    • 1018.异或

11.25 #11

    • A - Ascending Rating
    • B - Cut The String
    • C - Dynamic Graph Matching
  • D - Euler Function
    • i f   φ ( x ) ∉ 合 数 if\ \varphi(x)\not\in 合数 if φ(x)
    • x = ∏ p i a i x=\prod p_i^{a_i} x=piai
    • φ ( x ) = ∏ p i a i − 1 ∗ ( p i − 1 ) \varphi(x)=\prod p_i^{a_i-1}*(p_i-1) φ(x)=piai1(pi1)
    • ∴ p i − 1 ∈ 非 合 数 \therefore p_i-1\in 非合数 pi1
    • ∴ p i = = 2 或 3 \therefore p_i==2或3 pi==23
    • x = = 1 或 2 或 3 或 4 或 6 x==1或2或3或4或6 x==12346
    • E - Find The Submatrix
  • F - Grab The Tree
    • 后者没有选择
    • 异或和永远相等
    • 先手永远不输
    • G - Interstellar Travel
    • H - Monster Hunter
    • I - Random Sequence
    • J - Rectangle Radar Scanner
    • K - Transport Construction
  • L - Visual Cube
    • 按顺序打印
    • M - Walking Plan

11.29 #12

  • A - Buy and Resell
    • 贪心
      • 在待买和已卖的小根堆中找最小的买入卖出
    • B - Congruence equation
  • C - Dream
    • 费马小定理
      • 重定义加法和乘法
      • ( n + m ) p = n p + m p (n+m)^p=n^p+m^p (n+m)p=np+mp
      • 可行解: ( n + m ) p ≡ n p + m p ≡ n + m ( m o d   p ) (n+m)^p\equiv n^p+m^p\equiv n+m(mod\ p) (n+m)pnp+mpn+m(mod p)
  • D - Find Integer
    • 费马大定理
      • 整数 n > 2 n>2 n>2时,关于 x , y , z x, y, z x,y,z的方程 x n + y n = z n x^n + y^n = z^n xn+yn=zn没有正整数解
      • 在1995年,英国数学家安德鲁·怀尔斯宣布自己证明了费马大定理
    • E - GuGu Convolution
    • F - Neko and Inu
    • G - Neko’s loop
    • H - Search for Answer
  • I - Tree and Permutation
    • 左*右
    • n ! ∗ ( n − 1 ) C n 2 = 2 ∗ ( n − 1 ) ! \frac{n!*(n-1)}{C_n^2}=2*(n-1)! Cn2n!(n1)=2(n1)!
    • J - YJJ’s Salesman

12.2 #13

  • A - Mischievous Problem Setter
    for (int i = 0; i < n; i++)
    {
        if (m >= a[i].time)
        {
            ++ans;
            m -= a[i].time;
        }
        else break;//重点
    }
    
    • B - Balance of the Force
    • C - GCD Land
    • D - Cube
    • E - Mr. Panda and Cactus
    • F - Cones
  • G - Pastoral Life in Stardew Valley
    • 先 看 行 先看行
      • 空 − 草 − 稻 草 人 − 草 − 空 空-草-稻草人-草-空
      • 至 少 一 个 : 草 , 稻 草 人 至少一个:草,稻草人
      • 至 少 零 个 : 空 至少零个:空
      • ∴ C n + 1 4 \therefore C_{n+1}^4 Cn+14
    • 列 同 理 列同理
      • ∴ C n + 1 4 ⋅ C m + 1 4 \therefore C_{n+1}^4\cdot C_{m+1}^4 Cn+14Cm+14
    • H - Game on the Tree
    • I - Cockroaches
    • J - Mr. Panda and Sequence Puzzle
  • K - Mr. Panda and Kakin
    • e x g c d − Y Y D S exgcd-YYDS exgcdYYDS
    • 分 解 n = p ∗ q , 只 要 n % p = = 0 分解 n=p*q,只要n\%p==0 n=pq,n%p==0
      inline void exgcd(ll a, ll b, ll& x, ll& y)
      {
          if (!b)x = 1, y = 0;
          else exgcd(b, a % b, y, x), y -= a / b * x;
      }
      
  • L - Ultra Weak Goldbach’s Conjecture
    • 法 1 : n − 8 或 n − 9 , 然 后 G o l d b a c h ′ s   c o n j e c t u r e 法1:n-8或n-9,然后Goldbach's\ conjecture 1n8n9Goldbachs conjecture
    • 法 2 : 找 较 大 的 素 数 , 然 后 在 小 范 围 内 G o l d b a c h ′ s   c o n j e c t u r e 法2:找较大的素数,然后在小范围内Goldbach's\ conjecture 2Goldbachs conjecture
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值