会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
咕咕277
博客园
首页
新随笔
联系
订阅
管理
2020年6月17日
scanf读入字符
摘要: 当没有getchar的时候,第一次读入a与b是正常的。但是在输出的时候最后有一个换行符。 第二次读入的时候%c就把那个换行符给读进去了。然后再后面是n 13,没有空格去匹配输入要求,因此b不会更新为13,依旧是12 第二次输出的时候。输出一个换行符 一个空格 一个b(12) 所以要加一个getcha
阅读全文
posted @ 2020-06-17 17:35 咕咕277
阅读(412)
评论(0)
推荐(0)
2020年5月7日
cctype
摘要: cctype 是判断字符类型的 也就是用asc码判断是数字还是字母等 不能用cctype判断除了char类型之外的东西,例如int,double等
阅读全文
posted @ 2020-05-07 09:01 咕咕277
阅读(187)
评论(0)
推荐(0)
2020年4月28日
PAT 1143 Lowest Common Ancestor
摘要: #include <bits/stdc++.h> using namespace std; vector<int> pre; int n, m; map<int,bool> mp; int main() { scanf("%d %d",&m,&n); pre.resize(n+1);for (int
阅读全文
posted @ 2020-04-28 09:56 咕咕277
阅读(117)
评论(0)
推荐(0)
PAT 1147 Heaps
摘要: include <bits/stdc++.h> using namespace std; vector<int> tree; int n,m; void post(int index) { // 后序遍历输出 if (index>n ) return; post(index*2); post(ind
阅读全文
posted @ 2020-04-28 09:00 咕咕277
阅读(71)
评论(0)
推荐(0)
公告