Palindrome Dance

药物重定位实战:如何用反向找靶技术挖掘老药新用(附Python代码示例) 本文详细介绍了药物重定位中的反向找靶技术,通过分子相似性计算、机器学习模型和结构对接等方法,挖掘已有药物的新治疗潜力。附Python代码示例,帮助读者快速实现从分子结构到潜在靶标的智能预测,显著提升药物研发效率。 阅读详情

Palindrome Dance
A group of n dancers rehearses a performance for the closing ceremony. The dancers are arranged in a row, they’ve studied their dancing moves and can’t change positions. For some of them, a white dancing suit is already bought, for some of them — a black one, and for the rest the suit will be bought in the future.

On the day when the suits were to be bought, the director was told that the participants of the olympiad will be happy if the colors of the suits on the scene will form a palindrome. A palindrome is a sequence that is the same when read from left to right and when read from right to left. The director liked the idea, and she wants to buy suits so that the color of the leftmost dancer’s suit is the same as the color of the rightmost dancer’s suit, the 2nd left is the same as 2nd right, and so on.

The director knows how many burls it costs to buy a white suit, and how many burls to buy a black suit. You need to find out whether it is possible to buy suits to form a palindrome, and if it’s possible, what’s the minimal cost of doing so. Remember that dancers can not change positions, and due to bureaucratic reasons it is not allowed to buy new suits for the dancers who already have suits, even if it reduces the overall spending.

Input
The first line contains three integers n, a, and b (1≤n≤20, 1≤a,b≤100) — the number of dancers, the cost of a white suit, and the cost of a black suit.

The next line contains n numbers ci, i-th of which denotes the color of the suit of the i-th dancer. Number 0 denotes the white color, 1 — the black color, and 2 denotes that a suit for this dancer is still to be bought.

Output
If it is not possible to form a palindrome without swapping dancers and buying new suits for those who have one, then output -1. Otherwise, output the minimal price to get the desired visual effect.

首尾对应比较根据不同情况确认计入价格
特别注意n的奇偶性,i=n/2时,两边为2,应避免重复

Input
5 100 1
0 1 2 1 2
Output
101

Input
3 10 12
1 2 0
Output
-1

Input
3 12 1
0 1 0
Output
0

#include<iostream>
using namespace std;
int main()
{
	int n, w1, w2, p[25], i,min,sum=0;
	cin >> n >> w1 >> w2;
	min = (w1 < w2) ? w1 : w2;
	for (i = 0; i < n; i++)
	{
		cin >> p[i];
	}
	for (i = 0; i <= n / 2; i++)
	{
		if ((p[i] != p[n - i - 1]) && (p[i] != 2) && (p[n - i - 1] != 2)) break;//不能构成回文
		if ((p[i] == p[n - i - 1]) && (p[i] != 2) && (p[n - i - 1] != 2)) continue;//跳过非2且相等的项
		if (p[i] != 2 && p[n - i - 1] == 2) {                              //p【n-i-1】=2(仅1个)
			p[n - i - 1] = p[i];                                           
			if (p[i] == 1) sum += w2;
			else sum += w1;
		}
		else if (p[i] == 2 && p[n - i - 1] != 2) {                         //p【i】=2(仅1个)
			p[i] = p[n - i - 1];         
			if (p[i] == 1) sum += w2;
			else sum += w1;
		}
		else  {                                                           //两个都是2
			p[i] = p[n - i - 1] = 1;
			if ((n % 2 == 0) || (n % 2 != 0 && i != n / 2))               //n为奇数和偶数要进行区分
				sum += 2 * min;
			else
				sum += min;
		}	
	}
	if (i == n / 2 + 1) cout << sum;
	else cout << -1;
}
Zotero搭配CNKI.js插件:一键批量下载知网文献的完整教程(附常见问题解决) 本文提供Zotero搭配CNKI.js插件实现知网文献批量下载的完整教程。详细介绍了从环境准备、插件安装到实战操作的全流程,并针对常见问题提供解决方案,旨在帮助科研人员高效构建自动化文献管理工作流,显著提升文献收集与整理效率。 阅读详情

相关推荐

2024年上半年网络工程师下午真题及答案解析

位于MPLS域边缘、连接其他网络的LSR称为( 3 ),区域内部的LSR称为核心LSR(CoreLSR)IP报文进入MPLS网络时,MPLS入口设备分析IP报文的内容并为其添加合适的标签,所有MPLS网络中的LSR根据标签转发数据,当该IP报文离开MPLS网络时,标签由出口LER弹出。LSP的出口LER称为( 6 )。某高校网络拓扑如下图所示,两校区核心(CORE-1、CORE-2),出口防火墙(NGFW-1、NGFW-2)通过校区间光缆互联,配置OSPF实现全校路由收敛,两校区相距40km。

bsefef的博客 2475

codeforces 1040a (回文数的舞蹈)

原题链接 A. Palindrome Dance A group of n dancers rehearses a performance for the closing ceremony. The dancers are arranged in a row, they’ve studied their dancing moves and can’t change positions. For...

starlet_kiss的博客 381

【MMDetection3.0实战】从零构建自定义数据集训练流程

本文详细介绍了使用MMDetection3.0框架从零开始构建自定义目标检测数据集的完整训练流程。内容涵盖环境配置、COCO格式数据准备、核心代码改造、模型配置与训练策略调优,以及最终的模型测试与验证,帮助开发者快速上手并训练自己的检测模型。

l6m7n8的博客 314

Codeforce - 1040B - Shashlik Cooking(水题)

Input 5 100 1 0 1 2 1 2 Output 101 Input 3 10 12 1 2 0  Output -1 Input 3 12 1 0 1 0  Output 0 Source::Click here 题意  有n个舞者排成一排,她们其中一些人买了白色衣服,一些人买了黑色衣服,还有一些人未买衣服。目的:为了使舞者所穿的衣服颜色形...

Alibaba_lhl的博客 566

SPICE仿真软件:Ngspice_(2).安装与配置

在Netlist文件中直接定义模型。V1 1 0 5R1 2 0 1k* Analysis库文件中可以包含多种电路元件模型和参数。

kkchenjj的博客 1586

Python爬虫实战:使用最新技术爬取新华网新闻数据

在当今信息爆炸的时代,网络爬虫技术已经成为获取互联网数据的重要手段。作为国内权威新闻媒体,新华网每天发布大量高质量的新闻内容,这些数据对于舆情分析、市场研究、自然语言处理等领域具有重要价值。本文将详细介绍如何使用Python最新技术构建一个高效、稳定的新华网新闻爬虫系统。本文详细介绍了如何使用Python最新技术栈构建一个高效、稳定的新华网新闻爬虫系统。我们从基础爬虫开始,逐步添加了代理支持、用户代理轮换、请求延迟、重试机制、动态页面渲染、数据存储等高级功能,最终实现了一个生产可用的分布式爬虫系统。

2201_76125261的博客 1771

Codeforces Round #507 (Div. 2, based on Olympiad of Metropolises) A. Palindrome Dance

problem link:http://codeforces.com/contest/1040/problem/A 题意:给你一个n和一个含有n个数字的数组,其中数组只包含0(白色已买0),1(黑色已买),2(未买);再给你两个值a,b分别代表买一套白色套装的费用和买一套黑色套装的费用。问为了使这个数组成为一个回文串,最少需要花费多少来购买服装。 解题报告: (1)由于n,a,b给的都很小。所...

Light2Chasers的博客 340

提高RFID检测距离以及检测速度的方法总结

摘要:提高RFID检测距离需优化阅读器功率、标签灵敏度、天线设计及频段选择,同时减少环境干扰;提升检测速度则需改进防碰撞算法、增强并行处理能力、精简数据传输。实际应用需平衡两者关系,如物流仓储采用UHF频段、高增益天线和动态Q算法实现远距离高速读取,ETC系统则通过微波频段和高速调制实现超远距离快速识别。不同场景需针对性优化硬件配置和系统参数。

start_up_go的博客 293

Codeforces Round #507 (Div. 2, based on Olympiad of Metropolises) B. Shashlik Cooking

problem link:http://codeforces.com/contest/1040/problem/B 题意:给你一个n代表有n个初始状态为正面的羊肉串,k代表你每次可以随机选择一个数值i,并把第 i-k 到第 i+k 个羊肉串翻过来。问你最少需要多少次可以把所有羊肉串全部翻过来。 解题报告:经过观察发现,当k==0时,那就需要翻n次了,当n&lt;=(2*k)+1时,肯定翻中间那个...

Light2Chasers的博客 525

RAGFlow 系列教程 第14课:GraphRAG -- 知识图谱增强检索

RAGFlow v0.25.0深度解读了GraphRAG技术,通过构建知识图谱解决传统RAG在多跳推理问题上的局限。系统支持General GraphRAG和Light GraphRAG两种实现,包含四阶段构建流程:实体关系抽取、实体消解、社区检测和图持久化。核心代码位于rag/graphrag目录,采用LLM驱动的抽取机制,结合编辑距离和LLM确认的实体消解策略,以及Leiden社区检测算法。KGSearch模块通过多信号融合检索(实体+关系+N-hop+社区)实现高效查询。该系统将非结构化文本转化为可推

weixin_43674738的博客 101

传统(经典)粒子群算法(PSO)解决单目标优化问题

智能算法:粒子群算法(particle swarm optimizer)—PSO %原理:(1)种群初始化–N(种群数)–D(个体数)–x(i)(粒子位置)–v(i)(粒子速度) % (2)计算每个粒子的适应度值–而适应度值需要选择适应度函数 % (3)对于每个粒子,使用它的适应度值fit[i]和个体的极值pbest(i)进行比较,如果fit[i]>pbest(i),则pbest(i)=fit[i] % (4)同理,对每个粒子用它的适应值与全局极值进行比较,如果比它大,则

weixin_51631044的博客 1295

CF1040A Palindrome Dance

原题链接:http://codeforces.com/contest/1040/problem/A Palindrome Dance A group of nnn dancers rehearses a performance for the closing ceremony. The dancers are arranged in a row, they’ve studied their da...

ShadyPi的IT笔记 337

【人工智能】提示词工程:让大模型精准响应的核心技术,提示词的基础框架 以及 常见提示词框架及场景

编写提示词的基础原则包括:简单、明确、详细,提示词拥有零样本提示、少样本提示、分配角色、提示写作风格、限定输出格式等技巧。

奶爸的编程之路,也就一周冷个三天 1138

1040A Palindrome Dance

点击传送门查看题目:传送门 题意:有n个人,要每个穿西服,有三种情况,一种是穿了白色0西装, 一种是穿了黑色的1西装,还有一种没有穿用2表示, 现在需要给没有穿的人买西装,让他们颜色形成回文串,如果不可能形成就输出-1。 题解:模拟  两边向中间判断,如果是不相等,并且没有2,就输出-1,如果两个相等都为2,ans就加花费小的*2,如果相等不为2,就跳过,如果不想等,把2变成对面那个对应的颜...

memory_qianxiao的博客 550

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

A. Palindrome Dance

滴答滴答---题目链接 time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output A group of nn dancers rehearses a performance for the closing ceremony...

chen_zan_yu_的博客 214

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

Codeforces1040A Palindrome Dance

优快云失踪人口回归了,毕竟还是要准备SOI的,从今天开始重新写题解了 A. Palindrome Dance 题意 给出一串由0,1,2表示的数字,0和1分别表示不同的颜色,2表示无色,和两种变色的花费,现在使这串数字变为回文串,使得总花费最小 题解 从左到右,分几种情况讨论下就好了,分类讨论 code #include&amp;amp;amp;lt;iostream&amp;amp;amp;gt; #inc...

Welcome to yjjr's blog! 221

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Codeforces Round #507 A. Palindrome Dance

厚颜无耻地在赛后发一波水题题解骗博客访问量 果然本人英语还是太菜了,出思路不到半分钟,看题却看了五分钟......QAQ 题意:给出一段由0,1,2构成的串,要求用最少的花费将其改为回文串。 可以将某个位置的2改为0或1,费用分别为a或b. 如果不能改为回文串,输出-1; 如果可以,输出最小花费。 题解:既然要改成回文串,那么就从两边开始向中间扫(从中间开始向两边扫也可以)。对于应该相同...

dieyi0310的博客 159

【Codeforces Round #507 (Div. 2, based on Olympiad of Metropolises) A】Palindrome Dance

【链接】 我是链接,点我呀:) 【题意】 在这里输入题意 【题解】 i从1..n/2循环一波。 保证a[i]和a[n-i+1]就好。 如果都是2的话填上min(a,b)*2就好 其他情况跟随非2的。 【代码】 #include <bits/stdc++.h> #define LL long long #define rep1(i,a,b) for (int...

AWCXV 124

cf----2019-09-30(Diagonal Walking v.2,Maximum Sum of Digits, Palindrome Dance)

城市黎明的灯火,总有光环在陨落,模仿者一个又一个,无人问津的角色,你选择去崇拜谁呢,怨恨谁呢? Mikhail walks on a Cartesian plane. He starts at the point(0,0)(0,0), and in one move he can go to any of eight adjacent points. For example, if M...

0k-ok 316

codeforces_1040_A Python练习

codeforces1040APalindrome Dance A group ofnndancers rehearses a performance for the closing ceremony. The dancers are arranged in a row, they've studied their dancing moves and can't change positi...

weixin_30617797的博客 170

CF 2018.09.06 00:35 题解(补)

比赛题目链接:http://codeforces.com/contest/1040 A. Palindrome Dance A group of nn dancers rehearses a performance for the closing ceremony. The dancers are arranged in a row, they've studied their dancing...

小白 493

【期末算法课程设计十道题】-【数组】-【1-我真是醉了 】

大家好,我是被白菜拱的猪。 一个热爱学习废寝忘食头悬梁锥刺股,痴迷于girl的潇洒从容淡然coding handsome boy! Time goes quickly!啊!没想到大二就这么稀里糊涂的过去,由于疫情原因,终究是没有开学,一学期啥也没听的我,最后还要做这个期末算法设计,不做不行啊,这日后可咋整啊,屁都不会,哪家公司要你。 只要功夫深,铁杵磨成绣花针。十道算法题,在没有听一节课的情况下,通过自学在查查百度看看能做出多少,在这里记录一下,奥利给!!! 我真是醉了,一道题竟然做一下午,是瞧不起我ja

放开这颗白菜让我来 780

差分加模拟

题目 #include<bits/stdc++.h> using namespace std; const int N=1e5+10; int qz[N],hz[N]; int cnt[N],sum[N]; void update(int l,int r,int x,int *p) { p[l]+=x; p[r+1]-=x; } int main() { int t; cin>>t; while(t--) { int n,m,q; scanf("%d%d%d",&

Hello_wcrd的博客 1075

蓝桥杯 国赛 2021

#include<iostream> using namespace std; int xl[100],cl; long long dp[2][100][100]; int main() { long long n; int k; cin>>n>>k; while(n) { xl[++cl]=n%2; n/=2; } for(int i=0;i<=cl;i++) dp[0][i]

Hello_wcrd的博客 893

欧拉筛和埃氏筛求质因子个数

埃氏筛法简单易懂直接上代码 void solve() { for(int i=2;i<=20000000;i++) if(!test[i]) for(int j=i;j<=20000000;j+=i) test[j]++; } 欧拉筛: 根据算法原理将一个非质数通过他的最小质因子筛出,留下的便是质数,s=ip如果p小于i的最小质因子s的质因子比i多1,否则相等。那么: void solve() { int

Hello_wcrd的博客 795
上一篇: B. Chilly Willy
下一篇: B - Tanya and Postcard
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值