会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ACLJW
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
18
下一页
2018年5月19日
514:Rails
摘要: Rails 我的思路:火车站可看做stack,对于每节车厢,有两种选择,入栈或直接前进。那么要判断顺序是否合法,只需要这样:设置一个指向判断序列的指针,对于1-n的每个数字,如果该数字小于指针指向的数字,那么push。如果相等,依次判断指针后面的数字是否比该数字小,如...
阅读全文
posted @ 2018-05-19 23:41 ACLJW
阅读(125)
评论(0)
推荐(0)
2018年5月3日
210:Concurrency Simulator
摘要: Concurrency Simulator没看清楚题意考虑复杂了。。我以为是如果剩下的时间不够一条指令执行完的话这段时间还是算的,搞的还挺麻烦的,比如这条指令需要10秒,剩下5秒,那么下次执行的时候只需5秒就行了。其实不是的,题目中说:Any instruction ...
阅读全文
posted @ 2018-05-03 14:00 ACLJW
阅读(172)
评论(0)
推荐(0)
2018年4月30日
822:Queue and A
摘要: Queue and A#includeusing namespace std;const int maxn = 1000 + 5;struct topic{ int n,st,t,b,w = 0;}t;struct person{ int w = 0,st...
阅读全文
posted @ 2018-04-30 23:50 ACLJW
阅读(154)
评论(0)
推荐(0)
2018年4月29日
511:Do You Know the Way to San Jose?
摘要: Do You Know the Way to San Jose?题目不难,主要就是排序,不过有些细节需要注意。一个很坑的地方是 map 的两个对角点是不确定的,可能是左上和右下,也可能是左下和右上,而且两个点的顺序也不一定是左右。。。害我找了好久的bug。。。还有就是...
阅读全文
posted @ 2018-04-29 23:44 ACLJW
阅读(179)
评论(0)
推荐(0)
2018年4月28日
1597:Searching the Web
摘要: Searching the Web这道题就 "and" 查询麻烦点,别的还好,但是刚开始超时了。。。version 1(Time limit exceeded):#includeusing namespace std;const int maxn = 100 + 5;...
阅读全文
posted @ 2018-04-28 21:42 ACLJW
阅读(225)
评论(0)
推荐(0)
2018年4月25日
1596:Bug Hunt
摘要: Bug Hunt我的思路:对于每行code,若无等号,直接初始化数组即可,否则依次检查等号左边和右边的表达式是否正确。对于左边的表达式,只需检查到首个数组之前即可,因为可能要对其初始化;对于右边表达式则要全部检查。对于复合表达式要如何检查呢?我的做法是先找出数字下标,...
阅读全文
posted @ 2018-04-25 12:24 ACLJW
阅读(277)
评论(0)
推荐(0)
2018年4月23日
230:Borrowers
摘要: Borrowers又因为输出WA了一发。。。一定要看清楚输出要求啊啊#include#include#include#include#include#includeusing namespace std;const int maxn = 10000;typedef p...
阅读全文
posted @ 2018-04-23 10:48 ACLJW
阅读(183)
评论(0)
推荐(0)
2018年4月22日
10391:Compound Words
摘要: Compound Words我的思路:对于每个单词,依次枚举其所有可能组合的情况,看其两个子单词是否存在于dict中。version 1(30ms):#include#include#include#includeusing namespace std;int mai...
阅读全文
posted @ 2018-04-22 21:18 ACLJW
阅读(206)
评论(0)
推荐(0)
12504:Updating a Dictionary
摘要: Updating a Dictionaryversion 1:#include#include#include#include#includeusing namespace std;const int maxl = 100 + 5;int t,n;char c;voi...
阅读全文
posted @ 2018-04-22 16:56 ACLJW
阅读(204)
评论(0)
推荐(0)
12100:Printer Queue
摘要: Printer Queuepriority_queue + queue#include#includeusing namespace std;const int maxn = 500000;int t,n,pos;int main(){ scanf("%d",&...
阅读全文
posted @ 2018-04-22 16:52 ACLJW
阅读(168)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
18
下一页
公告