結果

問題 No.938 賢人を探せ
ユーザー kotatsugame
提出日時 2019-12-01 01:08:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 327 bytes
コンパイル時間 929 ms
コンパイル使用メモリ 80,784 KB
実行使用メモリ 6,992 KB
最終ジャッジ日時 2024-12-14 11:41:42
合計ジャッジ時間 2,111 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<set>
#include<vector>
using namespace std;
vector<string>ans;
set<string>out;
int N;
main()
{
    cin>>N;
    for(int i=0;i<N;i++)
    {
        string s,t;cin>>s>>t;
        out.insert(s);
        ans.push_back(t);
    }
    for(string&t:ans)if(out.find(t)==out.end())cout<<t<<endl,out.insert(t);
}
0