康復訓練1

2021-07-23 06:00:50 字數 4784 閱讀 1217

退役zz沉迷紫書不能自拔

ac自動機不會了

lct敲不出了 哦splay也是

真是mdzz 三年的東西只有競賽是真正還給了老師

讓我覺得自己智商下線的幾個點:

很多讀入遇 \n 結束,及時用getchar搞掉

以及uva202,迴圈節出現取決於除式中餘數的重複位置

以及uva1588,兩根條的相對位置大體是三種情況,一開始只考慮兩種,sb的不行

以及uva11809,m和e都能搞反……

因為m,e較小,直接預處理後針對詢問查詢即可

uva1585

#include #include const int maxn = 100;

int n, ans;

char s[maxn];

int main()

else o = 0;

printf("%d\n", ans);

}return 0;

}

uva1586

#include #include #include const int maxn = 105;

const double c = 12.01;

const double h = 1.008;

const double o = 16.00;

const double n = 14.01;

int t, n;

char s[maxn];

int calc(int &i)

//printf("%d atons\n", res);

return res;

}int main()

}printf("%.3lf\n", ans);

}return 0;

}

uva1225

#include const int maxn = 10010;

int t, n, ans[maxn][10];

int main()

}scanf("%d", &t);

while (t --)

return 0;

}

uva455

#include #include const int maxn = 100;

int t, n;

char s[maxn];

bool check(int k)

}return true;

}int main()

if (flag)

out = true;

}return 0;

}

uva227

#include #include #include #include #include using namespace std;

const int maxn = 10;

const int dx[4] = ;

const int dy[4] = ;

int r, c, kase;

char a[maxn][maxn], s[1010];

int trans[256];

bool work(int opt)

int main()

/*puts("********************");

printf("r = %d, c = %d, a = %c\n", r, c, a[r][c]);

for (int i = 1; i <= 5; ++ i) printf("%s\n", a[i] + 1);

puts("********************");

*///exit(0);

char ch;

bool ok = true;

while (cin >> ch && ch != '0')

//puts("\nopt end 2");

getchar();

//exit(0);

if (kase) puts("");

printf("puzzle #%d:\n", ++ kase);

if (! ok) puts("this puzzle has no final configuration.");

else

}//exit(0);

}return 0;

}

uva232

#include #include using namespace std;

#define st first

#define nd second

typedef pairpii;

const int maxn = 15;

int r, c;

char a[maxn][maxn];

pii pos[110];

void print1(int x, int y)

puts("");

}void print2(int x, int y)

puts("");

}int main()

*/int n = 0;

for (int i = 1; i <= r; ++ i)

for (int j = 1; j <= c; ++ j)

printf("puzzle #%d:\n", ++ kase);

//across

puts("across");

for (int i = 1; i <= n; ++ i)

//down

puts("down");

for (int i = 1; i <= n; ++ i)

}return 0;

}

uva1368

#include #include #include using namespace std;

const int maxn = 1010;

const int maxm = 55;

int t, n, m, cnt[256];

char s[maxm][maxn];

int main()

printf("\n%d\n", ans);

}return 0;

}

uva202

#include #include int ans[1010], check[30010];

void work(int a, int b)

printf("%d/%d = %d.", a, b, ans[1]);

for (int i = 2; i <= tmp; ++ i) printf("%d", ans[i]);

printf("(");

for (int i = tmp + 1; i <= cnt; ++ i)

}printf(")\n");

//length

printf(" %d = number of digits in repeating cycle\n\n", cnt - tmp);

return;

}int main()

uva10340

#include #include const int maxn = 100010;

char s[maxn], t[maxn];

int main()

}printf("%s\n", flag ? "yes" : "no");

}return 0;

}

uva1587

#include #include #include using namespace std;

#define w first

#define h second

typedef pairpii;

pii r[10];

bool cmp(pii a, pii b)

void work(pii &rect)

int main()

return 0;

}

uva1588

#include #include #include using namespace std;

const int maxn = 110;

int n1, n2;

int a[maxn], b[maxn];

char s1[maxn], s2[maxn];

bool check1(int st)

bool check2(int st)

int calc1(int st)

int calc2(int st)

int main()

return 0;

}

uva11809

#include #include #include #include #include using namespace std;

double a[15][35];

int b[15][35];

char s[100];

int main()

while (scanf("%s", s + 1) == 1)

if (ok) break;}}

return 0;

}

康復訓練 51nod 1463 找朋友

給定 兩個長度為n的數列a b 乙個有m個元素的集合k 詢問q次 每次詢問 l,r 輸出區間內滿足 bi bj k 的最大ai aj 資料約定 n,q 100000 m 10 0 a i 1000000000 1 b i n 1 k i n 保證b i 互不相等 input n q m a1 a2 ...

上古退役選手康復訓練1 CSP2020J 2

你沒看錯,乙個前noi ag選手來做普及組了,馬上打icpc了我也準備練習一些。連pj都不會了,得分 100 100 30 100 330,甚至比初三還菜,nowcoder資料,思路也應該是這個分。寫一發題解吧 t3就寫30分的 t1奇數直接輸出 1,偶數按二進位制位拆分 includeusing ...

演算法訓練1

dfs 遞迴 迭代 搜尋 這次我這次訓練主要得到的。這裡記錄一下,主要訓練的題目有 restore ip addresses palindrome partitioning letter combinations of a phone number combination sum permutati...