标签:code htable scanf stream http div ash print space
水题。
#include<iostream> using namespace std; int hashtable[111]= {0}; //成绩与人数的映射 int main() { int n,score,k; cin>>n; for(int i = 0; i < n; ++i) { scanf("%d",&score); hashtable[score]++; } cin>>k; for(int i = 0; i < k ; ++i) { scanf("%d",&score); if(i > 0) printf(" "); printf("%d",hashtable[score]); } return 0; }
标签:code htable scanf stream http div ash print space
原文地址:https://www.cnblogs.com/keep23456/p/12330662.html