摘要:
Math 质数 【试除法判定质数】 质数和合数是针对所有大于1的 “自然数” 来定义的 所有小于等于1的整数既不是质数也不是合数. bool is_prime(int x){ if(x<2)return false; for(int i=2;i<n/i;i++){ if(n%i==0)return 阅读全文
posted @ 2022-10-19 23:32
Dengpc
阅读(43)
评论(0)
推荐(0)
摘要:
Cut Ribbon #include<bits/stdc++.h> using namespace std; const int N=4e3+10; int dp[N],v[4]; //dp[i]表示长度 为i最多能够分成几段 int main(){ int n; cin>>n>>v[0]>>v[ 阅读全文
posted @ 2022-10-19 23:29
Dengpc
阅读(45)
评论(0)
推荐(0)
该文被密码保护。 阅读全文
posted @ 2022-10-19 10:48
Dengpc
阅读(1)
评论(0)
推荐(0)

浙公网安备 33010602011771号