結果
問題 | No.2778 Is there Same letter? |
ユーザー |
|
提出日時 | 2024-06-20 07:13:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 533 bytes |
コンパイル時間 | 2,607 ms |
コンパイル使用メモリ | 173,580 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-20 07:14:04 |
合計ジャッジ時間 | 3,211 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define ll long long void solve() { int n; string s; cin >> n >> s; unordered_map<char, int> mp; for(char ele : s) { if(mp[ele] == 1) { cout << "Yes" << endl; return; } else mp[ele]++; } cout << "No" << endl; } int main(){ ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); // int t; // cin >> t; // while(t--){ // solve(); // } solve(); return 0; }