結果
| 問題 |
No.2778 Is there Same letter?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-07 21:52:02 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 473 bytes |
| コンパイル時間 | 1,751 ms |
| コンパイル使用メモリ | 165,776 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 07:47:40 |
| 合計ジャッジ時間 | 2,645 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define REP(i,n) for(int i=0;i<int(n);i++)
int a[30];
int main(){
cin.tie(nullptr); ios_base::sync_with_stdio(false);
int i,j,k;
int N;
string S;
cin >> N >> S;
REP(i,N){
int x=S[i]-'A';
a[x]++;
}
REP(i,26){
if(a[i]>=2){
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
return 0;
}