Python3算法类多组数据输入输出格式 摘要:在 Python3 中舍弃了 Python2 中的 raw_input() 的输入方式,读入的数据全部是字符串类型,需要使用 int() 强转即可,input()读入一行数据,strip() 去除两端…… 文章列表 2019年04月15日 3 点赞 0 评论 2132 浏览 评分:9.9
c++函数模板初 摘要:#include <iostream>#include <string>using namespace std;// 你提交的代码将嵌入到这里const int SIZE = 100;template…… 文章列表 2019年04月15日 0 点赞 0 评论 1077 浏览 评分:0.0
利用栈的思想写的队列 摘要: 队列是一种先进先出的线性结构。本文用栈的思想对队列重新定义,希望大家可以理解。 选取三个数据进行测试例:1 2 3 .#include<iostream> #include<cstdio> …… 文章列表 2019年04月14日 0 点赞 0 评论 1189 浏览 评分:0.0
getline() 与get()两个函数的异同 摘要:#include<iostream> #include<cstdio> #include<string> #include<vector> using namespace std; cons…… 文章列表 2019年04月11日 0 点赞 0 评论 1275 浏览 评分:0.0
数组与指针,能看懂的肯定是高手 摘要:#include<stdio.h> int main() { int a = 10; printf("%d\n",0[&a]); unsigned int b= &a; printf("%…… 文章列表 2019年04月08日 4 点赞 12 评论 787 浏览 评分:2.0
利用递归函数寻找最大路径的方法,例题来自p1004 摘要:#include<iostream>#include<cstdio>using namespace std;int a[1001][1001],b[1001][1001];//a数组表示这个位置的高度…… 文章列表 2019年04月05日 0 点赞 0 评论 940 浏览 评分:0.0
很多人围成一圈,叫号,叫到某固定号出去。这里提供两种方法,希望可以理解。 摘要:#include<iostream>using namespace std;void fenxi(int n,int m){ int a[1000],s,num=0,i=0; for(i=0;i<…… 文章列表 2019年04月03日 1 点赞 0 评论 757 浏览 评分:0.0
计算int数的各个数加起来的和 摘要:#include <iostream>//方法一#include <cmath>using namespace std;long long n;//long long代表他是64位int main…… 文章列表 2019年04月01日 0 点赞 0 评论 955 浏览 评分:0.0
DNA:打印类似DNA的图形,这种题主要找规律 摘要:#include<iostream>using namespace std;int main(int argc, char const *argv[]) { int N; cin>>N; …… 文章列表 2019年03月31日 1 点赞 0 评论 819 浏览 评分:0.0