結果
問題 |
No.2778 Is there Same letter?
|
ユーザー |
![]() |
提出日時 | 2024-06-08 13:04:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 407 bytes |
コンパイル時間 | 2,041 ms |
コンパイル使用メモリ | 195,824 KB |
最終ジャッジ日時 | 2025-02-21 20:52:13 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
#include <bits/stdc++.h> using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); int n; string s; cin >> n >> s; vector<bool> vis(26); for (char c : s) { if (vis[c - 'A']) { cout << "Yes" << endl; return 0; } vis[c - 'A'] = true; } cout << "No" << endl; }