摘要: A 石油采集:https://www.nowcoder.com/acm/contest/76/A #include <bits/stdc++.h> using namespace std; char a[55][55]; int ans1,ans2,ans,n; void DFS(int x,int 阅读全文
posted @ 2018-03-16 21:16 _Jessie 阅读(124) 评论(0) 推荐(0) 编辑
摘要: A 不凡的夫夫:https://www.nowcoder.com/acm/contest/75#question #include <bits/stdc++.h> #define PI 3.1415926535 using namespace std; int main() { int t; sca 阅读全文
posted @ 2018-03-16 20:57 _Jessie 阅读(140) 评论(0) 推荐(0) 编辑
摘要: A 吐泡泡:https://www.nowcoder.com/acm/contest/74/A #include <bits/stdc++.h> using namespace std; int main() { char ch[105]; while(gets(ch)) { int lch=str 阅读全文
posted @ 2018-03-16 20:35 _Jessie 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 输入w h,接下来输入h行w列的图 ' . ':干净的点; ' * ' :垃圾; ' x ' : 墙; ' o ' : 初始位置; 输出 清理掉所有垃圾的最短路径长度 无则输出-1 Sample Input 7 5........o...*.........*...*........15 阅读全文
posted @ 2018-03-16 19:57 _Jessie 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 输入n k,1-n的排列,k次操作 操作P:输入一个m 输出第m个排列 操作Q:输入一个排列 输出它是第几个排列 Sample Input 5 2P3Q1 2 5 3 4 5 2P3Q1 2 5 3 4 Sample Output 1 2 4 3 55 1 2 4 3 55 康拓展开裸题 阅读全文
posted @ 2018-03-16 19:20 _Jessie 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 输入n 接下来n行字母 在队头和队尾中选出较小的放入新的队列 Sample Input 6ACDBCB 6ACDBCB Sample Output ABCBCD ABCBCD 注意相同的情况 先判断内层的大小 输出小的一边 如 BCADCB -> CADCB -> CADC -> ADC 阅读全文
posted @ 2018-03-16 19:12 _Jessie 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 输入n 接下来n行描述n头牛的编号num和品种id 得到包含所有id的最短段 输出最短段的编号差 Sample Input 625 726 115 122 320 130 1 625 726 115 122 320 130 1 Sample Output 4 4 Hint INPUT D 阅读全文
posted @ 2018-03-16 17:15 _Jessie 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 输入n k,n头牛 k个品种 接下来n行描述每头牛的品种 输出无法找出的最短子序列的长度 Sample Input 14 515325134425123 14 515325134425123 Sample Output 3 3 Hint All the single digit 'seq 阅读全文
posted @ 2018-03-16 16:32 _Jessie 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 题目大意: 输入n,n次操作 操作A:在L(左边)或R(右边)插入一个递增的数 操作D:在L(左边)或R(右边)删除m个数 Sample Input 10A LA LA RA LD R 2A RA RD L 1A LA R 10A LA LA RA LD R 2A RA RD L 1A LA R S 阅读全文
posted @ 2018-03-16 16:15 _Jessie 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题目大意: Description Bessie is stranded on a deserted arctic island and wants to determine all the paths she might take to return to her pasture. She has 阅读全文
posted @ 2018-02-03 11:58 _Jessie 阅读(253) 评论(0) 推荐(0) 编辑