码迷,mamicode.com
首页 >  
搜索关键字:水题    ( 4171个结果
1082 射击比赛
水题。 1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 5 int main() { 6 int n,id,x,y, MIN = 0x3fffffff,MAX = -1,champion,vegetableBir ...
分类:其他好文   时间:2020-02-25 19:43:04    阅读次数:52
luoguP5219 无聊的水题 I 多项式快速幂
有一个幼儿园容斥:最大次数恰好为 $m=$ 最大次数最多为 $m$ - 最大次数最多为 $m-1$. 然后来一个多项式快速幂就好了. code: #include <cmath> #include <cstring> #include <algorithm> #include <cstdio> #i ...
分类:其他好文   时间:2020-02-24 22:37:42    阅读次数:94
1071 小赌怡情
水题。 #include<iostream> using namespace std; int main() { int t,k,n1,b,tt,n2; cin>>t>>k; for(int i = 0; i < k; ++i) { cin>>n1>>b>>tt>>n2; if(tt > t) { ...
分类:其他好文   时间:2020-02-24 19:04:17    阅读次数:71
1057 数零壹
水题。 #include<iostream> #include<cctype> using namespace std; string str; int main() { getline(cin,str); int sum = 0,r ,cnt0 = 0,cnt1 = 0; for(int i = ...
分类:其他好文   时间:2020-02-23 11:30:13    阅读次数:51
1056 组合数的和
水题。 #include<iostream> using namespace std; int main() { int n,a[10],sum = 0; cin>>n; for(int i = 0; i < n; ++i) cin>>a[i]; for(int i = 0; i < n; ++i) ...
分类:其他好文   时间:2020-02-22 17:21:36    阅读次数:85
1043 输出PATest
水题。还是一道hash题。 #include<iostream> using namespace std; int main() { int map[128] = {0}; char c; while (scanf("%c",&c) != EOF) map[c]++; while (map['P'] ...
分类:其他好文   时间:2020-02-19 19:11:30    阅读次数:70
1041 考试座位号
水题。发现PAT考察hash很多。 #include<iostream> #include<unordered_map> using namespace std; struct Student { string id;//学号 int sitNum;//考试座位号 }; int main() { i ...
分类:其他好文   时间:2020-02-19 19:06:10    阅读次数:60
1042 字符统计
水题,又是一道hash题。 #include<iostream> #include<cctype> using namespace std; int hashtable[26]= {0}; int main() { char c; while(scanf("%c",&c)!=EOF) { if(is ...
分类:其他好文   时间:2020-02-19 18:53:37    阅读次数:81
1036 跟奥巴马一起编程
水题。 #include<iostream> #include<cmath> using namespace std; int main() { int n,m; char c; cin>>n>>c; m = round(n/2.0)-2;//行数 for(int i =0; i< n; ++i)/ ...
分类:其他好文   时间:2020-02-19 13:26:21    阅读次数:52
1038 统计同成绩学生
水题。 #include<iostream> using namespace std; int hashtable[111]= {0}; //成绩与人数的映射 int main() { int n,score,k; cin>>n; for(int i = 0; i < n; ++i) { scanf ...
分类:其他好文   时间:2020-02-19 12:50:27    阅读次数:73
4171条   上一页 1 ... 9 10 11 12 13 ... 418 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!