摘要:
1027 打印沙漏 (20分) 注意输出的字符是自己输入的,不是固定的'*' 先求出多少层,然后到一定条件反转一下就行了 #include<iostream> using namespace std; int main(){ int n,m; string s; cin>>n>>s; int lev 阅读全文
posted @ 2020-06-08 11:04
chstor
阅读(118)
评论(0)
推荐(0)
摘要:
1036 跟奥巴马一起编程 (15分) 注意一下空格就行了 #include<iostream> #include<algorithm> using namespace std; int main(){ int n,m;string s; cin>>n>>s; if(n%2){ m=n/2+1; } 阅读全文
posted @ 2020-06-08 11:01
chstor
阅读(177)
评论(0)
推荐(0)
摘要:
1032 挖掘机技术哪家强 (20分) 从 1 开始连续编号 #include<iostream> #include<algorithm> const int maxn =100005; using namespace std; struct Node{ int id,grade=0; }stu[m 阅读全文
posted @ 2020-06-08 09:51
chstor
阅读(127)
评论(0)
推荐(0)
摘要:
用容器存数组简单一些,字符串string好些 一个坑点就是没有有效生日,只输出0 #include<iostream> #include<vector> #include<cstdio> #include<algorithm> using namespace std; struct Node{ st 阅读全文
posted @ 2020-06-08 09:45
chstor
阅读(136)
评论(0)
推荐(0)
摘要:
1004 成绩排名 (20分) 直接sort了,找最大最小值 #include<iostream> #include<algorithm> using namespace std; struct Node{ string name; string id; int grade; }; bool cmp 阅读全文
posted @ 2020-06-08 09:43
chstor
阅读(189)
评论(0)
推荐(0)
摘要:
1041 考试座位号 (15分) 先附上自己写的辣鸡代码,第一次非常傻,查找输入的id,用了双重for循环 虽然这次数据小体现不出来,但是下次要注意orz #include<iostream> const int maxn = 1005; using namespace std; struct No 阅读全文
posted @ 2020-06-08 09:41
chstor
阅读(142)
评论(0)
推荐(0)

浙公网安备 33010602011771号