会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ljlin
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
下一页
2013年11月11日
Codeforces Round #211 (Div. 2)
摘要: ASoroban 打表题 Code#include #include using namespace std;const string A[10]={"O-|-OOOO","O-|O-OOO","O-|OO-OO", "O-|OOO-O","O-|OOOO-","-O|-OOOO", "-O|O-OOO","-O|OO-...
阅读全文
posted @ 2013-11-11 18:08 ljlin
阅读(239)
评论(0)
推荐(0)
2013年10月24日
poj 1716 1201 差分约束 SPFA
摘要: poj 1716 Integer Intervals 因为没提无解,就当是保证有解吧。为了方便,先把点的标号都加一。约束条件有三个。 (1)题目对区间的要求用前缀和表示 S[b+1]-s[a]>=2 (2)前缀和本身隐含一个约束条件 S[i]-S[i-1]>=0 (3)一个数字只取一次 S[i]-S[i-1]#include #include #include #include usin...
阅读全文
posted @ 2013-10-24 16:45 ljlin
阅读(235)
评论(0)
推荐(0)
2013年10月20日
poj 2942 Knights of the Round Table Tarjan求点双联通分量+黑白染色二分图判断
摘要: 灰书例题,用染色判断二分图在点双联通分量找奇圈。 写错了几次,返祖边不能入栈。====== 题目建模利用补图,因为是圆桌,所以人在奇环上。 其实返祖边可以入栈,我自己没判(DFN[i]DFN[u]>Low[u])。 想想应该还是把那个判断(DFN[i]#include #include #inc...
阅读全文
posted @ 2013-10-20 17:03 ljlin
阅读(320)
评论(0)
推荐(0)
2013年10月7日
记新生赛(2013多校第二场题解)
摘要: A B warm up 无向图有重边求桥树上DFS遍历找最长路模板。。。 Code#pragma comment(linker,"/STACK:102400000,102400000")#include #include #include #include #define PII make_pair#define edge vector >#define fill(x,y) memset(x,...
阅读全文
posted @ 2013-10-07 01:50 ljlin
阅读(183)
评论(0)
推荐(0)
2013年9月28日
POJ 2186 Popular Cows
摘要: http://poj.org/problem?id=2186 留个缩点模板 Code#include #include #include #include using namespace std;const int maxn=10000+10;int Index=0,cnt=0,N,M,DFN[maxn],Low[maxn],belong[maxn],d[maxn];bool InS[maxn];...
阅读全文
posted @ 2013-09-28 22:03 ljlin
阅读(171)
评论(0)
推荐(0)
2013年8月16日
多校7
摘要: Hyperspace 这个题目把绝对值拆开很巧妙,正确性由不等式 ±x±y#include #include #include #define PII make_pairusing namespace std;const int N=60000;int q,k,A[N+10][10];bool del[N+10];int main(){ while(scanf("%d%d",&q,&k)...
阅读全文
posted @ 2013-08-16 00:03 ljlin
阅读(177)
评论(0)
推荐(0)
2013年8月11日
2013 Multi-University Training Contest 6
摘要: 1008 MU Puzzle 一定要注意特判不可能地比较离谱的例子,WA了几次。2^k-t*6=x。如果T和K太大,我的算法会爆longlong,所以直接取模看因子比较好。@nevermore Code 327620244#include#include#define ll long longusing namespace std;char str[1000000+100];int n;int...
阅读全文
posted @ 2013-08-11 23:13 ljlin
阅读(208)
评论(0)
推荐(0)
2013 ACM/ICPC 杭州邀请赛重现
摘要: 1001 Robot 裸题,常数优化。double比较慢,除法比乘法慢,乘法比加法慢。 Code#include #include #include using namespace std;double f[2][200+10];int main(){ int n,m,l,r,w; while(scanf("%d%d%d%d",&n,&m,&l,&r)!=EOF){ i...
阅读全文
posted @ 2013-08-11 23:08 ljlin
阅读(216)
评论(0)
推荐(0)
2013年8月7日
2013 Multi-University Training Contest 5
摘要: 1005 Another Graph Game Code#include #include #include using namespace std;const int N=100000+100;int n,m,u,v;double d[N],w,ans;int main(){ while(scanf("%d%d",&n,&m)!=EOF){ for(int i=1;i=1;i-...
阅读全文
posted @ 2013-08-07 23:40 ljlin
阅读(247)
评论(0)
推荐(0)
2013年7月9日
Codeforces #191(Div.2)解题报告
摘要: http://codeforces.com/contest/327 第一次正儿八经写cpp程序啊,没想到写着写着还得查书,看看哪个地方有没有分号啥的,写三目表达式把问号和冒号写反了也查了很长时间。唉,本来以为随便看看书就能转来着。结果第一次写就在比赛写,结果就是我只出了A题,耻辱啊。还有就是半年不碰OI,感觉实现能力还可以,但是调试就完全不行了啊。还有就是一些思路都跟不上了。 A. Flipp...
阅读全文
posted @ 2013-07-09 19:54 ljlin
阅读(352)
评论(4)
推荐(0)
上一页
1
2
3
4
5
6
7
8
下一页
公告