Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute d...
投影坐标是正确了,但是不美观啊,不过暂时也只能这样了。。。慢慢琢磨有没有其他参数可以修改吧。。。另外还有一个问题就是0值镂空,暂时也还没完善。...
map用法 水题#include<bits/stdc++.h>using namespace std; int main(){pair<int,string>temp[] = {{0,"zero"}, {1, "one"}, {2,"two"}, {3,"three"}, {4,"four"},......
#include<bits/stdc++.h>using namespace std;map<string,int> mp;int main(){mp["zero"]=0;mp["one"]=1;mp["two"]=2;mp["three"]=3;mp["four"]=4;mp["five"]=5;mp["s......
题意:就是最后给出哪个地方哪种水果买了多少钱,首先是地方联系水果,水果又联系数量~!这摆明了是用map啊,并且还应该是镶嵌的map. 就是迭代器写的时候难写了一点~...