結果
| 問題 | No.2778 Is there Same letter? |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-07 22:11:23 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 553 bytes |
| 記録 | |
| コンパイル時間 | 8,436 ms |
| コンパイル使用メモリ | 336,152 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 08:17:19 |
| 合計ジャッジ時間 | 8,570 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
using mint = modint998244353;
const int dx[4]={0,1,0,-1};
const int dy[4]={1,0,-1,0};
set<char>st;
int main(){
int n;
string s;
cin >> n >> s;
rep(i,n){
if(st.find(s[i])==st.end()){
st.insert(s[i]);
}
else{
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
return 0;
}