摘要:
model 1 import torch.nn as nn 2 import torch 3 4 class AlexNet(nn.Module): 5 def __init__(self, num_classes=1000, init_weights=False): 6 super(AlexNet 阅读全文
摘要:
#include int max(int a,int b) ; void solve(int a[], int n) ; int main() { int n ; scanf("%d",&n ) ; int a[n] ; for(int i=0; ib) return a ; else return b ; } 阅读全文
摘要:
统计[a,b]之间1出现的次数 阅读全文
摘要:
头文件: #include<set> set multiset set<int> s; set<double> ss; 基础操作: s.begin() // 返回指向第⼀个元素的迭代器 s.clear() // 清除所有元素 s.empty() // 如果集合为空,返回true(真) s.end() 阅读全文
摘要:
头文件 #include<map> map multimap map<string, int> m; 基础操作: /* 向map中插⼊元素 */ m[key] = value; m.insert(make_pair(key, value)) m.erase(key); // 删除与指定key键值相匹 阅读全文
摘要:
给定整数n,请问n以内有多少个素数 ? eg: 输入: 11 输出: 5(2,3,5,7,11共5个) 阅读全文
摘要:
给定四种水果,分别是苹果(apple)、梨(pear)、桔子(orange)、葡萄(grape),单价分别对应为3.00元/公斤、2.50元/公斤、4.10元/公斤、10.20元/公斤。 首先在屏幕上显示以下菜单: 用户可以输入编号1~4查询对应水果的单价。当连续查询次数超过5次时,程序应自动退出查 阅读全文