会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
孤独的程序员dis1500
知识就是希望
上一页
1
···
311
312
313
314
315
316
317
318
319
···
618
下一页
2021年12月6日
华为机考3道小算法题
摘要: 一道也没做出来 出租车计费问题 排序求和 链表路径
阅读全文
posted @ 2021-12-06 07:09 lydstory
阅读(158)
评论(0)
推荐(0)
2021年12月2日
两个大数计算
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> int main() { char a[10050]; char b[10050]; char sum[10051]; while(scanf("%s",a)!=EOF) { int fl
阅读全文
posted @ 2021-12-02 16:28 lydstory
阅读(38)
评论(0)
推荐(0)
华为机考(牛客网)字符统计
摘要: #include <stdio.h> #include <string.h> #define MAXLEN 500 int acsciinum(const char* str) { int len = strlen(str); if(len > MAXLEN) return -1; int ret[
阅读全文
posted @ 2021-12-02 15:57 lydstory
阅读(84)
评论(0)
推荐(0)
auto a:ans迭代器输出
摘要: cout<<ans.size()<<endl; for(auto a:ans) cout<<a<<endl; cout<<ans.size()<<endl; for(auto a:ans) cout<<a<<endl;
阅读全文
posted @ 2021-12-02 15:10 lydstory
阅读(99)
评论(0)
推荐(0)
c++大小写
摘要: #include<iostream> #include<algorithm> using namespace std; bool isuupper(char c){ return (c>='A'&&c<='Z'); } int main(){ string s; while(getline(cin,
阅读全文
posted @ 2021-12-02 14:46 lydstory
阅读(36)
评论(0)
推荐(0)
牛客网通过版while(getline(cin,str))
摘要: #include <iostream> #include <string> using namespace std; #include <stdio.h> #include <memory.h> #define MAXLEN 250 int largelettersize(const char* s
阅读全文
posted @ 2021-12-02 14:19 lydstory
阅读(148)
评论(0)
推荐(0)
注意字符串第一个字符do...while
摘要: #include <iostream> #include <string> using namespace std; #include <stdio.h> #include <memory.h> #define MAXLEN 250 int largelettersize(const char* s
阅读全文
posted @ 2021-12-02 14:12 lydstory
阅读(13)
评论(0)
推荐(0)
cin.getline
摘要: 4. getline()(包含头文件#include <string>) 若定义变量为string类型,注意不是字符型数组。则要考虑getline()函数。用法如下: int main() { string st; getline(cin,st); cout<<st<<endl; return0;
阅读全文
posted @ 2021-12-02 13:59 lydstory
阅读(117)
评论(0)
推荐(0)
牛客网带空格字符串如何输入
摘要: #include <iostream> #include <string> using namespace std; #include <stdio.h> #include <memory.h> #define MAXLEN 250 int largelettersize(const char* s
阅读全文
posted @ 2021-12-02 13:51 lydstory
阅读(71)
评论(0)
推荐(0)
牛客网输入带空格行字符
摘要: int main() { while(1) { cin >> str; if(cin.get() == '\n") continue; } return 0; }
阅读全文
posted @ 2021-12-02 13:35 lydstory
阅读(62)
评论(0)
推荐(0)
上一页
1
···
311
312
313
314
315
316
317
318
319
···
618
下一页
导航
博客园
首页
新随笔
联系
订阅
管理
公告