摘要:
#include <cstdio>#include <iostream>using namespace std;int ans;void dfs(int n) { for (int i=1; i<=n/2; ++i) { ++ans; dfs(i); }}int main() { int n; while (scanf("%d", &n) != EOF) { ans = 1; dfs(n); printf ("%d\n", ans); } return 0;}
阅读全文
摘要:
#include <cstdio>#include <cstring>#include <iostream>using namespace std;const int N = 1005;char map[N][N], vis[N][N];struct node { int x; int y; int c;}Q[N*N], s, e;int front, rear;int dir[4][2] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};int BFS(int n) { node first, next; front = rear
阅读全文
摘要:
#include <cmath>#include <cstdio>#include <iostream>using namespace std;double dis(double x1, double y1, double x2, double y2) { return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));}int main() { double x1, y1, r1, x2, y2, r2; while (scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1,
阅读全文