1. 程式人生 > >2016河海大學程式設計大賽專業組題解 快速冪取模 博弈論 揹包 floyd

2016河海大學程式設計大賽專業組題解 快速冪取模 博弈論 揹包 floyd

1035: UFO

時間限制: 1 Sec  記憶體限制: 128 MB
提交: 14  解決: 9
[提交][狀態][討論版]

題目描述

long long ago, there's a poor guy zyyyyy. one day he met a Huge Hovering UFO(HHU) and asked aliens in the HHU to make him rich, the aliens agreed and they gave him N problems to solve, and promised him if he solve problem i, he will get a[i] yuan for reward. However the aliens are evil, in fact they can get b[i] bytes of the knowledge of human beings if zyyyyy solve problem i. if they their knowledge sum up to more than M, they will explode the world. zyyyyy is very smart, he got the most money without exploding the world and made the aliens very angry. So can you figure out how can he do that?

輸入

there are several test cases. every test case contains N + 1 lines:
line 1: N(1 <= N <= 3000), M(1 <= M <= 12000)
line 2..N+1: line i + 1 gives a[i] and b[i], (1 <= a[i] <= 400, 1 <= b[i] <= 100)
both N, M, a[i], b[i] are integers

輸出

for each test case, output the money zyyyyy eventually got

樣例輸入

4 6
4 1
6 2
12 3
7 2

樣例輸出

23

提示

來源

//B
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<map>
using namespace std;
const int maxn =  12010;
int f[maxn];
int a[3010];
int b[3010];
int main(){
    int n,m,i,j;
    while(~scanf("%d%d",&n,&m)){
        memset(f,0,sizeof(f));
        for(i=1;i<=n;i++){
            scanf("%d%d",&a[i],&b[i]);
        }
        for(i=1;i<=n;i++){
            for(j=m;j>=b[i];j--){
                f[j] = max(f[j-b[i]]+a[i],f[j]);
            }
        }
        printf("%d\n",f[m]);
    }
    return 0;
}

1036: HHU tower

時間限制: 1 Sec  記憶體限制: 128 MB
提交: 10  解決: 3
[提交][狀態][討論版]

題目描述

there is a tower in the universe's center - Hohai University, people call it HHU tower. HHU tower has 3 pillars(柱子). there is N plates(盤子) through these pillars which are labeled from 1 to N. HHU tower has a strange feature that for every pillar, plates with smaller index are always above plates with bigger index at any time. for example, plate i must be above plate i + 1 if they are placed through the same pillar. Originally, all the plates are placed through pillar 1, the big brother of HHU ask zyyyyy to move one plate from one pillar to the other(must satisfy HHU tower's feature) each day until all the plates are finally placed through pillar 3. zyyyyy is poor so he want to keep this job as long as possible. However the big brother know that zyyyyy may play trick so he can do this job forever so he ask zyyyyy to make sure that the pillars' state must not be repeated. zyyyyy knows the big brother is watching him, so please help him find how many days can he do this job at most?

輸入

there are several test cases. each test case has one line with a integer N(1 <= N <= 10000)

輸出

for each N, output the most steps need. the result can be very large so mod 10000007.

樣例輸入

1

樣例輸出

2

提示

origin state: the only pillar is through pillar 1

day 1: move the only plate from pillar 1 to pillar 2

day 2: move the only plate from pillar 2 to pillar 3, you can not move to pillar 1 again because that will repeat the origin state.

來源

這個是快速冪。。。然而公式是如何推出來的呢。。。

小萌學姐:

你看啊,這個總共有三個柱子n個盤子嘛,要求每次盤子的擺放狀態都要不一樣啊,而且還要取最大嘛,那就是3^n次方嘍,結果要減一嘛,因為去掉最開始的那個狀態

原來如此。。。。

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <cstdlib>
#include <queue>
#include <stack>
using namespace std;
long long mod = 10000007;
long long queen(long long another){
    if(another==0){
        return 1;
    }else if(another==1){
        return 3;
    }
    long long res = 0;
    res = queen(another/2)%mod;
    res = (res * res)%mod;
    if(another%2){
        res = (res * 3 )%mod;
    }
    return res;
}
int main(){
    long long n;
    while (~scanf("%lld",&n)) {
        long long ans = queen(n);
        printf("%lld\n",(ans-1)%mod);
    }
    return 0;
}

1037: Calvin's Experiment

時間限制: 1 Sec  記憶體限制: 128 MB
提交: 2  解決: 2
[提交][狀態][討論版]

題目描述

Calvin Neo is a acmer in HHU, but he is also a civil engineer. Civil Engineering is about moving bricks(搬磚), however it involves many scientific theories and experiments.
Calvin designed a experiment to evaluate the attribute of soil in a construction site(工地), the construction site can be viewed as a 2-dimension Cartesian Coordinate System(平面直角座標系), this experiment includes 2 steps:
1. Calvin choose some point and use CDT(a geological survey method) to test the attribute of soils at that point and use them to work out some assumptions.
2. Calvin choose n tested points from step 1 and get a polygon(多邊形). he start from point 1 and go along the polygon, visit every point once and finally back to point 1. while walking, Calvin use geological radar(地質雷達) to detect the attribute of soils beneath to prove his assumptions
however life in Calvin's construction site is hard, there are ways between only several tested points and the geological radar is expensive so that Calvin should find a polygon with the shortest length(周長).
Calvin is a acmer and he definitely knows the answer, but he is busy moving bricks now, so he ask you for help.

輸入

there are multiple test cases, every test case has multiple lines:
line 1: 2 integers n(less than 233), m(less than 500, for 70% cases, m less than 200)
following n lines: 2 integers x, y stand for the coordinate of points(start from 1), 0 <= (x, y) <= 1000
following m lines: 2 integers u, v means there is a path between u and v

輸出

for every test case print one line, which is the minimum length(周長)
print "impossible" in one line if there is no such polygon
hint: you should use "%.2f\n" to print

樣例輸入

9 6
0 0
0 1
0 2
1 0
1 1
1 2
2 0
2 1
2 2
1 3
1 7
7 9
3 9
2 5
4 5
1 0
1 1

樣例輸出

4.00
impossible

提示

for case 1, choose point 1, 2, 4, 5 as a polygon whose length is 4.00

來源

#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace std;
#define INF 0x3f3f3f3f
const int maxn = 250;
const double killme = 1e7;
const double eps = 1e-8;
double min_loop;
double mp[maxn][maxn];
double dis[maxn][maxn];
pair<double, double > save[maxn];
vector<int> final[510];

int n,m;
void init(){
    int i,j;
    for(i=1;i<=n;i++){
        for(j=1;j<=n;j++){
            if(i==j){
                mp[i][j] = 0.0f;
                dis[i][j] = 0.0f;
            }else{
                mp[i][j] = INF;
                dis[i][j] = INF;
            }
        }
    }
    for(i=1;i<=m;i++){
        final[i].clear();
    }
}
bool online(int x,int y,int x1,int y1,int x2,int y2){
    int min_x = min(x1,x2),max_x = max(x1,x2);
    int min_y = min(y1,y2),max_y = max(y1,y2);
    if(min_x>x||x>max_x||y<min_y||y>max_y){
        return false;
    }
    if((y1 - y2) *  (x - x1) == (y - y1) * (x1 - x2)){
        return true;
    }
    return false;
}
bool floyd(){
    min_loop = INF;
    int i,j,k;
    for(k=1;k<=n;k++){
        for(i=1;i<k;i++){
            for(j=i+1;j<k;j++){
                if(min_loop>mp[i][j]+dis[i][k]+dis[k][j]){
                    min_loop = mp[i][j] + dis[i][k]+dis[k][j];
                }
            }
        }
        for(i=1;i<=n;i++){
            for(j=1;j<=n;j++){
                mp[i][j] = min(mp[i][j],mp[i][k]+mp[k][j]);
            }
        }
    }
    if(min_loop>killme){
        return  false;
    }else{
        return true;
    }
 
}
bool compare(int a,int b){
    if(abs(save[a].first-save[b].second)==0){
        return save[a].second<save[b].second;
    }
    return save[a].first<save[b].first;
}
int main(){
    //cout<<online(18, 97, 99, 67, 18, 97)<<endl;
    int i,j;
    while (~scanf("%d%d",&n,&m)) {
        double a,b;
        for(i=1;i<=n;i++){
            scanf("%lf%lf",&a,&b);
            save[i] = make_pair(a, b);
        }
        init();
        int u,v;
        for(i=1;i<=m;i++){
            scanf("%d%d",&u,&v);
            for(j=1;j<=n;j++){
                if(online(save[j].first, save[j].second, save[u].first, save[u].second, save[v].first, save[v].second)){
                    final[i].push_back(j);
                }
            }
            sort(final[i].begin(), final[i].end(), compare);
            for(j=0;j < final[i].size()-1;j++){
                u = final[i][j];
                v = final[i][j+1];
                mp[u][v] = min(mp[u][v] , sqrt(pow(save[u].first-save[v].first,2)+pow(save[u].second-save[v].second,2)));
                mp[v][u] = mp[u][v];
                dis[u][v] = mp[u][v];
                dis[v][u] = mp[u][v];
            }
            
        }
        if(floyd()){
            printf("%.2lf\n",min_loop);
        }else{
            printf("impossible\n");
        }
    }
    return 0;
}


1038: The Smartest Guy in HHU

時間限制: 1 Sec  記憶體限制: 128 MB
提交: 11  解決: 5
[提交][狀態][討論版]

題目描述

Song and zyyyyy are all very smart guys in HHU and one day they asked Calvin to tell who is smarter. However later that day Song came to Calvin Neo, gave him some money and asked him to hard point(欽定) her to be smarter. Because the money was so much that Calvin no longer need to moving bricks(搬磚) to feed himself so they made a transaction.
The next day, Calvin introduce a game to Song and zyyyyy. In this game, Song and zyyyyy take turns to multiply an integer p by integer from 2 to 9. In each round, Song always starts with p = 1, does her multiplication, then zyyyyy multiplies the number, then Song and so on. Before a game starts, Calvin decides an integer 1 < n < 4294967295 and the winner is who first reaches p >= n. Because both Song and zyyyyy are smart, so they all play perfectly.
Calvin has some n, please help him decide which of them can make Song win.

輸入

one line for one case with a integer n

輸出

"yes" if Song can win, "no" otherwise

樣例輸入

162
17
34012226

樣例輸出

yes
no
yes

提示

zyyyyy and sxm are not real people

來源

小萌學姐:

哎呀給你一個數字,這個數字是目標,那上一個操作的人的最優解肯定是拿9乘以原先那個數字對不對,儘量把數字拉高嘛

那上上個人看自己快輸了肯定要儘量拉低數字嘛,所以肯定選最小的2來乘以原先的數

那麼把給我的數用18除到[0,18]的時候看一看到底是在[0,9]還是(9,18]就好了啊

嗯。。。。博弈論真是神奇啊

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <map>
#include <set>
#include <cstdlib>
#include <queue>
#include <stack>
using namespace std;
const double eps = 1e-8;
bool flag;
int main(){
    double n;
    bool flag;
    while(~scanf("%lf",&n)){
        flag = true;
        while (n>18.0) {
            n /= 18.0;
        }
        if(n<9.0||abs(n-9.0)<eps){
            flag = true;
        }else{
            flag = false;
        }
        if(flag){
            printf("yes\n");
        }else{
            printf("no\n");
        }
    }
    return 0;
}

1039: Zyyyyy和Song的閏年問題

時間限制: 1 Sec  記憶體限制: 128 MB
提交: 13  解決: 8
[提交][狀態][討論版]

題目描述

    某天,Zyyyyy和Song一起學習有關閏年的知識,他們覺得我們平時所說的閏年是有問題的,為什麼呢?眾所周知,閏年(Leap Year)是為了彌補因人為曆法規定造成的年度天數與地球實際公轉週期的時間差而設立的,補上時間差的年份為閏年。四季構成的一年,就是“迴歸年”,也稱“太陽年”,即太陽中心從春分點再到春分點所經歷的時間,1迴歸年=365.24219879日。而我們習慣性的每四年一閏年。
     Zyyyyy覺得“每四年一閏年”是有問題,按照一年365天計算的話,如果n年之後,多出來的日子滿一天的話,這一年就該算作閏年。而Song覺得Zyyyyy才有問題,兩人爭執不休,於是找到了崇尚真理的你。
     在假設從公元0年開始的情況下,他們給定一個年份y,問你這個年份從真理的角度(即大佬Zyyyyy的角度)講,是不是閏年。

輸入

有多個測試案例,但不多於10組。
每個測試案例,只包含一個非負整型數字,代表詢問的年份y,0<=y<=4000000。

輸出

對於每個測試案例,如果是閏年輸出Y,如果不是閏年輸出N。

樣例輸入

0
2000
2002
2016

樣例輸出

N
N
Y
N

提示

來源

SL

這題是個啥玩意我還是沒明白

//C
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<map>
using namespace std;
const double eps = 1e-8;
int main(){
    int y;
    while(~scanf("%d",&y)){
        int i;
        double now = 0;
        for(i=1;i<=y;i++){
            now+=0.24219879;
            if(now>1.0){
                now -= 1.0;
            }
        }
        if(now+0.24219879>1||abs(now+0.24219879-1)<eps){
            printf("Y\n");
        }else{
            printf("N\n");
        }
        //cout<<now<<endl;
    }
    return 0;
}

1040: 世紀難題“晚飯吃啥”

時間限制: 1 Sec  記憶體限制: 128 MB
提交: 23  解決: 12
[提交][狀態][討論版]

題目描述

   Zyyyyy和Song經常需要面對“晚飯吃啥”這個世紀難題,為了解決這個世紀難題,他們每次都需要一次比賽決定,比賽輸的一方來決定“晚飯吃啥”。他們比賽的題目是這樣的:

   現有“ABCDEFG”7種大寫字母,每個字母表示一個得分,“ABCDEFG”分別代表1、2、3、4、5、6、7分。給定一個只包含這7種字母的字串s,每人從s中選擇連續的n個字母,並將這n個字母代表的分數相加作為得分,得分多的一方獲勝。Song深知Zyyyyy智商爆表,所以她求助於你,希望你能寫個程式幫助她每次都能獲勝。

輸入

有T個測試案例,0<=T<=10。

每個測試案例有兩行輸入,第一行輸入兩個正整數m和n,分別表示字串的長度和選擇時字母連續的個數;第二行輸入一個長度為m的字串s。

0<m<=100,0<n<=m。輸入的字串保證只含有題目中描述的7種大寫字母。

輸出

對於每個測試案例,輸出最高的得分。

樣例輸入

3
7 3
ABCDEFG
7 3
DGAECBF
10 4
DFEGAGFDCB

樣例輸出

18
13
22

提示

來源

SL

//H
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<cmath>
using namespace std;

int main(){
    int t,n,m,i;
    string in;
    //t = 'A';
    //cout<<t<<endl; 65
    scanf("%d",&t);
    while(t--){
        scanf("%d%d",&m,&n);
        cin>>in;
        int now = 0,res = 0;
        for(i=0;i<n;i++){
            now += in[i]-64;
            //cout<<in[i] - 64;
            //cout<<now<<endl;
        }
        res = now;
        for(i=n;i<in.length();i++){
            now -= in[i-n]-64;
            //cout<<in[i-n];
            now += in[i]-64;
            //cout<<in[i]-64<<endl;
            res = max(res,now);
        }
        printf("%d\n",res);
    }
    return 0;
}

1041: A-B

時間限制: 1 Sec  記憶體限制: 128 MB
提交: 18  解決: 8
[提交][狀態][討論版]

題目描述

    河海ACM隊一個盛產情侶的地方,比如大腿Song和巨腿Zyyyyy。Song和Zyyyyy的ACM之路都是從A+B這樣的水題開始的,然而他們早已厭倦了A+B這種無聊的題目,他們想來點改變,於是乎,想到了A-B問題。

    給出兩個八進位制的數字a,b,需要計算a-b的結果,也用8進製表示,如果結果是負數,你需要用負數形式輸出而不是給出補數。

輸入

第一行是一個整數T(1 <= T <= 1000), 代表資料組數。
每組陣列只有一行,為包括兩個八進位制的數a,b,其中0 <= a, b < 2^32。

輸出

輸出a-b的結果。

樣例輸入

1
76 7

樣例輸出

67

提示

來源

Song


//A
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<map>
using namespace std;
char res[100];
bool compare(string a,string b){
   if(a.length()>b.length()){
        return true;
   }else if(a.length()<b.length()){
       return false;
   }
   for(int i=0;i<=a.length();i++){
        if(a[i]>b[i]){
            return true;
        }else if(a[i]<b[i]){
            return false;
        }
   }
   return true;
}
int main(){
    int t,i;
    string a,b;
    scanf("%d",&t);
    while(t--){
        long long resa =0,resb = 0;
        //scanf("%lld%lld",&a,&b);
        cin>>a>>b;
        bool flag = false;
        if(!compare(a,b)){
            swap(a,b);
            flag = true;
        }
        int p = 0;
        int lena = a.length()-1;
        int lenb = b.length()-1;
        for(i=0;i<b.length();i++){
            if(a[lena-i]>=b[lenb-i]){
                res[++p] = a[lena-i] - b[lenb-i] ;
                //cout<<a[lena-i]<<" "<<b[lenb-i]<<endl;

            }else{
                res[++p] = 8 - (b[lenb-i]-'0') + a[lena-i]-'0';
                //cout<<b[lenb-i]-'0'<<" "<<a[lena-i]-'0'<<"   ";
                a[lena-i-1]--;
                //cout<<a[lena-i-1]<<endl;
            }
        }
        for(i=a.length()-b.length()-1;i>=0;i--){
            res[++p] = a[i]-'0';
            //cout<<"tes "<<a[i]<<endl;
        }
        //cout<<"p"<<p<<endl;
        while(res[p]==0&&p>=0){
                p--;
        }

        if(p==-1){
            printf("0\n");
            //cout<<"aaa\n";
            continue;
        }
        if(flag){
            printf("-");
        }
        for(i=p;i>=1;i--){
            printf("%d",res[i]);
        }
        printf("\n");
    }
    return 0;
}

1042: 特殊數

時間限制: 1 Sec  記憶體限制: 128 MB
提交: 15  解決: 6
[提交][狀態][討論版]

題目描述

    某天,Zyyyyy和Song想要一比智商高低,於是他們找到了河海ACM元老級先行者JetMuffin。JetMuffin給他們出了一道非常有意思的題目,是一道關於“特殊數”的題目

一個“特殊數”就是出現的頻率最少的數字,給出一組整數,你需要輸出這組整數中的“特殊數”。注意如果有很多“特殊數”,你需要按順序輸出它們。

輸入

第一行是一個整數 T(1 <= T <= 4), 代表資料組數,
每一組資料第一行包括一個整數n (n <= 100000),
第二行包括n個整數ai (0 <= a_i <= 10^9)。

輸出

每一組資料都按照升序輸出全部“特殊數”。

樣例輸入

2
7
1 1 2 2 3 3 3
5
5 3 2 4 1

樣例輸出

1 2
1 2 3 4 5

提示

注意最後一個數後面沒有空格。

來源

Song


//E
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<map>
using namespace std;
const int maxn = 100010;
int a[maxn];
int res[maxn];
map<int,int> judge;
int main(){
    int t,n,m,i,j,p;
    scanf("%d",&t);
    while(t--){
        scanf("%d",&n);
        judge.clear();
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            judge[a[i]]++;
        }
        int minn = 1000000002;
        //cout<<"tes "<<minn<<endl;
        for(i=1;i<=n;i++){
            minn = min(judge[a[i]],minn);
        }
        j = 0;
        for(i=1;i<=n;i++){
            if(judge[a[i]]==minn){
                res[++j] = a[i];
            }
        }
        sort(res+1,res+1+j);
        for(i=1;i<=j;i++){
            printf("%d",res[i]);
            bool flag = false;
            while(i!=j&&res[i+1]==res[i]){
                i++;
                flag = true;
            }
            if(i!=j){
                printf(" ");
            }
        }
        printf("\n");
    }
    return 0;
}







相關推薦

2016海大程式設計大賽專業組題解 快速 博弈論 揹包 floyd

1035: UFO 時間限制: 1 Sec  記憶體限制: 128 MB提交: 14  解決: 9 [提交][狀態][討論版] 題目描述 long long ago, there's a poor guy zyyyyy. one day he met a Huge

[hhuoj]“朝陽·聚位元”海大程式設計競賽(低年級組)C.滑冰

一年前的2017.12.02,頭次參加了程式設計類的比賽,學校的ACM校賽,在低年級組全是水題的情況下只做上兩道題(其中一個還是hello world),其中有一道題只有1AC(by LuckyT99),由於AC數量過少,賽完很長一段時間對這道題有一種恐懼的心

2018年新生中軟ACM程式設計大賽決賽 -題解

今天是院ACM新生賽的決賽啦, 題目出的比較難, 最多為9道 可以看到大部分還是WA一片 下面是題解, 有兩道題太過簡單 只提供了思路. A 外幣兌換 //簽到題, 從下面幾個中選一個最大的, 相乘保留兩位小數就行了 B polygon //其實就是求多邊形的內角和公式

洛谷P1226 快速||餘運算 題解

題目描述 輸入b,p,k的值,求b^p mod k的值。其中b,p,k*k為長整型數。 輸入輸出格式 輸入格式: 三個整數b,p,k. 輸出格式: 輸出“b^p mod k=s” s為運算結果 輸入輸出樣例 輸入樣例#1: 2 10 9 輸出樣例#

[DP](計蒜之道2016程式設計大賽初賽第六場)微軟的員工福利 題解.md

[DP] (計蒜之道2016初賽第六場) 微軟的員工福利 題解 題目大意 給出一個nnn個節點的有根樹,每個點可以賦予給定的兩個值v[i][0/1]v[i][0/1]v[i][0/1]其中之一,這棵樹的權值就是所有節點的值,但是對於每個非葉節點節點iii而言,如

題解】英雄會第二屆線上程式設計大賽·CSDN現場決賽:三元組的數量

題目連結: http://hero.csdn.net/Question/Details?ID=222&ExamID=217題目詳情 {5 3 1}和{7 5 3}是2組不同的等差三元組,除了等差的性質之外,還有個奇妙的地方在於:5^2 – 3^2 – 1^2 = 7^2 – 5^

【杭州電子科技大學2018新生程式設計大賽題解

01: 1 #include<cstdio> 2 #include<cstring> 3 #include<string> 4 #include<cmath> 5 #include<iostream> 6 #include<

QDU第一屆程式設計大賽——E到I題解法(非官方題解

題目連結https://qduoj.com/contest/28/problems,密碼:qdu1230 E題: 思路:先進行排序,然後去暴力模擬就可以,但可能WA了幾次,導致此題沒解出來,有點可惜 程式碼: #include<cstdio> #include<al

2016中北大學ACM程式設計新生賽題解

新生賽題目地址 a or an 輸入字串後判斷第一個字元是不是’a’,’e’,’i’,’o’,’u’,即可。 #include<algorithm> #include <iostream> #include <cstri

“青軟杯”安徽科技學院第六屆程式設計大賽_非專業組

1299 Problem C C互質個數 C互質個數 Time Limit:1000MS  Memory Limit:65536K Total Submit:21 Accepted:8 Description 貝貝、妞妞和康康都長大了,如今,他們已屆小學畢業,老師給貝貝出了一道強化計算的題目,讓她做一大堆除

密碼程式設計_換位加密法的解密

import math,pyperclip def main(): myMessage='Cenoonommstmme oo snnio. s s c' myKey=8 plaintext=decryptMessage(myKey,myMessage) print(p

密碼程式設計 _換位加密法

import pyperclip def main(): myMessage='Commen sense is not so common.' myKey=8 ciphertext=encryptMessage(myKey,myMessage) print(ciphe

密碼程式設計_凱撒加密法

import pyperclip message='This is my secret message.' key=13 mode='encrypt' LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' translated='' message=message.upper()

北京化工大學2018年10月程式設計競賽部分題解(A,C,E,H)

目錄 北京化工大學2018年10月程式設計競賽部分題解(A,C,E,H) 競賽事件相關 競賽連結 競賽題目 總結 北京化工大學2018年10月程式設計競賽部分題解(A,C,E,H) 競賽事件相關 競賽連結 雖然

重慶市第九屆大學生程式設計大賽校內摸底測試題-部分答案

自己寫的程式碼,暫時還沒技術保證是最好的。 題目一、字母方陣 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespac

重慶市第九屆大學生程式設計大賽校內摸底測試題

題目一、字母方陣 題目描述: 給定兩個整數M,N,生成一個M*N的矩陣,矩陣中元素取值為A至Z的26個字母中的一個,A在左上角,其餘各數按順時針方向旋轉前進,依次遞增放置,當超過26時又從A開始填充。例如,當M=5,N=8時,矩陣中的內容如下: A B C D E

python的學習之路===小白程式設計(1)

當我follow一個同事介紹的博主的時候,發現了這個七年前註冊過的部落格賬號。 當時好像在學習c#和mvc的一些東東。 但是回頭看去,不止七年前,更早更早之前,就一直在嘗試著學習程式設計,想掌握一個能夠得心應手的工具。但由於需求並不迫切,加上自己性格使然,斷斷續續的撿起放下,淺嘗輒止的嘗試

python的學習之路===小白程式設計(2)

11月9日 資料庫架構,資料庫設計花的時間有點多,貌似想多了的緣故。 回頭看一下自己的目標,是想通過這個增加對python熟悉程度,提高學習興趣,掌握和了解使用python程式設計的方法。 而實際上至少目前而言自己還是不具備直接考慮程式設計的能力的。所以一切以簡單為主。 那

如何程式設計,我的一些學習感悟

    入坑已經有一年之久,今天來談談自己的學習心得也希望能幫到更多的人,如果有講的不好或者不準確的地方還請各位大神指正,本文僅僅針對於想要入行的朋友說的。  廢話不說現在進入正題,對於如何學習有以下三點要說     第一 瞭解語言 &nb

2018【位元杯】程式設計大賽

2018【位元杯】程式設計大賽 1. D #include <cstdio> #include <cstring> #include <algorithm> #include<iostream> using namespace std;