1 #define IO std::ios::sync_with_stdio(0) 2 #include <bits/stdc++.h> 3 using namespace std; 4 #define mk make_pair 5 #define pb push_back 6 const int ...
分类:
其他好文 时间:
2021-01-06 11:49:40
阅读次数:
0
题干 给你一个整数 n ,表示比赛中的队伍数。比赛遵循一种独特的赛制: 如果当前队伍数是 偶数 ,那么每支队伍都会与另一支队伍配对。总共进行 n / 2 场比赛,且产生 n / 2 支队伍进入下一轮。 如果当前队伍数为 奇数 ,那么将会随机轮空并晋级一支队伍,其余的队伍配对。总共进行 (n - 1) ...
分类:
其他好文 时间:
2021-01-05 11:41:42
阅读次数:
0
#include<iostream> #include<vector> using namespace std; vector<char>post,in; vector<char>level(100000,-1); in N; void ergodic(int root,int start,int ...
分类:
编程语言 时间:
2021-01-05 11:40:19
阅读次数:
0
""" 输入字符串,判断只包含数字、a-z、A-Z、+-的数字串,进行+-,算出最小和 """ import re def sum_s(s): sum = 0 if re.match('^[0-9a-zA-Z+-]+$',s):#判断只包含数字、a-z、A-Z、+-的数字串 list1 = re.f ...
分类:
编程语言 时间:
2021-01-05 11:35:21
阅读次数:
0
1、 >>> a = "" >>> while a != "quit": a = input("please input a str or 'quit' to leave: ") print(a) please input a str or 'quit' to leave: 100 100 plea ...
分类:
编程语言 时间:
2021-01-05 11:31:35
阅读次数:
0
在python中,有yield的函数是生成器函数 def gen(para): while True: yield para print(next(gen(8))) print(next(gen(88))) print(next(gen(888))) print(" ") def gen2(): l ...
分类:
其他好文 时间:
2021-01-05 11:24:19
阅读次数:
0
bool isAdditiveNumber(char * num){ int i, j, k, len=strlen(num), pst1=0, pst2=0, bit=0, third; char* tmp1=(char*)calloc(22,sizeof(char)); char* tmp2=( ...
分类:
其他好文 时间:
2021-01-05 11:20:52
阅读次数:
0
#include<bits/stdc++.h> using namespace std; int n; void mysort(int a[],int l,int r)//自己写的快排 { int mid=a[(l+r)/2];//找中间的数进行2分 int i=l,j=r; do{ while(a ...
分类:
编程语言 时间:
2021-01-05 10:39:05
阅读次数:
0
在代码中我们可以只加上标签@Data 而不用get,set方法; val : 和 scala 中 val 同名, 可以在运行时确定类型; @NonNull : 注解在参数上, 如果该类参数为 null , 就会报出异常, throw new NullPointException(参数名) @Clea ...
分类:
其他好文 时间:
2021-01-04 11:15:37
阅读次数:
0
最近在学习python,按照网上的步骤进行操作 url.py的代码 但是一直报如下的错。 Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/page/ Using the URLconf defin ...
分类:
其他好文 时间:
2021-01-04 11:14:18
阅读次数:
0