結果
問題 | No.938 賢人を探せ |
ユーザー |
![]() |
提出日時 | 2019-12-01 00:02:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 55 ms / 2,000 ms |
コード長 | 633 bytes |
コンパイル時間 | 2,084 ms |
コンパイル使用メモリ | 179,460 KB |
実行使用メモリ | 7,656 KB |
最終ジャッジ日時 | 2024-12-14 11:37:48 |
合計ジャッジ時間 | 3,633 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) (x).begin(),(x).end() const int mod=1000000007,MAX=100005,INF=1<<30; int main(){ std::ifstream in("text.txt"); std::cin.rdbuf(in.rdbuf()); cin.tie(0); ios::sync_with_stdio(false); int N;cin>>N; vector<string> A; map<string,int> MA; for(int i=0;i<N;i++){ string S,T;cin>>S>>T; A.push_back(S); A.push_back(T); MA[S]++; } for(int i=0;i<A.size();i++){ string S=A[i]; if(MA[S]==0){ cout<<S<<endl; MA[S]=-1; } } }