結果
問題 | No.1362 [Zelkova 8th Tune] Black Sheep |
ユーザー |
|
提出日時 | 2024-03-23 15:10:25 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 14 ms / 1,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 4,281 ms |
コンパイル使用メモリ | 268,372 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-09-30 13:29:25 |
合計ジャッジ時間 | 5,737 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;using ll = long long;using ld = long double;string S;map<char, int> mp;int main() {cin >> S;for (int i = 0; i < S.size(); i++) {mp[S[i]]++;}for (auto p: mp) {if (p.second == 1) {cout << S.find(p.first) + 1 << ' ' << p.first << endl;return 0;}}return 0;}