[题目] 如图,正方形 $ABCD$ 的边长为 $1$ ,$P,Q$ 分别为边 $AB,DA$ 上的点.当 $\triangle APQ$ 的周长为 $2$ 时,求 $\angle PCQ$ 的大小. [解析] 设 $\angle DCQ=\alpha , \angle BCP=\beta$ ,则 ...
分类:
其他好文 时间:
2020-01-24 10:53:03
阅读次数:
95
dfs: 给定一个整数n,将数字1~n排成一排,将会有很多种排列方法。 现在,请你按照字典序将所有的排列方法输出。 输入格式 共一行,包含一个整数n。 输出格式 按字典序输出所有排列方案,每个方案占一行。 数据范围 1≤n≤71≤n≤7 输入样例: 3 输出样例: 1 2 3 1 3 2 2 1 3 ...
分类:
其他好文 时间:
2020-01-23 14:12:37
阅读次数:
83
A:判断一下和是不是3的倍数,由于只加不减,所以还要判断有没有大于和的1/3。 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 #define it register int 5 #define ct const in ...
分类:
其他好文 时间:
2020-01-23 09:39:49
阅读次数:
70
ybt1207 最大公约数问题 递归典例 (选它只是因为太典型,不是因为懒得做难题故意放水) 【题目描述】 给定两个正整数,求它们的最大公约数。 【输入】 输入一行,包含两个正整数( using namespace std; int a; int b; int f(int a,int b)//算法主 ...
分类:
其他好文 时间:
2020-01-22 23:50:26
阅读次数:
94
static boolean isPrime(int n) { if(n<=1) { return false; } if(n==2||n==3) { return true; } if(n%6!=1&&n%6!=5) { return false; } for(int i=2;i<=(int)Ma ...
分类:
编程语言 时间:
2020-01-22 20:03:36
阅读次数:
77
Reactor线程模型 Reactor是反应堆的意思,Reactor模式即Dispatcher模式,服务器程序处理传入的多路请求,将他们同步分派给各请求对应的处理线程。 Reactor有两个关键角色: Reactor Reactor在一个单独线程中运行,负责监听和分发事件,将请求事件分发给处理线程来 ...
分类:
编程语言 时间:
2020-01-22 16:15:08
阅读次数:
80
VideLoginForm案例 ~~~html Document Sing In Forget Password ~~~ ~~~css body { margin: 0; padding: 0; width: 100%; height: 100vh; / background: 000; / fon ...
分类:
其他好文 时间:
2020-01-21 23:32:35
阅读次数:
102
//input template#include<bits/stdc++.h> using namespace std; int solve() { int n,s; cin>>n>>s; vector<int> tri(n); for(int i=0;i<n;i++) { cin>>tri[i]; ...
分类:
其他好文 时间:
2020-01-21 21:34:27
阅读次数:
71
原文:https://webdesign.tutsplus.co...原作:Jase Smith翻译:Stypstive 当你的用户需要漂亮的图标给出额外的文字信息时,亦或是当他们在点击了按钮之后需要确认自己没点错时,又或是带图片和字幕的复活节彩蛋,提示框是用来增强用户界面的绝佳手段。现在,让我们来 ...
分类:
Web程序 时间:
2020-01-21 19:58:09
阅读次数:
108
1 import multiprocessing 2 import sys 3 4 5 def worker_with(lock, stream): # 6 with lock: 7 stream.write('Lock acquired via with\n') 8 9 10 def worker ...
分类:
其他好文 时间:
2020-01-21 16:14:21
阅读次数:
87