数论
0.0
WarBlood
怨尤不会让困难消失,
但乐观会让人更加强大。
展开
-
数论 题目集
HDU 5776 sum codeforce F. Fair Distribution codeofrces Do you want a date?原创 2021-05-21 13:45:10 · 107 阅读 · 0 评论 -
HDU 5776 sum
Problem Description Given a sequence, you’re asked whether there exists a consecutive subsequence whose sum is divisible by m. output YES, otherwise output NO Input The first line of the input has an integer T (1≤T≤10), which represents the number of test原创 2021-03-22 19:30:42 · 116 阅读 · 0 评论 -
18th 浙江省省赛 F. Fair Distribution
题目链接:https://codeforces.com/gym/103055/problem/F 题面: 给你一个n表示有多少机器人,m表示有多少能量棒。机器人每次只能减少,能量棒每次只能增加,消耗1金。问最少消耗多少钱让 m%n==0; 思路: (m-1) / i * i 用整数分块求最小值 AC代码: /** * @Author: WarBlood 584299804@qq.com * @Create: 2021/5/20 20:26 */ #include <bits/stdc++.h原创 2021-05-20 20:27:15 · 782 阅读 · 3 评论 -
codeofrces Do you want a date?
C. Do you want a date? time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately原创 2021-02-27 15:11:04 · 258 阅读 · 0 评论