摘要: # # Monitor for file status # clear test_count=0 change_count=0 echo -n "Input file name:" read FILENAME if [ -f "$FILENAME" ]; then FILESIZE=`ls -l $ 阅读全文
posted @ 2023-05-24 20:11 南柯一场 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> #include <semaphore.h> #define PRODUCER_NUM 3 //3个生产者 #define CONSUMER 阅读全文
posted @ 2023-05-10 20:33 南柯一场 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 今日11.23 归来,重新打比赛 阅读全文
posted @ 2021-11-23 20:55 南柯一场 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 1.饭后,姐姐洗碗,妹妹把姐姐洗过的碗一个一个地放进碗橱摞成一摞。一共有n个不同的碗,洗前也是摞成一摞的,也许因为小妹贪玩而使碗拿进碗橱不及时,姐姐则把洗过的碗摞在旁边,问:小妹摞起的碗有多少种可能的方式? 2.给定n个数,有多少种出栈序列? 3.一个有n个1和n个-1组成的字串,且前k个数的和均不 阅读全文
posted @ 2019-05-11 21:40 南柯一场 阅读(792) 评论(0) 推荐(1) 编辑
摘要: 装备购买 题目 脸哥最近在玩一款神奇的游戏,这个游戏里有 n 件装备,每件装备有 m 个属性,用向量zi(aj ,.....,am) 表示 (1 define ri register int define double long double define eps 1e 4 using namesp 阅读全文
posted @ 2019-05-04 10:26 南柯一场 阅读(197) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #define de system("pause"); using namespace std; int r,c; char s[600][600]; int aim[5]; int ans=1000000; bool bz[600][600][5]; bool check(int way,int x,in... 阅读全文
posted @ 2019-03-12 19:10 南柯一场 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目传送门 首先说明我这个代码和lyd的有点不同:可能更加复杂 既然要求以箱子步数为第一关键字,人的步数为第二关键字,那么我们可以想先找到箱子的最短路径。但单单找到箱子的最短路肯定不行啊,因为有时候不能被推动,怎样确定一条既满足最短又满足可行的箱子路径呢,其实这就是一种有限制的BFS。 对于箱子: 阅读全文
posted @ 2019-03-12 17:28 南柯一场 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 可读入int型,long long型。 阅读全文
posted @ 2019-01-29 14:56 南柯一场 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 去年暑假就在ybt上学习了一笔画问题,但理解不够,代码也不熟悉。 在cdqz集训,再做了欧拉路径的题。 先熟悉定理: 定理一 连通的无向图有欧拉路径的充要条件是: G中奇顶点(连接的边数量为奇数的顶点)的数目等于0或者2。 连通的无向图是欧拉环(存在欧拉回路)的充要条件是: G中每个顶点的度都是偶数 阅读全文
posted @ 2019-01-22 21:38 南柯一场 阅读(1487) 评论(0) 推荐(0) 编辑
摘要: 题目描述 A and B are preparing themselves for programming contests. The University where A and B study is a set of rooms connected by corridors. Overall, 阅读全文
posted @ 2019-01-05 21:20 南柯一场 阅读(323) 评论(0) 推荐(0) 编辑
摘要: inline __int128 read() { int X=0,w=0; char ch=0; while(!isdigit(ch)) {w|=ch=='-';ch=getchar();} while(isdigit(ch)) X=(X9) print(x/10); putchar(x%10+'0'); } 阅读全文
posted @ 2018-12-31 14:48 南柯一场 阅读(1706) 评论(0) 推荐(0) 编辑
摘要: 传送门 题目描述就不用看了,直接上样例就行: 输入样例#1: 2 输出样例#1: /\ /__\ /\ /\ /__\/__\ 输入样例#2: 3 输出样例#2: /\ /__\ /\ /\ /__\/__\ /\ /\ /__\ /__\ /\ /\ /\ /\ /__\/__\/__\/__\ 阅读全文
posted @ 2018-12-27 21:13 南柯一场 阅读(498) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2893 来自逆序对的强大力量 阅读全文
posted @ 2018-12-25 17:27 南柯一场 阅读(257) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int n,k,a[10000]; int qsort(int l,int r,int k) { int key=a[r]; int i=l,j=r; while(i!=j) { while(i=key)j--; if(ii-l+1&&i+1>n>>k; ... 阅读全文
posted @ 2018-12-23 12:26 南柯一场 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Running Median Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3406 Accepted: 1576 Description For this problem, you will write a program t 阅读全文
posted @ 2018-12-23 12:03 南柯一场 阅读(488) 评论(0) 推荐(0) 编辑