A. Vasya and the Bus

  • 根据\(n,m\)是否为0分类讨论下。

B. Surrounded

  • 判断两圆是否有交点,否则构造的圆与两圆相切。

C. STL

  • 看代码比较清楚。
void type() {
if (cin >> str) {
ans += str;
if (str == "pair")
ans += "<", type(), ans += ",", type(), ans += ">";
} else {
flag = 1;
}
}

D. Non-Secret Cypher

  • two pointer
  • 对于固定的左端点\(l\),找到最小的右端点满足题意,显然两个指针都是单调递增的。

E. Counter Attack

  • 在补图中,当前点\(u\)每次与一段连续的点均有连边,如果两区间有连边,则需要合并两个连通块。
  • 用线段树维护区间覆盖情况。
  • 传递覆盖信息时如果当前区间已经被完全覆盖了,显然不需要往下继续传递。

Codeforces Round #120 (Div. 2)的更多相关文章

  1. Codeforces Round #297 (Div. 2)E. Anya and Cubes 折半搜索

    Codeforces Round #297 (Div. 2)E. Anya and Cubes Time Limit: 2 Sec  Memory Limit: 512 MBSubmit: xxx  ...

  2. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

  3. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

  4. Codeforces Round #368 (Div. 2)

    直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...

  5. cf之路,1,Codeforces Round #345 (Div. 2)

     cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅.....   ...

  6. Codeforces Round #279 (Div. 2) ABCDE

    Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems     # Name     A Team Olympiad standard input/outpu ...

  7. Codeforces Round #262 (Div. 2) 1003

    Codeforces Round #262 (Div. 2) 1003 C. Present time limit per test 2 seconds memory limit per test 2 ...

  8. Codeforces Round #262 (Div. 2) 1004

    Codeforces Round #262 (Div. 2) 1004 D. Little Victor and Set time limit per test 1 second memory lim ...

  9. Codeforces Round #371 (Div. 1)

    A: 题目大意: 在一个multiset中要求支持3种操作: 1.增加一个数 2.删去一个数 3.给出一个01序列,问multiset中有多少这样的数,把它的十进制表示中的奇数改成1,偶数改成0后和给 ...

随机推荐

  1. 11个Linux基础面试问题

    Q.1: Linux 操作系统的核心是什么? Shell Kernel Command Script Terminal 答: 内核(Kernel)是Linux 操作系统的核心.Shell是一个命令行解 ...

  2. CSU 1021 B(Contest #3)

    Description 从m个不同元素中取出n (n ≤ m)个元素的所有组合的个数,叫做从m个不同元素中取出n个元素的组合数.组合数的计算公式如下: C(m, n) = m!/((m - n)!n! ...

  3. Spring学习笔记之方法注入

    public  abstract class ReplacedBean {protected static final Log log = LogFactory.getLog(ReplacedBean ...

  4. 跨域请求之jQuery的ajax jsonp的使用解惑

    前天在项目中写的一个ajax jsonp的使用,出现了问题:可以成功获得请求结果,但没有执行success方法,直接执行了error方法提示错误——ajax jsonp之前并没有用过,对其的理解为跟普 ...

  5. jQuery 动态添加瀑布流

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  6. php的数组与数据结构

    一.数组的分类与定义 分类: 1.索引数组  $array = array(1,2,3,4,5); 2.关联数组  $array=array(1=>"aa","bb ...

  7. hdu 2071

    Ps:输出n个数里最大的 #include "stdio.h" int main(){ ],max; int i,j,n,t; while(~scanf("%d" ...

  8. Linux下控制器IO地址

    在Linux下使用cat /proc/ioports可以查看控制器使用的IO地址范围

  9. linux常用命令:5网络命令

    网络命令 1. 指令名称:write 指令所在路径:/usr/bin/write 执行权限:所有用户 语法:write  <用户名> 功能描述:给用户发送信息,以Ctrl+D保存结束

  10. swift系统学习第三章

    第九节:结构体-sturt //: Playground - noun: a place where people can play import UIKit /* swift学习第九节 结构体:st ...