結果
問題 |
No.1468 Colourful Pastel
|
ユーザー |
![]() |
提出日時 | 2021-04-05 16:32:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 19 ms / 1,000 ms |
コード長 | 546 bytes |
コンパイル時間 | 1,931 ms |
コンパイル使用メモリ | 175,204 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 08:02:15 |
合計ジャッジ時間 | 3,559 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); int n;cin>>n; map<string,int> b,a; string s; rep(i,n){ cin>>s; b[s]++; } rep(i,n-1){ cin>>s; a[s]++; } for(auto itr=b.begin();itr!=b.end();++itr){ // cout<<"key="<<itr->first<<",val="<<itr->second<<"\n"; if(itr->second!=a[itr->first]){ cout<<itr->first<<endl; break; } } }