結果
| 問題 | No.2715 Unique Chimatagram |
| コンテスト | |
| ユーザー |
mint
|
| 提出日時 | 2024-04-06 00:39:17 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 11 ms / 2,000 ms |
| + 980µs | |
| コード長 | 556 bytes |
| 記録 | |
| コンパイル時間 | 1,636 ms |
| コンパイル使用メモリ | 226,676 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-11-08 11:59:14 |
| 合計ジャッジ時間 | 4,821 ms |
|
ジャッジサーバーID (参考情報) |
judge7_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 42 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n; cin >> n;
map<string, int> m;
string abc = "abcdefghijklmnopqrstuvwxyz";
while(n--){
string s; cin >> s;
for(int i = 0; i < 26; i++){
string ss = s + abc[i];
sort(ss.begin(), ss.end());
m[ss]++;
}
}
for(auto e : m){
if(e.second == 1){
cout << e.first << '\n';
return 0;
}
}
cout << -1 << '\n';
return 0;
}
mint