任务1 可是使用数组变量和指针变量 任务2 //2.1 #include<stdio.h> long long fac(int n); int main(){ int i,n; printf("Enter n:"); scanf("%d",&n); for(i=1;i<=n;i++) printf( ...
分类:
其他好文 时间:
2020-12-03 11:47:34
阅读次数:
4
我们都知道在Java里面new出来的对象都是在堆上分配空间存储的,但是针对基本类型却有所区别,基本类型可以分配在栈上,也可以分配在堆上,这是为什么? 在这之前,我们先看下Java的基本类型8种分别是: byte =>8bit short => 16bit int => 32bit long =>64 ...
分类:
编程语言 时间:
2020-12-03 11:41:22
阅读次数:
6
在Tensor后加 .long(), .int(), .float(), .double()等即可,也可以用.to()函数进行转换,所有的Tensor类型可参考https://pytorch.org/docs/stable/tensors.html import torch a = torch.Do ...
分类:
其他好文 时间:
2020-12-02 12:26:05
阅读次数:
5
// 一元二次方程求解 (函数实现方式) // 重复执行, 直到按Ctrl+Z结束 #include <math.h> #include <stdio.h> // 函数声明 void solve(double a, double b, double c); // 主函数 int main() { d ...
分类:
其他好文 时间:
2020-12-02 12:05:39
阅读次数:
5
基环树 基环树直径 P3248 #include<bits/stdc++.h> using namespace std; #define ll long long const int N=1e5+5; int n; int te,v[N<<1],pre[N<<1],tail[N]; ll L,len ...
分类:
其他好文 时间:
2020-12-01 12:29:19
阅读次数:
7
Sumdiv Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 37483 Accepted: 9161 Description Consider two natural numbers A and B. Let S be the ...
分类:
其他好文 时间:
2020-11-27 11:53:21
阅读次数:
25
###链接 贴一下青君大佬的博客~ #include<bits/stdc++.h> #define IL inline #define LL long long #define pb push_back #define pi pair<int,int> #define mk make_pair us ...
分类:
其他好文 时间:
2020-11-27 11:15:36
阅读次数:
6
https://www.luogu.com.cn/problem/P3366 1 #define IO std::ios::sync_with_stdio(0) 2 #include <bits/stdc++.h> 3 #define pb push_back 4 using namespace s ...
分类:
其他好文 时间:
2020-11-26 15:24:23
阅读次数:
48
1.基本类型和引用类型在内存中的保存Java中数据类型分为两大类,基本类型和对象类型。相应的,变量也有两种类型:基本类型和引用类型。基本类型的变量保存原始值,即它代表的值就是数值本身;而引用类型的变量保存引用值,"引用值"指向内存空间的地址,代表了某个对象的引用,而不是对象本身,对象本身存放在这个引用值所表示的地址的位置。基本类型包括:byte,short,int,long,char,float,
分类:
编程语言 时间:
2020-11-26 14:57:53
阅读次数:
6
##1、DIR 定义 struct __dirstream { void *__fd; char *__data; int __entry_data; char *__ptr; int __entry_ptr; size_t __allocation; size_t __size; __libc_l ...
分类:
系统相关 时间:
2020-11-26 14:36:10
阅读次数:
7