2016多校赛 Teacher Bo(曼哈顿距离)
来源:互联网 发布:苹果电脑怎么用淘宝 编辑:程序博客网 时间:2024/06/05 06:16
</div> <div align=center id=rollword><marqueescrollamount=2width=600scrolldelay=30onMouseOver="javascript:this.stop();"onMouseOut="javascript:this.start();"><bstyle="margin-right:20px"><aclass="hot"href="/viewnotify.php?cid=706&id=3">1009:answer mod 10^9+7,题目中已修改,已加粗。请各位选手注意。</a></b><ahref="/notification.php?cid=706">More...</a></marquee></div><divstyle="width:980px;padding:0;margin:0"><tr><tdalign=center><h1style='color:#1A5CC8;margin-top: 20px'>Teacher Bo</h1><fontface=Arial><b><spanstyle='font-size:12px;color:green'>Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)<br>Total Submission(s): 1532 Accepted Submission(s): 593<br></span></b></font><br><br><divclass=panel_titlealign=left>Problem Description</div><divclass=panel_content> Teacher BoBo is a geography teacher in the school.One day in his class,he marked $N$ points in the map,the $i$-th point is at $(X_i,Y_i)$.He wonders,whether there is a tetrad $(A,B,C,D)(A<B,C<D,A\neq C or B\neq D)$ such that the manhattan distance between A and B is equal to the manhattan distance between C and D.<br><br> If there exists such tetrad,print "YES",else print "NO".</div><divclass=panel_bottom> </div><br><divclass=panel_titlealign=left>Input</div><divclass=panel_content>First line, an integer $T$. There are $T$ test cases.$(T\leq 50)$<br><br> In each test case,the first line contains two intergers, N, M, means the number of points and the range of the coordinates.$(N,M\leq 10^5)$.<br><br> Next N lines, the $i$-th line shows the coordinate of the $i$-th point.$(X_i,Y_i)(0\leq X_i,Y_i\leq M)$.</div><divclass=panel_bottom> </div><br><divclass=panel_titlealign=left>Output</div><divclass=panel_content>$T$ lines, each line is "YES" or "NO".</div><divclass=panel_bottom> </div><br><divclass=panel_titlealign=left>Sample Input</div><divclass=panel_content><pre><divstyle="word-wrap:break-word;White-space:Pre-wrap;width:inherit;font-family:Courier New,Courier,monospace;white-space:pre;">2 3 10 1 1 2 2 3 3 4 10 8 8 2 3 3 3 4 4</div></pre></div><divclass=panel_bottom> </div><br><divclass=panel_titlealign=left>Sample Output</div><divclass=panel_content><pre><divstyle="word-wrap:break-word;White-space:Pre-wrap;width:inherit;font-family:Courier New,Courier,monospace;white-space:pre;">YES NO</div></pre></div><divclass=panel_bottom> </div><br><centerstyle='font-size:15px;font-family:Arial;font-weight:bold;color:#1A5CC8'><ahref='contest_statistic.php?cid=706&pid=1011'>Statistic</a> | <ahref='contest_submit.php?cid=706&pid=1011'>Submit</a> | <ahref='contest_listtopic.php?cid=706'>Clarifications</a> | <ahref='contest_show.php?cid=706'>Back</A></center><br></td></tr></div>
0 0
- 2016多校赛 Teacher Bo(曼哈顿距离)
- Teacher Bo (曼哈顿距离)
- 2016第三场多校联盟训练1011 Teacher Bo(曼哈顿距离)
- hdu5762Teacher Bo+曼哈顿距离
- MULti 2016 Teacher Bo(hdu 5763)
- hdu5762 Teacher Bo (暴力)
- Teacher Bo
- Teacher Bo
- Teacher Bo
- 2016 多校联训 第三场Teacher Bo hdoj5762
- HDU 5762 Teacher Bo (暴力)
- HDU 5762 Teacher Bo (特判后暴力)
- HDU 5762 Teacher Bo (水题)
- hdu 5762 Teacher Bo(暴力美学)
- 曼哈顿距离
- 曼哈顿距离
- 曼哈顿距离
- 曼哈顿距离
- Codeforces 274A:k-Multiple Free Set(初识set集合)
- 用普通类模拟枚举--枚举的原理
- memcached入门(1):开篇
- 2016第三场多校联盟训练1011 Teacher Bo(曼哈顿距离)
- (24)HTML标签详解之<audio><video><source>
- 2016多校赛 Teacher Bo(曼哈顿距离)
- Shader特效——“水彩画”的实现【GLSL】
- Runtime的使用
- 基于TCP协议的网络通信(socket编程)
- android_server pie/nonpie 解决error: only position independent executables (PIE) are supported
- PHP小程序--分页
- Android之export,process
- 枚举的总结和常用方法
- NOI 2016 游记