結果
| 問題 | No.2778 Is there Same letter? |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-07-30 17:39:47 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 228µs | |
| コード長 | 423 bytes |
| 記録 | |
| コンパイル時間 | 2,155 ms |
| コンパイル使用メモリ | 348,420 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-30 17:39:51 |
| 合計ジャッジ時間 | 3,340 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string str;
ll a[26] = {0};
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
ll n;
str s;
cin >> n >> s;
for (ll i = 0; i < n; i++) a[s[i] - 'A']++;
for (ll i = 0; i < 26; i++)
{
if (a[i] < 2) continue;
cout << "Yes\n";
return 0;
}
cout << "No\n";
return 0;
}