ccnu_2016_暑期模拟赛(1)

ubuntu虚拟机搭建OP-TEE 在网上找了一些搭建OP-TEE的过程,模仿着进行搭建,结果有好多报错,为了方便自己以后重新搭建,所以将整个过程记录下来。 阅读详情

这套题本来是要当做第一周的模拟训练赛的,有几道题是CF上的,但是由于当时做题的时候CF崩了,所以临时换了一套题,没有用这套题。
今天把这套题补完了。

A. Devu, the Singer and Churu, the Joker

Devu is a renowned classical singer. He is invited to many big functions/festivals. Recently he was invited to “All World Classical Singing Festival”. Other than Devu, comedian Churu was also invited.

Devu has provided organizers a list of the songs and required time for singing them. He will sing n songs, ith song will take ti minutes exactly.

The Comedian, Churu will crack jokes. All his jokes are of 5 minutes exactly.

People have mainly come to listen Devu. But you know that he needs rest of 10 minutes after each song. On the other hand, Churu being a very active person, doesn’t need any rest.

You as one of the organizers should make an optimal sсhedule for the event. For some reasons you must follow the conditions:

The duration of the event must be no more than d minutes;
Devu must complete all his songs;
With satisfying the two previous conditions the number of jokes cracked by Churu should be as many as possible. 

If it is not possible to find a way to conduct all the songs of the Devu, output -1. Otherwise find out maximum number of jokes that Churu can crack in the grand event.
Input

The first line contains two space separated integers n, d (1 ≤ n ≤ 100; 1 ≤ d ≤ 10000). The second line contains n space-separated integers: t1, t2, …, tn (1 ≤ ti ≤ 100).
Output

If there is no way to conduct all the songs of Devu, output -1. Otherwise output the maximum number of jokes that Churu can crack in the grand event.
Examples
Input

3 30
2 2 1

Output

5

Input

3 20
2 1 1

Output

-1

Note

Consider the first example. The duration of the event is 30 minutes. There could be maximum 5 jokes in the following way:

First Churu cracks a joke in 5 minutes.
Then Devu performs the first song for 2 minutes.
Then Churu cracks 2 jokes in 10 minutes.
Now Devu performs second song for 2 minutes.
Then Churu cracks 2 jokes in 10 minutes.
Now finally Devu will perform his last song in 1 minutes. 

Total time spent is 5 + 2 + 10 + 2 + 10 + 1 = 30 minutes.

Consider the second example. There is no way of organizing Devu’s all songs. Hence the answer is -1.

【题目大意】
有一场演唱会。
有一个歌唱家准备了n首歌,这个歌唱家每唱完一首歌都需要休息10分钟。
还有一个喜剧演员是讲笑话的,他每讲一个笑话需要5分钟。不需要休息。
给出歌唱家唱这n首歌所需要的时间。

求在给定时间d内:
歌唱家唱完所有歌曲的前提下,喜剧演员最多可以将几个笑话。
如果歌唱家无法唱完所有歌曲。输出-1

【解法】先算出歌唱家唱完所有歌曲(加上休息的时间)需要多少时间,如果大于给定时间d,则输出-1
如果小于给定时间,那么将歌唱家任意两首歌之间休息的10分钟都让喜剧演员讲笑话

【AC代码】

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>

using namespace std;

int a[110];

int main(){
    int n, d;
    while(scanf("%d%d", &n, &d) != EOF){
        int sum = 0;
        for(int i = 0; i < n; i++){
            scanf("%d", &a[i]);
            sum += a[i];
        }
        if(sum + 10 * (n - 1) > d){
            printf("-1\n");
        }
        else{
            printf("%d\n", (d - sum) / 5);
        }
    }
    return 0;
}

B. Devu, the Dumb Guy

Devu is a dumb guy, his learning curve is very slow. You are supposed to teach him n subjects, the ith subject has ci chapters. When you teach him, you are supposed to teach all the chapters of a subject continuously.

Let us say that his initial per chapter learning power of a subject is x hours. In other words he can learn a chapter of a particular subject in x hours.

Well Devu is not complete dumb, there is a good thing about him too. If you teach him a subject, then time required to teach any chapter of the next subject will require exactly 1 hour less than previously required (see the examples to understand it more clearly). Note that his per chapter learning power can not be less than 1 hour.

You can teach him the n subjects in any possible order. Find out minimum amount of time (in hours) Devu will take to understand all the subjects and you will be free to do some enjoying task rather than teaching a dumb guy.

Please be careful that answer might not fit in 32 bit data type.
Input

The first line will contain two space separated integers n, x (1 ≤ n, x ≤ 105). The next line will contain n space separated integers: c1, c2, …, cn (1 ≤ ci ≤ 105).
Output

Output a single integer representing the answer to the problem.
Examples
Input

2 3
4 1

Output

11

Input

4 2
5 1 2 1

Output

10

Input

3 3
1 1 1

Output

6

Note

Look at the first example. Consider the order of subjects: 1, 2. When you teach Devu the first subject, it will take him 3 hours per chapter, so it will take 12 hours to teach first subject. After teaching first subject, his per chapter learning time will be 2 hours. Now teaching him second subject will take 2 × 1 = 2 hours. Hence you will need to spend 12 + 2 = 14 hours.

Consider the order of subjects: 2, 1. When you teach Devu the second subject, then it will take him 3 hours per chapter, so it will take 3 × 1 = 3 hours to teach the second subject. After teaching the second subject, his per chapter learning time will be 2 hours. Now teaching him the first subject will take 2 × 4 = 8 hours. Hence you will need to spend 11 hours.

So overall, minimum of both the cases is 11 hours.

Look at the third example. The order in this example doesn’t matter. When you teach Devu the first subject, it will take him 3 hours per chapter. When you teach Devu the second subject, it will take him 2 hours per chapter. When you teach Devu the third subject, it will take him 1 hours per chapter. In total it takes 6 hours.

【题目大意】
Dove要学习n个课程,每个课程有一定的章节数。他可以按照任意的顺序学习这n门课程。一开始他学习一个章节的时间是x,但是每学完一个课程之后,他学习一个章节的时间就会减少1(最少是1)。
问Dove学完所有课程所需要花的最少时间。
【解法】
因为越早学的课程需要的时间越多,为了让总的时间最少,优先学习章节数较少的课程。所以按照章节数进行升序排序,然后依次学习即可。
【坑点】
注意答案会爆int
【AC代码】

#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <iostream>

using namespace std;

long long a[100010];

int main(){
    long long n, x;
    long long ans;
    while(scanf("%I64d%I64d", &n, &x) != EOF){
        ans = 0;
        for(int i = 0; i < n; i++){
            scanf("%I64d", &a[i]);
        }
        sort(a, a + n);
        for(int i = 0; i < n; i++){
            if(x == 1){
                ans += a[i];
            }
            else{
                ans += x * a[i];
                x--;
            }
        }
        printf("%I64d\n", ans);
    }

    return 0;
}

A. Queue on Bus Stop

It’s that time of the year when the Russians flood their countryside summer cottages (dachas) and the bus stop has a lot of people. People rarely go to the dacha on their own, it’s usually a group, so the people stand in queue by groups.

The bus stop queue has n groups of people. The i-th group from the beginning has ai people. Every 30 minutes an empty bus arrives at the bus stop, it can carry at most m people. Naturally, the people from the first group enter the bus first. Then go the people from the second group and so on. Note that the order of groups in the queue never changes. Moreover, if some group cannot fit all of its members into the current bus, it waits for the next bus together with other groups standing after it in the queue.

Your task is to determine how many buses is needed to transport all n groups to the dacha countryside.
Input

The first line contains two integers n and m (1 ≤ n, m ≤ 100). The next line contains n integers: a1, a2, …, an (1 ≤ ai ≤ m).
Output

Print a single integer — the number of buses that is needed to transport all n groups to the dacha countryside.
Examples
Input

4 3
2 3 2 1

Output

3

Input

3 4
1 2 1

Output

1

【题目大意】
有一个队伍在排队等公交。排队的人是一伙一伙的。他们只会上同一辆车,如果坐不下就等下一辆车。严格按照队伍的顺序上车。求问需要多少辆车才能把所有人都载走。
【解法】
按照队伍的顺序依次向后,能够上车就上车,不能够上车就等下一趟。
【AC代码】

#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <iostream>

using namespace std;

int a[110];

int main(){
    int n, m;
    while(scanf("%d%d", &n, &m) != EOF){
        for(int i = 0; i < n; i++){
            scanf("%d", &a[i]);
        }
        int ans = 0;
        int sum = 0;
        for(int i = 0; i < n; i++){
            sum += a[i];
            if(sum < m){
                continue;
            }
            else if(sum == m){
                sum = 0;
                ans ++;

            }
            else{
                sum = 0;
                ans ++;
                i --;
            }
        }
        if(sum != 0){
            ans++;
        }
        printf("%d\n", ans);

    }
    return 0;
}

Radar Installation

Description
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, so an island in the sea can be covered by a radius installation, if the distance between them is at most d.

We use Cartesian coordinate system, defining the coasting is the x-axis. The sea side is above x-axis, and the land side below. Given the position of each island in the sea, and given the distance of the coverage of the radar installation, your task is to write a program to find the minimal number of radar installations to cover all the islands. Note that the position of an island is represented by its x-y coordinates.

Figure A Sample Input of Radar Installations

Input
The input consists of several test cases. The first line of each case contains two integers n (1<=n<=1000) and d, where n is the number of islands in the sea and d is the distance of coverage of the radar installation. This is followed by n lines each containing two integers representing the coordinate of the position of each island. Then a blank line follows to separate the cases.

The input is terminated by a line containing pair of zeros

Output
For each test case output one line consisting of the test case number followed by the minimal number of radar installations needed. “-1” installation means no solution for that case.

Sample Input

3 2
1 2
-3 1
2 1

1 2
0 2

0 0

Sample Output

Case 1: 2
Case 2: 1
【题目大意】
这题可以转化成贪心的经典问题,区间覆盖问题
【解法】
以小岛为圆心,以雷达范围为半径画圆,将小岛全部转化成在坐标轴上的区间,然后用解决区间覆盖的方法解决即可。
【AC代码】

#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;

//struct Point{
//    int x, y;
//}P[1010];

struct range{
    double left, right;
    bool is_select;
}R[1010];

bool cmp(range a, range b){
    if(abs(a.right - b.right) < 0.000001){
        return a.left < b.left;
    }
    return a.right < b.right;
}

int main(){
    int n, d, a, b;
    int term = 0;
    while(scanf("%d%d", &n, &d) != EOF && (n && d)){
        term++;
        int ok = 1;
        for(int i = 0; i < n; i++){
            scanf("%d%d", &a, &b);
            if(ok == 0){
                continue;
            }
            if(b > d){
                ok = 0;
                printf("Case %d: -1\n", term);
            }
            else if(b <= d){
                ok = 1;
                R[i].left = a - sqrt(d * d - b * b);
                R[i].right = a + sqrt(d * d - b * b);
                R[i].is_select = 0;
            }
        }
        if(ok == 0){
            continue;
        }
        sort(R, R + n, cmp);
//        for(int i = 0; i < n; i++){
//            printf("(%lf, %lf)\n", R[i].left, R[i].right);
//        }
        int ans = 0;
        for(int i = 0; i < n; i++){
            if( R[i].is_select == 0 ){
                R[i].is_select = 1;
                ans ++;
                for(int j = i + 1; j < n; j++){
                    if( R[j].left <= R[i].right ){
                        R[j].is_select = 1;
                    }
                    else{
                        i = j - 1;
                        break;
                    }
                }
            }
        }
        printf("Case %d: %d\n", term, ans);
    }
    return 0;
}

ztr loves lucky numbers

Problem Description
ztr loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn’t contain digits other than 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.

Lucky number is super lucky if it’s decimal representation contains equal amount of digits 4 and 7. For example, numbers 47, 7744, 474477 are super lucky and 4, 744, 467 are not.

One day ztr came across a positive integer n. Help him to find the least super lucky number which is not less than n.

Input
There are T(1≤n≤105) cases

For each cases:

The only line contains a positive integer n(1≤n≤1018). This number doesn’t have leading zeroes.

Output
For each cases
Output the answer

Sample Input

2
4500
47

Sample Output

4747
47

【题目大意】
只由4跟7两个数码组成且4跟7的出现的次数一样的数叫做幸运数。
给出一个数,问不小于这个数的第一个幸运数是多少。

【解法】
先搜索出给定范围内的所有幸运数。然后排序。二分查找。

【AC代码】

#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <algorithm>

using namespace std;

long long a[270000];
int index;

void dfs(int x, int y, long long num){
    if(x == 0 && y == 0){
        a[index++] = num;
        return ;
    }
    if(x > 0){
        dfs(x - 1, y, num * 10 + 4);
    }
    if(y > 0){
        dfs(x, y - 1, num * 10 + 7);
    }
}

int main(){
    for(int i = 2; i <= 18; i += 2){
        dfs(i >> 1, i >> 1, 0);
    }
    sort(a, a + index);
//    for(int i = 0 ; i < 100; i++){
//        printf("%I64d\n", a[i]);
//    }
    int T;
    long long num;
    scanf("%d", &T);
    while(T--){
        scanf("%I64d", &num);
        if(num > 777777777444444444){
            printf("44444444447777777777\n");
        }
        else{
            printf("%I64d\n",  *lower_bound(a, a + index, num));
        }
    }

    return 0;
}

B. Wilbur and Array

Wilbur the pig is tinkering with arrays again. He has the array a1, a2, …, an initially consisting of n zeros. At one step, he can choose any index i and either add 1 to all elements ai, ai + 1, … , an or subtract 1 from all elements ai, ai + 1, …, an. His goal is to end up with the array b1, b2, …, bn.

Of course, Wilbur wants to achieve this goal in the minimum number of steps and asks you to compute this value.
Input

The first line of the input contains a single integer n (1 ≤ n ≤ 200 000) — the length of the array ai. Initially ai = 0 for every position i, so this array is not given in the input.

The second line of the input contains n integers b1, b2, …, bn ( - 109 ≤ bi ≤ 109).
Output

Print the minimum number of steps that Wilbur needs to make in order to achieve ai = bi for all i.
Examples
Input

5
1 2 3 4 5

Output

5

Input

4
1 2 2 1

Output

3

Note

In the first sample, Wilbur may successively choose indices 1, 2, 3, 4, and 5, and add 1 to corresponding suffixes.

In the second sample, Wilbur first chooses indices 1 and 2 and adds 1 to corresponding suffixes, then he chooses index 4 and subtract 1.

【题目大意】
有一串一开始全是0的数。每次可以选择一个位置p,执行两个操作中的一个:
1.p以后的每个数(包括p)全部加1
2.p以后的每个数(包括p)全部减1
另外给出一段序列。求问,从初始状态(全零)到目标状态(给定状态)至少需要多少步。

【解法】
因为每次操作都只影响后面的。所以按照顺序,依次改变成目标状态即可。

【AC代码】

#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <iostream>

using namespace std;

int a[200010];
int main(){
    int n;
    while(scanf("%d", &n) != EOF){
        long long ans = 0;
        for(int i = 1; i <= n; i++){
            scanf("%d", &a[i]);
            ans += abs(a[i] - a[i - 1]);
        }

        printf("%I64d\n", ans);

    }
    return 0;
}
爬虫瑞数5.5案例:欧冶钢材交易官网,带后缀K5nOZLud(面向对象补环境) 瑞数动态安全 Botgate(机器人防火墙)以“动态安全”技术为核心,通过动态封装、动态验证、动态混淆、动态令牌等技术对服务器网页底层代码持续动态变换,增加服务器行为的“不可预测性”,实现了从用户端到服务器端的全方位“主动防护”,为各类 Web、HTML5 提供强大的安全保护。由于之前某通信的瑞数已经调整,这里再出一篇文章,瑞数特点以及请求执行的流程已在之前的文章中分析过,这里不再特别讲解; 阅读详情

相关推荐

Hypermesh2021实战:塑料圆盘结构化网格划分全流程(附避坑指南)

本文详细介绍了使用Hypermesh2021进行塑料圆盘结构化网格划分的全流程操作,包括几何预处理、网格生成策略及质量验证。特别针对工程实践中常见的12个典型问题提供解决方案,帮助用户提升CAE仿真分析的精度和效率。

weixin_29294597的博客 318

A. Devu, the Singer and Churu, the Joker

解题说明:此题是简单的模拟题,只需要控制好间隔时间

无知的我 2280

lattice Diamond Programmer程序下载

Lattice Diamond Programmer(支持Lattice FPGA与CPLD程序下载)

qq_44385725的博客 5170

cf435A Queue on Bus Stop

A. Queue on Bus Stop time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output It's that time of the year when the Russ...

weixin_30664051的博客 162

DoubletFinder实战:如何优化参数提升scRNA-seq双细胞识别准确率?

本文深入探讨了如何通过优化DoubletFinder参数提升scRNA-seq双细胞识别准确率。详细解析了pK和nExp参数的影响机制,提供了系统化的参数优化流程和多样本整合策略,并结合真实数据集演示了验证方法与高级应用场景,帮助研究人员获得更可靠的分析结果。

weixin_28523493的博客 339

例题讲解拉格朗日乘子法、线性可分支持向量机(SVM)的推导

支持向量机(Support Vector Machine, SVM)的简单推导及例题

zzzssszzzzsz的博客 5681

第三次周赛A题

Devu is a renowned classical singer. He is invited to many big functions/festivals. Recently he was invited to “All World Classical Singing Festival”. Other than Devu, comedian Churu was also invited....

qq_43977749的博客 284

AI 边缘计算控制器GEAC91

AI 边缘计算控制器GEAC91是AI边缘计算控制器是一款基于 NVIDIA Jetson AGX Xavier处理 器、面向智能边缘计算应用场景的解决方案。

weixin_45905610的博客 1196

CodeForces - 439A. Devu, the Singer and Churu, the Joker【水题】

A. Devu, the Singer and Churu, the Joker time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Devu is a renowned classical singer. He is invited to ...

qq_43966202的博客 280

APM无人船测绘实战:从RTK、测深仪到图传的完整系统集成指南

本文提供了一套完整的APM无人船测绘系统集成实战指南。从RTK模块配置、测深仪数据同步到图传系统接入,详细解析了硬件选型、接线、软件参数调试及QGC地面站任务规划的全流程,旨在帮助用户将分散的部件整合为可自主执行水下地形测绘的可靠工具。

rr23456的博客 520

01 底盘制动产品之轮速传感器

轮速传感器是用来测量汽车车轮转速的传感器。对于现代汽车而言,轮速信息是必不可少的,汽车动态控制系统(VDC)、汽车电子稳定程序(ESP)、防抱死制动系统(ABS)、自动变速器的控制系统等都需要轮速信息。

汽车软件工程师 | 好奇博主 | 处女座 4656

Codeforces Round #249 (Div. 2) ABC

A. Queue on Bus Stop time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output It's that time of the year when the Rus

Song 1485

PyCharm 2023最新版安装配置全攻略(附永久激活教程)

本文详细介绍了PyCharm 2023最新版的安装配置全流程,包括版本选择、初始配置、插件生态、工程模板、调试优化及团队协作等关键步骤。特别针对专业版和社区版的功能差异进行对比,帮助开发者高效搭建Python开发环境,提升编码效率与团队协作能力。

p4q5r6s7t的博客 865

ccnu_2016_暑期模拟赛(2)---bfs

做完这题确实深有感触。 而且早上刚听完卿爷讲怎么对拍。刚好就在这个题用上了对拍的debug手段。也第一次体会到了对拍的便捷之处。 做这道题的过程还是很艰辛的: —>昨天模拟赛赛时其实我已经明白这道题怎么写了,而且也将代码完成了90%左右。但是虽然写了,但是心里一直觉得自己过不了这题,可能是由于之前一直不会搜索导致的对我自己写的搜索算法没有信心,事实上,从我今天AC的代码来看,昨天的代码基本上是

Code_J_xer的博客 585

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

第二次codeforces竞技结束 #249 Div 2

A. Queue on Bus Stop time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output It's that time of the year when the Rus

CD's Coding 1172

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

STOP FOR A WEEK OR TWO WEEK

考试将近 先回避回避。。。。。

忆_恒心的博客 482

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

codeforces 435A Queue on Bus Stop(模拟水题)

A. Queue on Bus Stop 点击打开题目 time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output It's that time of the year when the Rus

1536

2016暑期集训---搜索(BFS 八方向马步问题)

做这题的时候是给自己定时做的,我觉得定时做一道题的效果很不错。这样我才能够专心地想这道题怎么写。这对于容易分心的我来说并不是一件很容易的事情。其实写完这道题还是很开心的,也是1A的,开心的原因是因为以前其实一直没有真正地懂搜索,只知道思想,但是敲不出代码。估计要是以前做的话,我是做不到今天这样的,“看题,想思路,敲代码,AC!”但是这次做到了,值得欣慰的是,我今年的暑期集训我一直秉承着决不看题解的态

Code_J_xer的博客 990

代码debug技巧----对拍

虽然挺早就知道对拍这个方法,但是一直没有去试过,也不知道怎么做。 今天早上卿爷讲了一下对拍怎么做,觉得很是涨姿势。 而且上午刚学完就派上了用场,成功地为一道不明所以WA的搜索题找到了一个错误数据,进而改对了代码,成功AC。 记录一下对拍的方法。 1:需要先写一个随机数据生成程序datamake.cpp。按照题目的输入格式,随机生成输入数据。 2:需要写一个绝对正确的程序std.cpp。可以

Code_J_xer的博客 944

ccnu_2016_summer_week1(2)_贪心

暑期集训的第三套题。简单贪心。 1.发工资咯:) 作为杭电的老师,最盼望的日子就是每月的8号了,因为这一天是发工资的日子,养家糊口就靠它了,呵呵 但是对于学校财务处的工作人员来说,这一天则是很忙碌的一天,财务处的小胡老师最近就在考虑一个问题:如果每个老师的工资额都知道,最少需要准备多少张人民币,才能在给每位老师发工资的时候都不用老师找零呢? 这里假设老师的工资都是正整数,单位元,人民币一共

Code_J_xer的博客 858

ccnu_2016_summer_week1(1)

集训第一周第一套都是一些基础题,主要是熟悉编程,以及简单的解题思维A:Least Common Multiple http://acm.hdu.edu.cn/showproblem.php?pid=1019【hdu1019】 Problem Description The least common multiple (LCM) of a set of positive integers

Code_J_xer的博客 856

ccnu_2016_summer_week1(3)

这套题就是简单的基础题,总共4道题,CF的AB题,各两题。 A. Pasha and StickPasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have s

Code_J_xer的博客 779

2016暑期集训---搜索(简单BFS+路径储存)

搜索的功底还是太弱了,写这题谢了快两个小时。主要的时间花费在思考如果储存路径上了。 因为题目要求的是最短路径,而且保证题目有唯一解,那么只要宽搜从(0,0)点搜到(4,4)点就是走的路径了。但是麻烦的是记录中间路径。【题面】迷宫问题Description 定义一个二维数组: int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0

Code_J_xer的博客 714

2016暑期集训---周赛(水题)

今天被这个题前前后后折磨了好几次。其实最开始就想到可能需要用数组来存数。但是做题过程中却偏偏只是一步一步地放大储存容量。我感觉这可能是程序员的一个小小职业病。由于计算机的存储空间以及计算性能是有限的,所以一直精打细算时间跟空间,一种“不浪费时间和空间的思想”让我在这题上栽倒了好几次。第一次,用int存数。显然,要挂。其实这次WA是不意外的。 第二次,于是把所有的数都换成了long long。结果。

Code_J_xer的博客 619

2016暑期集训---搜索(简单BFS)

虽然,虽然,这道题很简单。 但是我一直觉得我自己关于搜索可以算是一点都不会的,所以写得时候也是有点没底,可是,出乎意料的是我代码写完测了一下样例是对的,交了之后发现过了,还是很开心的!看题,想题,敲代码, 交题,AC!对,就是没有debug这一步,这种没有一顺溜,不用debug就过题的感觉真爽。第一次从搜索的题目上得到快感。红与黑 Description 有一间长方形的房子,地上铺了红色、黑色

Code_J_xer的博客 562

2016暑期集训---搜索(整数拆分)

Placing applesDescription We are going to place M same apples into N same plates. There could be some empty plates. How many methods do we have? When we have 7 applesand 3 plates, the methods, (1,

Code_J_xer的博客 510
上一篇: ccnu_2016_summer_week1(2)_贪心
下一篇: 文章标题
Code_J_xer
博客等级 码龄11年 12粉丝 27原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值