![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c
beishanghou
无打撒所多
展开
-
c学习历程:输出菱形图案
题目:输出菱形图案这道题只用了一个循环,故在此记录。#include <stdio.h>#include <stdlib.h>#define STR "$$$$$$$$$$$$$"#define SLEN (int)(sizeof(STR)-1)int main(){ for (int n=SLEN/2;n>=-SLEN/2;n--) printf("%*.*s\原创 2017-11-17 16:43:03 · 422 阅读 · 1 评论 -
A. Fingerprints
A. Fingerprintstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are locked in a room with a door that has a keypad with 10 keys corresponding to...原创 2018-06-25 19:48:37 · 129 阅读 · 0 评论 -
const指针
这篇文章是关于const指针的一些问题,在次记录1.int 整形指针变量无法无处化为const int类型。const int a =10;int *b = &a; //错误原创 2018-06-28 17:23:17 · 88 阅读 · 0 评论 -
c++中的0,NULL,nullptr
在c++中如果我们要写一个空指针我们下意识会这么写int *p = NULL;但是在下面这段代码中就会出现问题#include<iostream>#include<cstdio>#include<stddef.h>using namespace std;int f(int a){ cout<<"normal fun...原创 2018-10-31 14:35:09 · 281 阅读 · 1 评论 -
单调栈小结
单调栈顾名思义就是栈内元素单调递增或者单调递减我们以这一题为例#include<cstdio>#include<stack>using std::stack;//每当元素入栈时就让ans+=s.size()int main(){ int n,i; int temp; long long ans = 0; scanf(...原创 2018-11-10 11:34:13 · 163 阅读 · 0 评论