結果
問題 | No.2715 Unique Chimatagram |
ユーザー |
|
提出日時 | 2024-04-06 15:05:40 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 14 ms / 2,000 ms |
コード長 | 433 bytes |
コンパイル時間 | 2,761 ms |
コンパイル使用メモリ | 256,416 KB |
実行使用メモリ | 5,632 KB |
最終ジャッジ日時 | 2024-10-01 03:52:03 |
合計ジャッジ時間 | 4,542 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 40 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n;cin>>n; map<string,int>cnt; for(int i=0;i<n;i++){ string s;cin>>s; for(int j=0;j<26;j++){ string t=s+char(j+'a'); sort(t.begin(),t.end()); cnt[t]++; } } for(auto m:cnt){ if(m.second==1){ cout<<m.first<<endl; return 0; } } cout<<-1<<endl; }