先看两个例子,比较不同: 例一(有回调函数) #include <iostream> using namespace std; void foo_one() { cout<<"foo_one"<<endl; } void foo_two() { cout<<"foo_two"<<endl; } ty ...
分类:
其他好文 时间:
2020-11-11 16:29:50
阅读次数:
8
这次写的是小游戏扫雷,由于时间问题,扫雷的成功失败判断还没有写的很好,只是把大体的思路写出来了。 这次最主要的是有两个类 第一个是地雷类 :lanmine 1 using System; 2 using System.Collections.Generic; 3 using System.Drawi ...
###P2915 [USACO08NOV]Mixed Up Cows G dfs去做 #include<iostream> #include<cstdio> #include<cmath> #include<cstring> #define ll long long using namespace ...
分类:
其他好文 时间:
2020-11-11 15:59:42
阅读次数:
7
题目 给你$n$个非负整数$a_1,a_2,...,a_n$每个数代表坐标中的一个点$(i, a_i)$。在坐标内画$n$条垂直线,垂直线$i$的两个端点分别为$(i, a_i)\(和\)(i, 0)$。找出其中的两条线,使得它们与$x$轴共同构成的容器可以容纳最多的水。 说明:你不能倾斜容器。 示 ...
分类:
其他好文 时间:
2020-11-10 11:14:35
阅读次数:
8
1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 5 const int N=1010; 6 7 int dp[N][N]; 8 int w[N],v[N]; 9 int n,m; 10 11 int main() ...
分类:
其他好文 时间:
2020-11-10 10:43:32
阅读次数:
7
#include<iostream> #include<cstring> #include<cmath> using namespace std; char map[8][8]; int n, m, t; int dir[4][2]={{1,0},{-1,0},{0,1},{0,-1}}; bool ...
分类:
其他好文 时间:
2020-11-08 17:14:10
阅读次数:
17
#include<iostream> #include<memory.h> #include<cmath> #include<algorithm> using namespace std; typedef struct { int x, y; }node; node d[6000]; int r, ...
分类:
其他好文 时间:
2020-11-08 17:11:46
阅读次数:
15
#include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #define MAXN 100000 using namespace std; int pri[MAXN];///质数数列 bool vis[MAXN ...
分类:
其他好文 时间:
2020-11-08 17:07:41
阅读次数:
13
#include #include <string.h> #define size 10 using namespace std; //含有一个二元算数式的三个值 typedef struct{ float x = 0,y = 0; //x,y为给定的随机数 float r = 0; //r为算数式 ...
分类:
其他好文 时间:
2020-11-08 17:05:55
阅读次数:
19
题目如下: 思路: 1.如果直接for循环肯定无法满分 2.先算出行的所有格子 再加上列的所有格子(注意列的格子不是全部加上,加上除了行没有覆盖的那个别的格子) 代码如下: #include<cstdio> #include<iostream> #include<cstring> using nam ...
分类:
其他好文 时间:
2020-11-07 16:54:41
阅读次数:
22