上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页
摘要: Othello我的这道题的代码还是比较简洁的哈哈。version 1:#include#includeusing namespace std;int n,wn,bn;int dxs[3] = {0,1,-1};int dys[3] = {0,1,-1};char c,... 阅读全文
posted @ 2018-04-13 13:30 ACLJW 阅读(179) 评论(0) 推荐(0) 编辑
摘要: IP Networks注意单个IP地址及网络地址后面加 .0 的情况(cnt #includeusing namespace std;const int maxn = 1000 + 5;int n,num[maxn][4];int main(){ while(s... 阅读全文
posted @ 2018-04-12 21:56 ACLJW 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 253:Cube painting开始的想法:骰子无论怎么转,每个数字和其对面的数字的对应关系永远不会改变,所以只需要比较两个骰子的三对数字是否相同即可,也的确AC了,但是后来想想不太对。#include#includeusing namespace std;char... 阅读全文
posted @ 2018-04-12 12:43 ACLJW 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 和 0 - 1 背包的区别是每种物品可以选任意多个。dp[i+1][j] = 从前 i 种物品中挑选总重量不超过 j 时总重量的最大值。递推关系为:dp[0][j] = 0dp[i+1][j] = max{ dp[i][j - k*w[i]] + k*v[i] | ... 阅读全文
posted @ 2018-04-11 23:25 ACLJW 阅读(97) 评论(0) 推荐(0) 编辑
摘要: UVa - 512 Spreadsheet Tracking思路1:首先模拟操作,算出最后的电子表格,然后在每次查询时直接在电子表格中找到所求的单元格。#include#includeusing namespace std;const int maxn = 100,b... 阅读全文
posted @ 2018-04-11 20:42 ACLJW 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Some message encoding schemes require that an encoded message be sent in two parts. The first part, called the header, contains the ch... 阅读全文
posted @ 2018-04-11 10:18 ACLJW 阅读(183) 评论(0) 推荐(0) 编辑
摘要: The Dole Queue Time limit: 3.000 secondsIn a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoc... 阅读全文
posted @ 2018-04-10 13:10 ACLJW 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 489 - Hangman JudgeTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show... 阅读全文
posted @ 2018-04-09 17:32 ACLJW 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Ancient CipherTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 36467 Accepted: 11879DescriptionAncient Roman empire had a str... 阅读全文
posted @ 2018-04-09 10:50 ACLJW 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Cash MachineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 38756 Accepted: 14102DescriptionA Bank plans to install a machin... 阅读全文
posted @ 2018-04-07 00:53 ACLJW 阅读(339) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页