文章列表
C++输入输出流优化--你的竞赛模板
摘要: 输入输出优化:ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);你可以准备的代码的模板里面可以添加这句话了。 曾在<算法竞赛>中看……
关于1019题的看法。
摘要:下面给出我的代码;#include <stdio.h>#include <math.h>void main(){ double h,sum=0; int M,N; scanf("%d %d",&M,&……
如何理解typedef?
摘要:typedef用法:1、用typedef为现有类型创建别名,定义易于记忆的类型名2、typedef 还可以掩饰复合类型,如指针和数组。例如,你不用像下面这样重复定义有 81 个字符元素的数组: ……
蛇形矩阵(蓝桥杯普及题目)
摘要:c++解法如下:
#include <iostream>
using namespace std;
int main()
{
const int N = 101;
int ar……
数组和链表在原空间逆序
摘要:#include<stdio.h>
#include<stdlib.h>
void array_sequence()//顺序存储(数组)逆序的函数
{
int len,i,j;
scanf……
求最大公约数和最小公倍数
摘要:#include<iostream>#include<math.h>using namespace std;int mods(int a,int b){ while(b!=0){ int te……
删除字符串中指定的字符
摘要:要求:给定字符串 a="hello" 删除a中的字符'e'代码如下:#include<stdio.h>
int main(void) {
int i ,j;
char a[] =……
题解1032(c语言代码) 极短代码,适合小白(无gets,puts等冷门函数)
摘要:重点: 1:简单的题,不要想得那么难! 2:连接字符串无需strcpy! 无需strcpy! 无需strcpy! 3:字符串输入输出用%s!代码: #include<stdio……