当前位置:网站首页>uva11991
uva11991
2022-06-21 12:38:00 【Stabbing the bear with a knife】
#include <iostream>
#include <istream>
#include <sstream>
#include <vector>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <cstring>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <numeric>
#include <chrono>
#include <ctime>
#include <cmath>
#include <cctype>
#include <string>
#include <cstdio>
#include <iomanip>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <functional>
#include <iterator>
using namespace std;
int n, m,input,a,b;
int main()
{
unordered_map<int, vector<int>> mmp;
while (cin >> n >> m) {
mmp.clear();
for (int i = 0; i < n; i++) {
cin >> input;
mmp[input].push_back(i+1);
}
for (int i = 0; i < m; i++) {
cin >> a >> b;
a--;
if (a < 0 ||mmp.count(b) == 0 || a >= mmp[b].size()) cout << 0 << endl;
else cout << mmp[b][a] << endl;
}
}
return 0;
}
边栏推荐
- 【毕业季·进击的技术er】大学生涯的成长之路
- Understand UML class diagram and sequence diagram
- CP Instruction Learning
- Educator table labels - settings for Advanced Table Styles
- PWM (pulse width modulation) of STM32 notes
- [100 unity stepping pit knowledge points] | draw cube dotted line and sphere dotted line (gizmos auxiliary wireframe) in the editor
- Educoder Web练习题---表单的结构
- uva11991
- Six relationships of UML - system learning IV
- 在数字时代实现IT敏捷性的12个技巧
猜你喜欢

i. MX - rt1052 boot start

配电室环境监控系统技术方案

cartographer_ceres_scan_matcher_2d

DVWA配置教程

Five (seven) principles - systematic learning III

南京大学 静态软件分析(static program analyzes)-- introduction 学习笔记

The wechat authorization login window will pop up automatically

12 tips for achieving it agility in the digital age

SSH password free login

Educoder web exercise - validating forms
随机推荐
DVWA configuration tutorial
常用的17个运维监控系统
[100 unity step pit knowledge points] | collision box detection physics in unity OverlapBox、OverlapCaps
南京大学 静态软件分析(static program analyzes)-- introduction 学习笔记
redis中的数据类型
最新远程部署运维工具汇总
配电室环境监控系统技术方案
安科瑞BM100系列信号隔离器的实际应用
Association condition of SQL left connection
自定义view绘制折线图(支持缩放)
Educoder Web练习题---对表单进行验证
《预训练周刊》第50期:无解码变换器、神经提示搜索、梯度空间降维
Data types in redis
Educator table labels - settings for Advanced Table Styles
显示Oracle某一张表的所有索引
LeetCode-高度检查器
2. 数据类型
PWM (pulse width modulation) of STM32 notes
Embedded struct and embedded interface
i. MX - rt1052 boot start