![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法学习
luoqiyao_71
这个作者很懒,什么都没留下…
展开
-
字符串的输入输出 c++版
字符串的输入输出char s[maxSize];gets(s);scanf("%s",s);#include <iostream>using namespace std;int main(){ char s[10]; for(int i = 0; i <= 9; i++) s[i] = "\0"; gets(s); for(int i = 0; i <= 6; i++) cout << i << ":" << (in原创 2021-03-25 22:54:53 · 454 阅读 · 0 评论 -
字符的输入输出 c++版
字符与字符串的输入输出输入一个字符:getchar()输出一个字符:putchar()(字符变量或常量)char ch = getchar();putchar(ch);#include <iostream>using namespace std;int main(){ char ch; int i = 1; while(ch = getchar()) { cout << i << ":" << (int)ch <<原创 2021-03-25 22:24:19 · 1381 阅读 · 0 评论 -
OJ系统常见输入输出格式 c++版
常见OJ系统评判结果Accepted (AC):程序是正确的Wrong Answer (WA):你的程序运行的结果不正确,对于部分或者全部的测试数据没有输出正确的结果。通过正确性和鲁棒性(边界数据)来考虑改进代码Time Limit Exceeded (TLE):你的程序运行超过了时间限制。通过正确性(死循环或无限递归)和高效性(时间复杂度)来考虑改进代码Memory Limit Exceeded (MLE):你的程序运行超过了空间限制,如数组过大,不断申请Output Limit Exceed原创 2021-03-24 22:51:48 · 743 阅读 · 0 评论