結果
問題 | No.1795 AtCoder Heuristic Rating coloring |
ユーザー |
![]() |
提出日時 | 2022-11-10 07:31:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 466 ms / 2,000 ms |
コード長 | 402 bytes |
コンパイル時間 | 1,992 ms |
コンパイル使用メモリ | 206,268 KB |
最終ジャッジ日時 | 2025-02-08 19:29:30 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 54 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define int long longsigned main(){int N,M;cin>>N>>M;set<string> s;map<string,int> m;for(int i=0;i<N+M;i++){string S;cin>>S;int x;cin>>x;s.insert(S);m[S]=x;}while(!s.empty()){auto p = *s.begin();s.erase(p);cout<<p<<' '<<m[p]<<endl;}}