日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Hello World社团冬季招新暨杭电Umis项目人才招募程序设计竞赛

發(fā)布時間:2024/10/5 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Hello World社团冬季招新暨杭电Umis项目人才招募程序设计竞赛 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

這是一道簡單的簽到題

http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1001&cid=838

/* *@Author: STZG *@Language: C++ */ #include <bits/stdc++.h> #include<iostream> #include<algorithm> #include<cstdlib> #include<cstring> #include<cstdio> #include<string> #include<vector> #include<bitset> #include<queue> #include<deque> #include<stack> #include<cmath> #include<list> #include<map> #include<set> //#define DEBUG #define RI register int using namespace std; typedef long long ll; //typedef __int128 lll; const int N=100000+10; const int MOD=1e9+7; const double PI = acos(-1.0); const double EXP = 1E-8; const int INF = 0x3f3f3f3f; int t,n,m,k,q,ans; int a[N]; char str; int main() { #ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout); #endifwhile(~scanf("%d",&n)){t=0;for(int i=1;i<=n;i++){cin>>a[i];t+=a[i];}cout << t << endl;}//cout << "Hello world!" << endl;return 0; }

這是一道簡單的判斷題

http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1002&cid=838

/* *@Author: STZG *@Language: C++ */ #include <bits/stdc++.h> #include<iostream> #include<algorithm> #include<cstdlib> #include<cstring> #include<cstdio> #include<string> #include<vector> #include<bitset> #include<queue> #include<deque> #include<stack> #include<cmath> #include<list> #include<map> #include<set> //#define DEBUG #define RI register int using namespace std; typedef long long ll; //typedef __int128 lll; const int N=100000+10; const int MOD=1e9+7; const double PI = acos(-1.0); const double EXP = 1E-8; const int INF = 0x3f3f3f3f; int t,n,m,k,q,ans; int a[N]; char str; int main() { #ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout); #endifwhile(~scanf("%d+%d=%d",&n,&m,&k)){if(n==1&m==1&&k==3)cout << "YES" << endl;elsecout << "NO" << endl;}//cout << "Hello world!" << endl;return 0; }

這是一道簡單的遞推題

http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1003&cid=838

/* *@Author: STZG *@Language: C++ */ #include <bits/stdc++.h> #include<iostream> #include<algorithm> #include<cstdlib> #include<cstring> #include<cstdio> #include<string> #include<vector> #include<bitset> #include<queue> #include<deque> #include<stack> #include<cmath> #include<list> #include<map> #include<set> //#define DEBUG #define RI register int using namespace std; typedef long long ll; //typedef __int128 lll; const int N=100000+10; const int MOD=1e9+7; const double PI = acos(-1.0); const double EXP = 1E-8; const int INF = 0x3f3f3f3f; int t,n,m,k,q,ans; ll a[N]; char str; int main() { #ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout); #endifa[1]=1;a[2]=1;a[3]=1;for(int i=4;i<=70;i++){a[i]=a[i-1]+a[i-2]+a[i-3];}while(~scanf("%d",&n)){cout << a[n] << endl;}//cout << "Hello world!" << endl;return 0; }

這是一道簡單的數(shù)學(xué)題

http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1004&cid=838

/* *@Author: STZG *@Language: C++ */ #include <bits/stdc++.h> #include<iostream> #include<algorithm> #include<cstdlib> #include<cstring> #include<cstdio> #include<string> #include<vector> #include<bitset> #include<queue> #include<deque> #include<stack> #include<cmath> #include<list> #include<map> #include<set> //#define DEBUGusing namespace std; typedef long long ll; const int N=20000000; const double PI = acos(-1.0); const double EXP = 1E-8; const int INF = 0x3f3f3f3f; ll t,n,m; ll nine[300]; ll total_nine;void init(){nine[0] = 9;total_nine = 1;for(int i = 1; nine[i-1]*9ll<1e18; i ++) {nine[i] = nine[i-1]*9;total_nine ++;} }ll get_suff_count(ll m){ll ret = 0;for(int i = 0; i < total_nine; i ++){ret += m/nine[i];}return ret; } int main() { #ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout); #endifinit();while(~scanf("%lld",&n)){cout << get_suff_count(n*n*n) << endl;}//cout << "Hello world!" << endl;return 0; } #include<stdio.h> int main() {long long int n;while(scanf("%lld",&n)!=EOF){n=n*n*n;long long int sum=0;while(n!=0){n=n/9;sum+=n;}printf("%lld\n",sum);}return 0; }

這是一道簡單的字符題

http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1005&cid=838

/* *@Author: STZG *@Language: C++ */ #include <bits/stdc++.h> #include<iostream> #include<algorithm> #include<cstdlib> #include<cstring> #include<cstdio> #include<string> #include<vector> #include<bitset> #include<queue> #include<deque> #include<stack> #include<cmath> #include<list> #include<map> #include<set> //#define DEBUG #define RI register int using namespace std; typedef long long ll; //typedef __int128 lll; const int N=100000+10; const int MOD=1e9+7; const double PI = acos(-1.0); const double EXP = 1E-8; const int INF = 0x3f3f3f3f; int t,n,m,k,q,ans; int a; char str[100]; string s; int main() { #ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout); #endifwhile(~scanf("%d",&n)){ans=1000;string a="i love you",b="i hate you";getchar();for(int i=1;i<=n;i++){getline(cin,s);if(s==a)ans+=100;if(s==b)ans-=500;}if(ans>=0){cout << "good man!" << endl;}else{cout << "xiaoming=zhanan" << endl;}}//cout << "Hello world!" << endl;return 0; }

這是一道簡單的計算題

http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1006&cid=838

#include<bits/stdc++.h> using namespace std; int n,T; int x[4],y[4],A,B,C,M,W; vector<int> v; bool cmp(const int &a,const int &b) { return a>b; } int main() { scanf("%d",&T); while(T--) { scanf("%d%d%d",&x[1],&y[1],&A); scanf("%d%d",&x[2],&B); scanf("%d%d%d",&x[3],&y[3],&C); scanf("%d%d",&M,&W); int ans=0; for(int i=0;i<=A;i++) { for(int j=0;j<=C;j++) { v.clear(); for(int k=1;k<=i;k++) v.push_back(x[1]); for(int k=1;k<=j;k++) v.push_back(x[3]); sort(v.begin(),v.end(),cmp); int tmp=0; for(int k=0;k<v.size();k++) tmp+=v[k]; for(int k=0;k<min((int)v.size(),B);k++) tmp-=min(x[2],v[k]); if(tmp<=W) ans=max(ans,(y[1]+j*y[3])*i); } } if(ans>=M) puts("Win");else printf("%d\n",M-ans); } return 0; }

這是一道簡單的游戲題

http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1007&cid=838

/* *@Author: STZG *@Language: C++ */ #include <bits/stdc++.h> #include<iostream> #include<algorithm> #include<cstdlib> #include<cstring> #include<cstdio> #include<string> #include<vector> #include<bitset> #include<queue> #include<deque> #include<stack> #include<cmath> #include<list> #include<map> #include<set> //#define DEBUG #define RI register int using namespace std; typedef long long ll; //typedef __int128 lll; const int N=100000+10; const int MOD=1e9+7; const double PI = acos(-1.0); const double EXP = 1E-8; const int INF = 0x3f3f3f3f; int t,n,m,k,q,ans; int a; char str[4][6]; int main() { #ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout); #endifscanf("%d",&t);while(t--){scanf("%s",str[1]+1);scanf("%s",str[2]+1);scanf("%s",str[3]+1);if(str[1][1]==str[1][2]&&str[1][2]==str[1][3]&&str[1][1]!='.'){cout << str[1][1] << endl;continue;}if(str[2][1]==str[2][2]&&str[2][2]==str[2][3]&&str[2][1]!='.'){cout << str[2][1] << endl;continue;}if(str[3][1]==str[3][2]&&str[3][2]==str[3][3]&&str[3][1]!='.'){cout << str[3][1] << endl;continue;}if(str[1][1]==str[2][1]&&str[2][1]==str[3][1]&&str[1][1]!='.'){cout << str[1][1] << endl;continue;}if(str[1][2]==str[2][2]&&str[2][2]==str[3][2]&&str[1][2]!='.'){cout << str[1][2] << endl;continue;}if(str[1][3]==str[2][3]&&str[2][3]==str[3][3]&&str[1][3]!='.'){cout << str[1][3] << endl;continue;}if(str[1][3]==str[2][2]&&str[2][2]==str[3][1]&&str[1][3]!='.'){cout << str[1][3] << endl;continue;}if(str[1][1]==str[2][2]&&str[2][2]==str[3][3]&&str[1][1]!='.'){cout << str[1][1] << endl;continue;}cout << "Waiting..." << endl;}//cout << "Hello world!" << endl;return 0; }

這是一個簡單的紙牌題

http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1008&cid=838

/* *@Author: STZG *@Language: C++ */ #include <bits/stdc++.h> #include<iostream> #include<algorithm> #include<cstdlib> #include<cstring> #include<cstdio> #include<string> #include<vector> #include<bitset> #include<queue> #include<deque> #include<stack> #include<cmath> #include<list> #include<map> #include<set> //#define DEBUG #define RI register int using namespace std; typedef long long ll; //typedef __int128 lll; const int N=100000+10; const int MOD=1e9+7; const double PI = acos(-1.0); const double EXP = 1E-8; const int INF = 0x3f3f3f3f; int t,n,m,k,q,ans; int a; char str; int p(int a,int b,int c){if(a==b&&b==c){return 3;}if(a==b||b==c||a==c){return 2;}return 1; } int main() { #ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout); #endifscanf("%d",&t);int a,b,c;int x,y,z;while(t--){scanf("%d%d%d",&a,&b,&c);n=p(a,b,c);scanf("%d%d%d",&x,&y,&z);m=p(x,y,z);if(n>m){cout << "A" << endl;}else if(n<m){cout << "B" << endl;}else{if(n==3){if(a>x){cout << "A" << endl;}else if(a<x){cout << "B" << endl;}else{cout << "Tie" << endl;}}else if(n==2){if(a==b)k=c;else if(a==c)k=b;elsek=a;if(x==y)q=z;else if(x==z)q=y;elseq=x;if(k>q){cout << "A" << endl;}else if(k<q){cout << "B" << endl;}else{cout << "Tie0" << endl;}}else{int tmp1[4],tmp2[4];tmp1[1]=a,tmp1[2]=b,tmp1[3]=c;tmp2[1]=x,tmp2[2]=y,tmp2[3]=z;sort(tmp1+1,tmp1+4);sort(tmp2+1,tmp2+4);if(tmp1[3]>tmp2[3]){cout << "A" << endl;}else if(tmp1[3]<tmp2[3]){cout << "B" << endl;}else{if(tmp1[2]>tmp2[2]){cout << "A" << endl;}else if(tmp1[2]<tmp2[2]){cout << "B" << endl;}else{if(tmp1[1]>tmp2[1]){cout << "A" << endl;}else if(tmp1[1]<tmp2[1]){cout << "B" << endl;}else{cout << "Tie" << endl;}}}}}}//cout << "Hello world!" << endl;return 0; }

?

總結(jié)

以上是生活随笔為你收集整理的Hello World社团冬季招新暨杭电Umis项目人才招募程序设计竞赛的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 日韩影视在线 | 蜜桃av在线播放 | 天堂中文字幕av | 久久99精品久久久久久国产越南 | 亚洲中文字幕无码av | 欧美一区二区久久 | 熟妇高潮精品一区二区三区 | 国产精品一卡 | 国产成人在线视频 | 国产精品一级二级 | 天天干视频在线 | 韩漫动漫免费大全在线观看 | 青娱网电信一区电信二区电信三区 | 亚洲国产精品一区二区久久hs | 日本黄色高清视频 | www国产黄色 | 91精品国产综合久久久蜜臀九色 | 四虎影酷| 日韩激情小视频 | 美女自拍视频 | 天海翼一二三区 | 无码人妻少妇伦在线电影 | 国产裸体视频网站 | 少妇把腿扒开让我舔18 | 亚洲无人区码一码二码三码 | 久久综合成人 | 无码粉嫩虎白一线天在线观看 | 国产黄色免费网站 | 成人精品一区日本无码网 | 日本网站在线免费观看 | 激情爱爱网| 国产精品另类 | 亚洲第六页 | 河北彩花69xx精品一区 | 在线视频中文字幕 | 亚洲乱亚洲乱 | 日批在线观看 | 日本精品一二三区 | 中文字幕精品一区二区三区精品 | 少妇高潮一区二区三区四区 | 在线精品亚洲欧美日韩国产 | 麻豆成人精品国产免费 | www.av在线播放 | 国产91一区在线精品 | 麻豆国产尤物av尤物在线观看 | 日韩欧美午夜 | 欧美14sex性hd摘花 | 浓精喷进老师黑色丝袜在线观看 | 特黄做受又粗又大又硬老头 | 青青草华人在线 | 牛牛精品一区二区 | 伊人avav | 人体裸体bbbbb欣赏 | 亚洲免费专区 | 91成人免费在线视频 | av在线资源站 | 日本在线不卡一区二区三区 | 国产乱真实合集 | 伊人久久艹 | 天天色宗合 | 亚洲第一页色 | 手机看片久久久 | 国语对白少妇spa私密按摩 | 国模吧无码一区二区三区 | 冲田杏梨av| 亚洲一卡二卡三卡 | 麻豆精品国产精华精华液好用吗 | 一卡二卡三卡 | 99久久免费看精品国产一区 | 久久亚洲天堂网 | 国产精品久久久久久 | 日韩高清久久 | 影音先锋日韩资源 | 91在线成人| 成人性做爰aaa片免费看不忠 | 日韩欧美三级在线 | 精品一二三四 | 日本免费一区二区三区四区五六区 | 99九九久久 | 魔性诱惑 | 欧美日韩精品二区 | 国产综合视频 | 成人自拍视频在线 | 国产一区二区三区影院 | 久草日韩 | 日本东京热一区二区 | 水牛影视av一区二区免费 | av动态| 欧美一区二区三区四区在线观看 | 欧美色亚洲色 | 久久久久中文字幕亚洲精品 | 欧美色精品 | 成人a在线 | 超碰在线观看免费版 | 欧美看片 | 欧美成人一区二区三区 | 狼人av在线 | 大号bbwassbigav女 | 中文字幕av高清片 |