結果

問題 No.938 賢人を探せ
ユーザー stone_725stone_725
提出日時 2019-12-01 07:53:59
言語 C++17(clang)
(14.0.0 + boost 1.83.0)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 3,380 ms
コンパイル使用メモリ 89,212 KB
実行使用メモリ 6,804 KB
最終ジャッジ日時 2023-08-21 03:29:07
合計ジャッジ時間 6,136 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
6,804 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,500 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 21 ms
5,092 KB
testcase_09 AC 21 ms
4,968 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 27 ms
5,256 KB
testcase_12 AC 22 ms
4,976 KB
testcase_13 AC 22 ms
4,912 KB
testcase_14 AC 22 ms
5,016 KB
testcase_15 AC 22 ms
5,016 KB
testcase_16 AC 22 ms
4,948 KB
testcase_17 AC 22 ms
5,012 KB
testcase_18 AC 21 ms
4,964 KB
testcase_19 AC 22 ms
4,960 KB
testcase_20 AC 21 ms
4,924 KB
testcase_21 AC 22 ms
4,944 KB
testcase_22 AC 38 ms
6,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <map>
#include <vector>

using namespace std;

int main(){
    int n;
    cin >> n;
    map<string, int> cnt;
    vector<string> vs(n);
    for(auto&& i : vs){
        string str;
        cin >> str >> i;
        cnt[str]++;
    }
    for(auto&& i : vs){
        if(cnt[i] == 0){
            cout << i << "\n";
            cnt[i]++;
        }
    }
}
0