2017ICPC沈阳现场赛G(倍增思想)

【Luogu P6902】[ICPC2014 WF] Surveillance(倍增,贪心) 目录 题目 题目描述 输入格式 输出格式 题面翻译 题目描述 输入格式 输出格式 样例 #1 样例输入 #1 样例输出 #1 样例 #2 样例输入 #2 样例输出 #2 样例 #3 样例输入 #3 样例输出 #3 提示 思路 代码 题目 题目描述 The International Corporation for Protection and Control (ICPC) develops efficient technology for, well, protection and control. Nat 阅读详情

Infinite Fraction Path

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 279    Accepted Submission(s): 34


Problem Description
The ant Welly now dedicates himself to urban infrastructure. He came to the kingdom of numbers and solicited an audience with the king. He recounted how he had built a happy path in the kingdom of happiness. The king affirmed Welly’s talent and hoped that this talent can help him find the best infinite fraction path before the anniversary.
The kingdom has N cities numbered from 0 to N - 1 and you are given an array D[0 ... N - 1] of decimal digits (0 ≤ D[i] ≤ 9, D[i] is an integer). The destination of the only one-way road start from the i-th city is the city labelled ( i2  + 1)%N.
A path beginning from the i-th city would pass through the cities  u1,u2,u3 , and so on consecutively. The path constructs a real number A[i], called the relevant fraction such that the integer part of it is equal to zero and its fractional part is an infinite decimal fraction with digits D[i], D[ u1 ], D[ u2 ], and so on.
The best infinite fraction path is the one with the largest relevant fraction
 

Input
The input contains multiple test cases and the first line provides an integer up to 100 indicating to the total numberof test cases.
For each test case, the first line contains the integer N (1 ≤ N ≤ 150000). The second line contains an array ofdigits D, given without spaces.
The summation of N is smaller than 2000000.
 

Output
For each test case, you should output the label of the case first. Then you are to output exactly N characters which are the first N digits of the fractional part of the largest relevant fraction.
 

Sample Input
  
4 3 149 5 12345 7 3214567 9 261025520
 

Sample Output
  
Case #1: 999 Case #2: 53123 Case #3: 7166666 Case #4: 615015015
 

Source
 

Recommend

jiangzijing2015


解题思路:令ans[i][j]为以i为起点,长度为2^j的路径就行,类似于后缀数组中的基数排序一样,我这里做了一点变化,每次得到新的rank时,用上一次的两个关键字来计算,用第一关键字乘上一个比最大的第二关键字大的数就行,然后把这个乘积加上第二关键字就行,然后排序,得到新的rank,复杂度(O(n * logn * logn)),其实应该还有更好的解法,就是用后缀数组里面的基数排序中的思想就行。


#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxn = 150000 + 10;
int N;
char D[maxn];
int Nxt[maxn];
int dp[maxn];
int Rank[maxn];
char res[maxn];
int temp[maxn];
struct node
{
    int id;
    LL value;
    bool operator <(const node &res) const
    {
        return value < res.value;
    }
} Node[maxn];
int main()
{
    int T;
    //freopen("C:\\Users\\creator\\Desktop\\in1.txt","r",stdin) ;
    //freopen("C:\\Users\\creator\\Desktop\\out.txt","w",stdout) ;
    scanf("%d", &T);

    int Case = 1;
    while(T--)
    {
        scanf("%d", &N);
        scanf("%s", D);
        for(int i = 0; i < N; i++)
        {
            LL x = (LL)i * (LL)i + 1;
            x %= (LL)N;
            Nxt[i] = x;
            dp[i] = i;
        }
        if(N == 1)
        {
            printf("Case #%d: %s\n", Case++, D);
            continue;
        }
        for(int i = 0; i < N; i++)
        {
            Rank[i] = (D[i] - '0');
        }
        int w = 1;
        int ans = -1;
        while(true)
        {
            for(int i = 0; i < N; i++)
            {
                Node[i].id = i;
                LL Nxt1 = dp[i];
                Nxt1 = Nxt[Nxt1];
                temp[i] = dp[Nxt1];
                Node[i].value = (LL)Rank[i] * (LL)(maxn + 1) + (LL)Rank[Nxt1];
            }
            sort(Node, Node + N);
            int p = -1;
            for(int i = 0; i < N; i++)
            {
                dp[i] = temp[i];
                int id = Node[i].id;
                if(i == 0) Rank[id] = ++p;
                else
                {
                    if(Node[i].value == Node[i - 1].value) Rank[id] = p;
                    else Rank[id] = ++p;
                }
            }
            if((1<<w) >= N)
            {
                LL Max = -1;
                for(int i = 0; i < N; i++)
                {
                    if(Rank[i] > Max)
                    {
                        Max = Rank[i];
                        ans = i;
                    }
                }
                break;
            }
            w++;
        }
        int depth = 0;
        res[depth++] = D[ans];
        while(depth < N)
        {
            ans = Nxt[ans];
            res[depth++] = D[ans];
        }
        res[N] = '\0';
        printf("Case #%d: %s\n", Case++, res);
    }

    return 0;
}


2018ICPC沈阳网络赛题解 这是2018ICPC沈阳网络赛的题解,这是2018ICPC沈阳网络赛的题解 立即下载

相关推荐

phaser3适配微信小游戏

phaser3适配微信小游戏

SilenzioX的博客 1805

2018icpc青岛现场赛 F题(思维,倍增,块交换)

题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4063 对于n的大小,对战轮数有规律可循,k&lt;(n&amp;-n)方可分配方案,其余Impossible. #include&lt;cstdio&gt; #include&lt;cstring&gt; #include&lt;iostream&gt; #in...

wwwlps的博客 681

利用setEcoMode优化innovus中的ecoAddRepeater批量操作效率

本文详细介绍了在Cadence Innovus工具中,如何利用setEcoMode命令的batchMode参数,显著提升ecoAddRepeater命令在批量插入buffer或inverter时的操作效率。通过合并重复的初始化和数据库更新开销,该模式可将大规模时序修复操作的执行速度提升数倍,并提供了完整的脚本示例与最佳实践,帮助后端设计工程师优化ECO流程。

mango的博客 514

2018 ICPC青岛网络赛 B. Red Black Tree(倍增lca好题)

BaoBao has just found a rooted tree with n vertices and (n-1) weighted edges in his backyard. Among the vertices, of them are red, while the others are black. The root of the tree is vertex 1 and it's...

weixin_30362233的博客 310

别再死记硬背了!用LTspice和Simulink仿真,5分钟搞懂巴特沃斯、切比雪夫、贝塞尔滤波器的区别

本文通过LTspice和Simulink仿真工具,直观对比了巴特沃斯、切比雪夫和贝塞尔滤波器的特性差异。从通带波纹、过渡带陡峭度到相位线性度,详细解析了三种经典滤波器的设计哲学与应用场景,帮助工程师和学生快速掌握滤波器选型技巧,提升电路设计效率。

weixin_33910191的博客 523

Intouch间接变量(扩展)

间接变量只是Intouch提供给开发者的便捷方式之一,并不是所有情况都一定要使用间接变量,有时候用条件语句或者内存变量的方式也能起到类似的作用。

weixin_41571357的博客 2168

SDNU 1492.Problem_A LCA倍增算法

1492.Problem_A Time Limit: 1000 MS    Memory Limit: 32768 KB Description SDNU ACM-ICPC Association is in a mess. If you join it, you should be in the shadow of a person. This person, we c

富士山下 539

保姆级教程:用Kvaser DB Editor从零创建你的第一个DBC文件(附CAN信号属性详解)

本文提供了一份详细的Kvaser DB Editor教程,指导用户从零开始创建DBC文件,并深入解析CAN信号属性的关键设置。通过步骤清晰的安装指南、信号属性配置详解和实用技巧,帮助工程师和学生快速掌握CAN总线通信的核心工具,提升工作效率。

weixin_27076351的博客 250

ICPC NEAU Programming Contest 2020 D 旅游(单调栈+倍增)

链接 :D 旅游 思路: 单调栈处理出每个点右边第一个大于它的点,然后倍增跳 yi 次,和 倍增lca 类似 从一个点一个点跳 变成倍增跳(全用下标处理)。 代码: #include<iostream> #include<cstdio> #include<stack> #include<math.h> #include<queue> #include<cstring> #include<algorithm> using n

hddddh的博客 192

ABAP CDS SELECT, parameters 全面解析:把参数化视图玩明白(含可运行示例)

这篇技术博客介绍了ABAP CDS中参数化视图的用法与实践。文章从业务需求出发,解释了参数化视图的必要性,并详细说明了语法规则、参数类型匹配、视图内部参数引用等关键点。重点展示了在JOIN和ASSOCIATION中传递参数的写法,提供了航线分析的完整业务案例和可运行代码示例。文章还总结了视图实体与DDIC视图的差异、会话变量使用技巧等实践要点,特别强调了JOIN中必须显式传参的语法要求。通过真实场景演示,帮助开发者掌握参数化CDS的高效应用。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 364

Diffusion models代码实战:从零搭建自己的扩散模型

这个系列曾经写过三篇文章专门讲代码,分别从数据集、超参数、loss设计、参数计算、Unet结构、正向过程、逆向过程等部分详细介绍了如何搭建DDPM。Diffusion models领域发展神速,最近半年代表作品有OpenAI的GLIDE、DALL-E 2,Google Brain的ImageGen,海森堡大学的Latent Diffusion。这篇博客针对入门新手讲解一下如何利用已有的资源快速搭建自己的Diffusion models。.........

沉迷单车的追风少年 1万+

2017 icpc 沈阳 G - Infinite Fraction Path

题目大意:有n个点, 每个点有一个数字0 - 9, 第 i 个点只能到 第(i * i + 1)个点,问你在哪个点出发走n次构成的数字串最大。 思路:利用求后缀数组的倍增比较思想, 许多细节需要注意。 1 #include<bits/stdc++.h> 2 #define LL long long 3 #define fi first 4 #define...

227

借助AI搞定国社科“研究内容”部分!用Gemini 3 Pro轻松撰写6大模块,让基金本子效率质量更上一层楼

所谓研究整体框架,是对课题研究逻辑结构与技术路径的系统阐述,其核心在于通过研究目标分解、研究内容模块化与研究方法整合,构建一个层次清晰、逻辑严密、科学可行的研究体系。撰写要求:1)分要点、分层次列出主要研究内容,保持各部分之间的逻辑性、层次性与系统性;研究可行性可理解为开展本课题在理论基础、研究方法、研究条件、人员结构、平台支撑及外部协作等方面的可实施程度,可从内部条件与外部条件两个维度进行系统论证。研究背景为:我正在申报xxx年xxx(项目名称),课题名称为:xxx,拟采用的主要研究方法包括:xxx等;

智能AI让学术科研更容易 964

2017 ACM-ICPC 沈阳区域赛记录

出发日 中午坐大巴前往萧山机场。 哇开心又可以坐飞机了 飞机延误了。在候机大厅里十分无聊,先用机场的电脑玩了会小游戏 然后偷偷切了2个水题 (什么编译器IDE都没有,只能记事本了) 飞机上什么东西都没有,饿着肚子 降落前耳朵十分不适 沈阳好像没有想象中的冷……? 到了宾馆之后先放东西然后去吃烧烤(真是好吃0.0) 晚上回来休息。 热身赛日 早上被冻醒 和Wubaiz...

weixin_30502965的博客 205

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

深度学习工具包 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")

2015区域赛总结

合肥区域赛结束一个星期了。。依旧觉得今年两场区域赛打的和屎一样。。 剩下满满的遗憾。 两个区域赛银,一个邀请赛金,一个省赛银(突然发现自己和银牌好有缘分。。),同时也暴露了很多问题。。 先说合肥吧。 热身的时候印象最深的是,有一道很裸的FFT没看出来,各种推公式。。最后几分钟大喊日了狗了。。。 然后就是现场赛。。刚开始的时候,听队友讲了A题,发现是图的计数。。由于最近研究了一段时间图的计

yamiedie_ 741

计蒜客 Infinite Fraction Path

icpc2017沈阳 判断两个字符串的字典序大小,通过2017icpc青岛站的suffix那题,我学会了这种方法。不过这题无法直接二分长度,可以通过倍增来进行预处理。 通过这题,我对倍增有了新的认识。ne[x][0]是x走一步,不包含x。 还有很重要一点hash的base不可以取26,10这种东西,一定需要大质数才行。这题取11会wa #include <bits/stdc++.h...

ehdhg13455的博客 237

24.11.3

思路:这题利用到了gcd的一个很重要的性质,前缀gcd只有logV种,所以每当前缀gcd即pre【i】变化时,可枚举一遍操作的区间,l固定为 i,枚举 r,先预处理出后缀gcd,即可得到操作区间为 i-j的全局gcd,ans取max。若n为偶数,可以补齐n的所有二进制0位,定m为n的二进制相反数,m一定是奇数,按上述构造方法构造出m,最后填n,n|m即可在二进制位上全1,注意m为1或3需要特判。补24牛客多校10 D。补24牛客多校10 L。补24牛客多校10 K。补24 icpc昆明邀请赛 E。

breath_of_yuan的博客 1075

欢迎使用优快云-markdown编辑器

ICPC沈阳区域赛比赛报告杜逸闲比赛记录(个人视角)因为比赛一共有13题,按照平时训练的惯例我从E题开始往后看。快速看完EFGH的题面后,发下E和H是博弈题,F是数学题,G题题意不太好懂。于是决定先写出F题的式子化简后同ws讨论。待ws过了签到题以后,跟他讨论了一会儿F题,无果。抬头看了一眼榜后开始看L题,想到了一个DP算法。将算法跟ws讨论后发现了一个正确的性质,随后A掉L题。大约一小时,左边的队

毒液哥的专栏 285

模板整理

图论 最小生成树 Built? 最短路 一个人的旅行(最短路) 最短路模板spfa+dijstkra 各种姿势过【模板】单源最短路径(标准版) 树的最小支配集 开会 二分图 过山车(匈牙利算法模板) 网络流 Lca(树上最近公共祖先) 割点和桥 强连通分量 树链剖分 [NOIP2018模拟赛] 小P的Civilization V poj2449第k短路模板...

这里RevolIA,_(:з」∠)_ 430

2017ICPC沈阳部分简要题解

2017ICPC沈阳

Irving0323的博客 565

Genius ACM(倍增+归并排序)

传送门 题目: 给定一个整数 M,对于任意一个整数集合 S,定义“校验值”如下: 从集合 S 中取出 M 对数(即 2∗M 个数,不能重复使用集合中的数,如果 S 中的整 数不够 M 对,则取到不能取为止),使得“每对数的差的平方”之和最大,这个最大值 就称为集合 S 的“校验值”。 现在给定一个长度为 N 的数列 A 以及一个整数 T。我们要把 A 分成若干段,使得 每一段的“校验值”都不超过...

Cassie_zkq的博客 601

2017ICPC青岛网络赛 Brute Force Sorting

Brute Force Sorting Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 3375    Accepted Submission(s): 321 Problem Description Beerus

SUNSET 744

2017 ACM-ICPC Asia Shenyang (ICPC亚洲沈阳赛区)

F - Heron and His Triangle HDU - 6222 题意: 给一个N,求最小的 t 使 t >=N,并且使边长为t,t-1,t+1的三角形面积为整数 题解:

洛 水 4956

icpc 2017 沈阳个人题解

虽然参加了青岛icpc但那场的题超出我太多..唯一赛后弄会的polya计数已经写到上一篇了... 但沈阳的题目还好比较常规 中等题尤其多 I Little Boxes 签到题目 a+b+c+d 小坑点是小于等于2^62 就是说答案小于等于2^64 特判一下和为2^64情况用unsigned long long就好(或者java) 各水平的队伍都有不是1A的..所以还是认真点..20...

weixin_40191952的博客 972

2017 ICPC Mid-Central USA Region 题解

Problem A Nine Knights In the game of chess, knights are unique due to their “L-shaped” movement. A knight can move, as shown in Figure A.1, by either moving two squares sideways and one square up o...

OlaMins 1673
上一篇: SPOJ COT2(树上莫队)
下一篇: 数据结构-Heap(堆)
creatorx
博客等级 码龄10年 127粉丝 145原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值