結果
| 問題 |
No.2778 Is there Same letter?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-12-23 20:38:42 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 842 bytes |
| コンパイル時間 | 1,711 ms |
| コンパイル使用メモリ | 120,944 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 06:04:39 |
| 合計ジャッジ時間 | 2,784 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <iostream>
#include <iomanip>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <tuple>
#include <map>
#include<set>
#include<queue>
#include<stack>
#include <unordered_set>
//#include<bits/stdc++.h>
//cout << fixed << setprecision(3)
// static_cast<double>( )
//if(a < 0 || h <= a || b < 0 || w <= b)return;
// string abc = "abcdefghijklmnopqrstuvwxyz";
// string abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
using namespace std;
using ulli = unsigned long long int;
using lli = long long int;
int main(){
int n;
cin >> n;
string s;
cin >> s;
bool c = 0;
for (int j = 0; j < n; j++) {
for (int i = j + 1; i < n; i++) {
if (s.substr(j, 1) == s.substr(i, 1))c = 1;
}
}
if (c)cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}