#include <cstdio>
#include <cstring>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
map<int,vector<int> >t;
vector<int>::iterator it;
int main()
{
int n,x;
scanf("%d",&n);
for(int i=; i<=n; i++)
{
scanf("%d",&x);
t[x].push_back(i);
}
int m,r,l;
scanf("%d",&m);
for(int i=; i<=m; i++)
{
scanf("%d%d%d",&l,&r,&x);
it=lower_bound(t[x].begin(),t[x].end(),l);
if(it==t[x].end()) printf("");
else if((*it)<=r) printf("");
else printf("");
}
printf("\n");
return ;
}

ural 1613 For Fans of Statistics的更多相关文章

  1. 1613. For Fans of Statistics(STL)

    1613 高端的东西 lower_bounder 函数lower_bound()在first和last中的前闭后开区间进行二分查找,返回大于或等于val的第一个元素位置.如果所有元素都小于val,则返 ...

  2. STL--G - For Fans of Statistics(两个推断条件-二分)

    G - For Fans of Statistics Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & ...

  3. ural1613 For Fans of Statistics

    For Fans of Statistics Time limit: 1.0 secondMemory limit: 64 MB Have you ever thought about how man ...

  4. A过的题目

    1.TreeMap和TreeSet类:A - Language of FatMouse ZOJ1109B - For Fans of Statistics URAL 1613 C - Hardwood ...

  5. AC题目简解-数据结构

    A - Japan  POJ 3067 要两条路有交叉,(x1,y1)(x2,y2)那么需要满足:(x1-x2)*(y1-y2)<0判断出这是求逆序的问题 树状数组求逆序,先通过自定义的比较器实 ...

  6. bzoj 1814 Ural 1519 Formula 1 插头DP

    1814: Ural 1519 Formula 1 Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 942  Solved: 356[Submit][Sta ...

  7. ABBA BABA statistics

    The ABBA BABA statistics are used to detect and quantify an excess of shared derived alleles, which ...

  8. SQL Server 的 Statistics 簡介

    當你要清空「資料表(table)」,或倒入大量「資料(data;record)」,或公司「資料庫(database)」改用新版本要資料大搬家…等情形,不只是要重建「索引(index)」,還應要重建或更 ...

  9. SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色 SP2-0611: 启用 STATISTICS 报告时出错

    援引: SP2-0618: 无法找到会话标识符.启用检查 PLUSTRACE 角色 SP2-0611: 启用 STATISTICS 报告时出错 问题描述及解决方法: SQL*Plus: Release ...

随机推荐

  1. 四种方案解决ScrollView嵌套ListView问题[转]

    http://bbs.anzhuo.cn/thread-982250-1-1.html 以下文章转自@安卓泡面 在工作中,曾多次碰到ScrollView嵌套ListView的问题,网上的解决方法有很多 ...

  2. 你的第一个Windows程序——绘制窗口

    MSDN原文(英文) 绘制窗口 你已经创建了你的窗口,现在你想在它里面显示东西.在WIndows术语里,这就是所谓的绘制窗口.混合隐喻,一个窗口是一个空白画布,等待你去填充它. 有时你的程序将启动绘制 ...

  3. android 支持的语言列表(汇总)

    Arabic, Egypt (ar_EG) -----------------------------阿拉伯语,埃及Arabic, Israel (ar_IL) ------------------- ...

  4. Android中使用ListView绘制自定义表格(2)

    上回再写了<Android中使用ListView绘制自定义表格>后,很多人留言代码不全和没有数据样例.但因为项目原因,没法把源码全部贴上来.近两天,抽空简化了一下,做了一个例子. 效果图如 ...

  5. 面试题 HashMap 原理

    HashMap与HashTable的区别 总结: HashMap是用来代替HashTable的类,一般建议使用HashMap.最核心的区别:HashTable的方法是同步的(线程安全),而HashMa ...

  6. SpringMVC09异常处理和类型转化器

    public class User { private String name; private Integer age; public String getName() { return name; ...

  7. Html.RenderPartial与Html.RenderAction区别(转)

    Html.RenderPartial与Html.RenderAction这两个方法都是用来在界面上嵌入用户控件的. Html.RenderPartial是直接将用户控件嵌入到界面上: <%Htm ...

  8. JS类百度的动态提示框思路及完成

    参考的代码来自这里: http://www.jb51.net/article/28075.htm 不过说实话,这个网站太烂了,不适合看代码,另外写代码的人是个大牛,但是却没有模块化思想,所以朕不高兴直 ...

  9. 关于oracle dblink的知识。

    create database link WZGLconnect to MMCSG_GX(用户名)using '(description=(address_list=(address=(host=xx ...

  10. 运维监控利器smokeping 500报错处理

    检查apache日志发现有以下错误: No such file or directory: exec of '/usr/local/smokeping/htdocs/smokeping.cgi' fa ...