結果
| 問題 |
No.2153 何コーダーが何人?
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2023-05-05 14:25:41 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 617 bytes |
| コンパイル時間 | 911 ms |
| コンパイル使用メモリ | 113,956 KB |
| 最終ジャッジ日時 | 2025-02-12 17:10:13 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 19 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>
using namespace std;
using ll = long long;
int main(){
int N;
cin >> N;
vector<string> S(N);
vector<int> C(N), cnt(8);
set<string> st;
for (int i=0; i<N; i++) cin >> S[i] >> C[i];
for (int i=N-1; i>=0; i--){
if (st.count(S[i])) continue;
st.insert(S[i]);
cnt[C[i]]++;
}
for (int i=0; i<=7; i++) cout << cnt[i] << endl;
return 0;
}
srjywrdnprkt