摘要: ```c++ #include #include #include #include #include #include #include #include #include using namespace std; struct node { int matrix[3][3]; int step, x, y; int last[2]; }; int ans; int d_x[4] = {-1, 阅读全文
posted @ 2020-03-04 23:07 ailinal 阅读(283) 评论(0) 推荐(0)
摘要: ```c++#include #include #include #include #include #include #include #include #include using namespace std;struct node { int x, y, step;};int d_x[9] = {-1, -1, 0, 1, 1, 1, 0, -1, 0};int d_y[9] = {0... 阅读全文
posted @ 2020-03-04 18:46 ailinal 阅读(151) 评论(0) 推荐(0)
摘要: ```c++ #include #include #include #include #include using namespace std; int get_priority(char &op) { if (op == '+' || op == '-') return 1; if (op == '*' || op == '/') return 2; } double cul(double &a 阅读全文
posted @ 2020-03-02 21:13 ailinal 阅读(236) 评论(0) 推荐(0)
摘要: ```c++ #include #include #include #include using namespace std; void convert(int in[], int len, int out[],int &ks, int m, int n) { for (int i = 0; i =0 ; --j) { printf("%d",out[j]); } printf("\n"); } 阅读全文
posted @ 2020-02-29 23:44 ailinal 阅读(114) 评论(0) 推荐(0)
摘要: ```c++ #include #include #include using namespace std; int main() { int m, n; while (scanf("%d", &m) != EOF) { scanf("%d", &n); char s[1000]; scanf("%s", s); int ns = strlen(s); int a[1000]; for (int 阅读全文
posted @ 2020-02-29 23:22 ailinal 阅读(153) 评论(0) 推荐(0)
摘要: ```c++ #include #include #include using namespace std; struct big_number { int d[10010], len; big_number() { memset(d, 0, sizeof(d)); len = 0; } }; big_number change(char s[]) { big_number ans; int le 阅读全文
posted @ 2020-02-29 22:29 ailinal 阅读(176) 评论(0) 推荐(0)
摘要: ```c++ #include #include using namespace std; struct big_number { int d[1001], len; big_number() { memset(d, 0, sizeof(d)); len = 0; } }; big_number change(char s[]) { big_number ans; int len = strlen 阅读全文
posted @ 2020-02-28 16:28 ailinal 阅读(127) 评论(0) 推荐(0)
摘要: ```c++ #include #include #include #include using namespace std; const int MAX_LEN = 100000; struct factor { int x, count; }factors[10]; int primes[MAX_LEN]; int pN=0; bool is_prime(int a){ if(a==1) re 阅读全文
posted @ 2020-02-27 17:03 ailinal 阅读(80) 评论(0) 推荐(0)
摘要: ```c++#include #include #include using namespace std;void merge(int a[], int l1, int r1, int l2, int r2) { int i = l1, j = l2; int n = r2 - l1 +1; int temp[n]; int index = 0; while (i <... 阅读全文
posted @ 2020-02-22 20:01 ailinal 阅读(121) 评论(0) 推荐(0)
摘要: ```c++ #include #include #include using namespace std; bool b_search(const vector &a, int x) { int left = 0, right = a.size() - 1; while (left a; for (int i = 0; i < n; ++i) { int temp; scanf("%d", &t 阅读全文
posted @ 2020-02-22 16:20 ailinal 阅读(85) 评论(0) 推荐(0)