結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー rogi52
提出日時 2022-09-27 12:33:23
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 9 ms / 1,000 ms
コード長 458 bytes
コンパイル時間 2,061 ms
コンパイル使用メモリ 201,444 KB
最終ジャッジ日時 2025-02-07 17:12:58
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    
    string s; cin >> s;
    map<char,vector<int>> mp;
    for(int i = 0; i < int(s.size()); i++) mp[s[i]].push_back(i);
    for(auto e : mp) {
        if(e.second.size() == 1u) {
            cout << e.second[0] + 1 << " " << e.first << endl;
            return 0;
        }
    }
}
0