水题,水水更健康。
#include
using namespace std;
int a[101][101];
void Show(int x)
{
int i,j,m,n;
memset(a,0,sizeof(a));
i=1;
m=1;
j=2;
n=x;
while(i<=n) a[1][i++]=m++;
while(j<=n) a[j++][n]=m++;
...
分类:
其他好文 时间:
2015-04-26 22:50:50
阅读次数:
157
分析:水题,但要注意当c取2*b时,a可能被c整除,此时a继续加b继续判断。
#include
using namespace std;
int gcd(int a,int b)
{
int r;
while(b)
{
r=a%b;
a=b;
b=r;
}
return a;
}
int get(int a,int b)
{
int c;
c=2*b;
wh...
分类:
其他好文 时间:
2015-04-26 22:47:52
阅读次数:
147
1 #include "lua.hpp" 2 3 #include 4 using namespace std; 5 6 #pragma comment(lib, "lua5.1.lib") 7 8 struct lua_guard{ 9 lua_State *pL;10 ...
分类:
其他好文 时间:
2015-04-26 22:41:58
阅读次数:
178
一、RegularExpressionusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions;using System...
缩放在目前代码只有3D的,2D自己想想(╯▽╰)吧 投影矩阵公式: 3D using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Task...
分类:
其他好文 时间:
2015-04-26 22:33:44
阅读次数:
177
HTML代码:全选" /> 将选中的书籍归类于: 后台代码:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using S...
分类:
Web程序 时间:
2015-04-26 20:57:29
阅读次数:
196
Description
Input
Output
Sample Input
4 4
1 2 3 4
Sample Output
4
HINT
Source
NCPC 2014
#include
#include
#include
using namespace...
分类:
编程语言 时间:
2015-04-26 19:48:33
阅读次数:
273
1. 矩阵和矩阵相乘 2. 矩阵和向量相乘 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; namespace Co...
分类:
其他好文 时间:
2015-04-26 19:44:08
阅读次数:
202
A.B.C.题意:给出(i, j)之类的约束表示要j必须先i,问1尽量靠前、2尽量靠前、3尽量靠前以此类推的最优方案,或输出无解。#include using namespace std;const int N=100005;int cnt, ihead[N], in[N], ans[N], tot...
分类:
其他好文 时间:
2015-04-26 19:41:56
阅读次数:
124
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 using System.Management; 7 using System.Dia...
分类:
其他好文 时间:
2015-04-26 19:34:30
阅读次数:
124