提交 c2d99f87 编写于 作者: ToTensor's avatar ToTensor

update dir

上级 a3ee005c
...@@ -69,7 +69,7 @@ int main() ...@@ -69,7 +69,7 @@ int main()
} }
else else
{ {
__________________ __________________;
} }
} }
cout << re; cout << re;
......
...@@ -45,7 +45,7 @@ int main(int argc, char **argv) ...@@ -45,7 +45,7 @@ int main(int argc, char **argv)
int len = str.length(); int len = str.length();
for (int i = 0; i < len; i++) for (int i = 0; i < len; i++)
{ {
__________________ __________________;
} }
cout << A << endl; cout << A << endl;
cout << a << endl; cout << a << endl;
......
...@@ -57,7 +57,7 @@ int main() ...@@ -57,7 +57,7 @@ int main()
{ {
while (s1[i] != '1') while (s1[i] != '1')
{ {
__________________ __________________;
s1[i] = s1[i] - 1; s1[i] = s1[i] - 1;
} }
} }
......
...@@ -23,7 +23,7 @@ int main() ...@@ -23,7 +23,7 @@ int main()
cin >> str; cin >> str;
for (int i = 0; i < str.size(); i++) for (int i = 0; i < str.size(); i++)
for (int j = i; j < str.size(); j++) for (int j = i; j < str.size(); j++)
__________________ __________________;
cout << s.size(); cout << s.size();
return 0; return 0;
} }
......
...@@ -32,7 +32,7 @@ int f(const char *s1, const char *s2) ...@@ -32,7 +32,7 @@ int f(const char *s1, const char *s2)
{ {
if (s1[i - 1] == s2[j - 1]) if (s1[i - 1] == s2[j - 1])
{ {
__________________ __________________;
if (a[i][j] > max) if (a[i][j] > max)
max = a[i][j]; max = a[i][j];
} }
......
...@@ -42,7 +42,7 @@ void f(int a[], int k, int m, char b[]) ...@@ -42,7 +42,7 @@ void f(int a[], int k, int m, char b[])
{ {
for (j = 0; j < i; j++) for (j = 0; j < i; j++)
b[M - m + j] = k + 'A'; b[M - m + j] = k + 'A';
__________________ __________________;
} }
} }
int main() int main()
......
...@@ -80,7 +80,7 @@ void f(char a[][N], int rank, int row, int col) ...@@ -80,7 +80,7 @@ void f(char a[][N], int rank, int row, int col)
int i; int i;
for (i = 0; i < rank - 1; i++) for (i = 0; i < rank - 1; i++)
w *= 2; w *= 2;
__________________ __________________;
f(a, rank - 1, row + w / 2, col); f(a, rank - 1, row + w / 2, col);
f(a, rank - 1, row + w / 2, col + w); f(a, rank - 1, row + w / 2, col + w);
} }
......
...@@ -46,7 +46,7 @@ int a[N]; ...@@ -46,7 +46,7 @@ int a[N];
int gcd(int a, int b) int gcd(int a, int b)
{ {
__________________ __________________;
} }
int main() int main()
......
...@@ -17,7 +17,7 @@ int f(int x, int k) ...@@ -17,7 +17,7 @@ int f(int x, int k)
{ {
if (len(x) - k == 0) if (len(x) - k == 0)
return x % 10; return x % 10;
__________________ __________________;
} }
int main() int main()
{ {
......
...@@ -53,7 +53,7 @@ struct EV evaluate(char *x) ...@@ -53,7 +53,7 @@ struct EV evaluate(char *x)
} }
v1 = evaluate(x + 1); v1 = evaluate(x + 1);
__________________ __________________;
if (x[0] == '+') if (x[0] == '+')
ev.result = v1.result + v2.result; ev.result = v1.result + v2.result;
......
...@@ -44,7 +44,7 @@ void pailie(string str, int k, int m) ...@@ -44,7 +44,7 @@ void pailie(string str, int k, int m)
for (i = k; i <= m; i++) for (i = k; i <= m; i++)
{ {
swap(&str[k], &str[i]); swap(&str[k], &str[i]);
__________________ __________________;
swap(&str[k], &str[i]); swap(&str[k], &str[i]);
} }
} }
......
...@@ -29,7 +29,7 @@ int f(int x, int y) ...@@ -29,7 +29,7 @@ int f(int x, int y)
{ {
if (x == 3 || y == 4) if (x == 3 || y == 4)
return 1; return 1;
__________________ __________________;
} }
int main() int main()
{ {
......
...@@ -115,7 +115,7 @@ int main() ...@@ -115,7 +115,7 @@ int main()
{ {
if (i * 2 + 1 <= n) if (i * 2 + 1 <= n)
{ {
__________________ __________________;
} }
} }
cout << dp[1] << endl; cout << dp[1] << endl;
......
...@@ -57,7 +57,7 @@ int main() ...@@ -57,7 +57,7 @@ int main()
else else
{ {
sum += y > 1 ? (long long)(4 * (2 + (abs(y) - 1) * (abs(y) - 2))) : 0; sum += y > 1 ? (long long)(4 * (2 + (abs(y) - 1) * (abs(y) - 2))) : 0;
__________________ __________________;
} }
cout << sum << endl; cout << sum << endl;
......
...@@ -110,7 +110,7 @@ void SolveNextDirection(Direction direction, int **arr, int nRow, int nCol, int ...@@ -110,7 +110,7 @@ void SolveNextDirection(Direction direction, int **arr, int nRow, int nCol, int
direction = (Direction)(direction - 1); direction = (Direction)(direction - 1);
arr[nRow][nCol] = 1; arr[nRow][nCol] = 1;
} }
__________________ __________________;
++n; ++n;
} }
......
...@@ -68,7 +68,7 @@ int main() ...@@ -68,7 +68,7 @@ int main()
else else
continue; continue;
} }
__________________ __________________;
p.second = s[i][0] * p.first + s[i][1]; p.second = s[i][0] * p.first + s[i][1];
points.insert(p); points.insert(p);
} }
......
...@@ -80,7 +80,7 @@ int main() ...@@ -80,7 +80,7 @@ int main()
for (ll j = 1; j <= i; j++) for (ll j = 1; j <= i; j++)
{ {
a[i + 1][j] += (0.5 * a[i][j]); a[i + 1][j] += (0.5 * a[i][j]);
__________________ __________________;
} }
} }
double minn = 1000000000, maxx = -1; double minn = 1000000000, maxx = -1;
......
...@@ -140,7 +140,7 @@ int main() ...@@ -140,7 +140,7 @@ int main()
for (int u = 0; u < 8; u++) for (int u = 0; u < 8; u++)
{ {
int x = i - d[u][0], y = j - d[u][1], z = k - d[u][2], t = d[u][3]; int x = i - d[u][0], y = j - d[u][1], z = k - d[u][2], t = d[u][3];
__________________ __________________;
} }
for (int i = 1; i <= m; i++) for (int i = 1; i <= m; i++)
......
...@@ -35,7 +35,7 @@ void dfs(int u, int s1, int s2) ...@@ -35,7 +35,7 @@ void dfs(int u, int s1, int s2)
} }
dfs(u + 1, s1 + num[u], s2); dfs(u + 1, s1 + num[u], s2);
__________________ __________________;
} }
int main() int main()
......
...@@ -42,7 +42,7 @@ int dfs(int idx) ...@@ -42,7 +42,7 @@ int dfs(int idx)
int max_, a = 0x3f3f3f, b = 0x3f3f3f3f, c = 0; int max_, a = 0x3f3f3f, b = 0x3f3f3f3f, c = 0;
if (idx >= 2) if (idx >= 2)
__________________ __________________;
b = v[idx] * numv[idx - 1] + dfs(idx - 1); b = v[idx] * numv[idx - 1] + dfs(idx - 1);
c = min(a, b); c = min(a, b);
return c; return c;
......
...@@ -89,7 +89,7 @@ void dfs(int x, int y, int step) ...@@ -89,7 +89,7 @@ void dfs(int x, int y, int step)
book[tx][ty] = 1; book[tx][ty] = 1;
road[step] = dir[i]; road[step] = dir[i];
minns[tx][ty] = step + 1; minns[tx][ty] = step + 1;
__________________ __________________;
book[tx][ty] = 0; book[tx][ty] = 0;
} }
} }
......
...@@ -108,7 +108,7 @@ void dfs2(int pre, int x, int aft, int rest, string &res) ...@@ -108,7 +108,7 @@ void dfs2(int pre, int x, int aft, int rest, string &res)
} }
res += string(len, 'a' + x - 1); res += string(len, 'a' + x - 1);
rest -= len * pre; rest -= len * pre;
__________________ __________________;
return; return;
} }
int calc(string a) int calc(string a)
......
...@@ -34,7 +34,7 @@ int dp(int k, int n) ...@@ -34,7 +34,7 @@ int dp(int k, int n)
return num[k][n]; return num[k][n];
for (int i = 1; i <= n; i++) for (int i = 1; i <= n; i++)
{ {
__________________ __________________;
} }
num[k][n] = res; num[k][n] = res;
return res; return res;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册