The first solution I figured out is O(n^3). I thought it must be O(n^2) to get max points on a line for a given point.. but after checking several art...
分类:
其他好文 时间:
2014-07-22 22:47:15
阅读次数:
226
#includemain(){int n,i,sum;int x[10];while(scanf("%d %d %d %d %d %d",&x[1],&x[2],&x[3],&x[4],&x[5],&x[6])!=EOF){if(x[1]==0&&x[2]==0&&x[3]==0&&x[4]==0&...
分类:
其他好文 时间:
2014-07-22 22:46:14
阅读次数:
210
#include #include #include using namespace std;#define N 505int ma[N][N],ans[N],indegree[N];int main(){ int i,j,n,m; while(~scanf("%d %d",&n,&m)...
分类:
其他好文 时间:
2014-07-22 22:44:55
阅读次数:
170
#include #include #include using namespace std;#define N 505int ma[N][N],ans[N],indegree[N];int main(){ int i,j,n,m; while(~scanf("%d %d",&n,&m)...
分类:
其他好文 时间:
2014-07-22 22:44:52
阅读次数:
141
转圈游戏 题解:快速幂 1 #include 2 3 int n, m, k, x; 4 5 inline long long QuickPow(int a, int k, int MOD){ 6 long long base = a, ret = 1; 7 while (k...
分类:
其他好文 时间:
2014-07-22 22:44:34
阅读次数:
284
usingSystem;publicclassMainEntry{ publicstaticvoidMain() {int[]arrayint=newint[100]; Randomrandom=newRandom(1); for(inti=1;i<=100;i++...
分类:
其他好文 时间:
2014-07-22 22:44:15
阅读次数:
209
界面构成1、菜单栏2、工具箱3、工具属性栏4、悬浮面板5、画布ctrl+n 新建对话框 (新建画布)打开对话框:ctrl + O (Open)画布三种显示方式切换:F隐藏工具箱,工具属性栏,悬浮面板:TAB缩放工具:Z alt(缩小)切换到暂时切换到满画面显示 ctrl + 0 (数字)按住空格:暂...
分类:
其他好文 时间:
2014-07-22 22:44:13
阅读次数:
307
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:
其他好文 时间:
2014-07-22 22:43:14
阅读次数:
198
解: 中文 原版 麻蛋的垃圾中文翻译,艹 先证明提示中的: Fib(0)成立,Fib(1)成立,Fib(2)成立,假设Fib(n)成立,则(那两个拉丁字母用x y分别代替): x=(1+sqrt(5))/2, y=(1-sqrt(5))/2 Fib(n+1)=Fib(n)+Fib(n...
分类:
其他好文 时间:
2014-07-22 00:13:33
阅读次数:
195
#include
#include
int fun (int high)
{
int sum=0,n=0,j,yes;
while((high>=2)&&(n<10))
{
yes=1;
for(j=2;j<=high/2;j++)
if(high%j==0)
{
yes=0;break;
}
if(yes)
{
sum+=high;
...
分类:
其他好文 时间:
2014-07-22 00:11:34
阅读次数:
226