- 博客(8)
- 收藏
- 关注
原创 Codeforces Round #639 (div2)
A. Puzzle Pieces 求能否将拼图拼成nm,可推出只有当nm <= n+m才能满足条件 #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <vector> using namespace std; typedef long long ll; const int
2020-05-11 23:32:10
213
原创 Knights in Chessboard (找规律)
Knights in Chessboard (找规律) LightOJ-1010 解题思路: 如果只有一行、一列, 放满; 如果只有两行,每隔一个田字格可以放一个田字格; 其他情况可全放白格子或全放黑格子; #include <algorithm> #include <cmath> #include <cstdio> #include <cstring&...
2020-02-20 13:54:31
437
原创 Leading and Trailing(快速幂+思维)
Leading and Trailing LightOJ - 1282 You are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits of nk. Input Input starts with an in...
2020-01-10 22:02:48
263
原创 Goldbach`s Conjecture(线性筛法)
Goldbach`s Conjecture LightOJ - 1259 Goldbach’s conjecture is one of the oldest unsolved problems in number theory and in all of mathematics. It states: Every even integer, greater than 2, can be expr...
2020-01-10 21:35:05
545
1
原创 Harmonic Number (II) (规律题)
Harmonic Number (II) LightOJ - 1245 I was trying to solve problem ‘1234 - Harmonic Number’, I wrote the following code long long H( int n ) { long long res = 0; for( int i = 1; i <= n; i++ ...
2020-01-10 21:04:43
273
原创 Sigma Function(唯一分解定理)
Sigma Function LightOJ - 1336 Sigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes the sum of all divisors of a numbe...
2020-01-09 18:15:58
1099
2
原创 Aladdin and the Flying Carpet (唯一分解定理)
Aladdin and the Flying Carpet LightOJ - 1341 It’s said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first m...
2020-01-08 17:58:07
518
原创 Bi-shoe and Phi-shoe(欧拉函数)
Bi-shoe and Phi-shoe LightOJ - 1370 Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his students, so ...
2020-01-08 16:43:58
332
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人