文章目录
- C++
- 总结
本题链接:201412-1 门禁系统
本博客给出本题截图:
C++
#include <iostream> using namespace std; const int N = 1010; int a[N]; int main() { int n; cin >> n; while (n -- ) { int x; cin >> x; a[x] ++; cout << a[x] << ' '; } return 0; }
总结
水题,不解释
本题链接:201412-1 门禁系统
本博客给出本题截图:
#include <iostream> using namespace std; const int N = 1010; int a[N]; int main() { int n; cin >> n; while (n -- ) { int x; cin >> x; a[x] ++; cout << a[x] << ' '; } return 0; }
水题,不解释