結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー Kanten4205Kanten4205
提出日時 2020-10-28 08:00:40
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 1,644 ms
コンパイル使用メモリ 172,420 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-10-01 00:46:17
合計ジャッジ時間 3,858 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 31 ms
6,408 KB
testcase_15 WA -
testcase_16 AC 16 ms
4,716 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 38 ms
7,464 KB
testcase_20 AC 24 ms
5,848 KB
testcase_21 AC 20 ms
5,372 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 39 ms
7,716 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 39 ms
7,632 KB
testcase_30 AC 38 ms
7,656 KB
testcase_31 AC 38 ms
7,692 KB
testcase_32 AC 39 ms
7,632 KB
testcase_33 WA -
testcase_34 AC 38 ms
7,628 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main() {
    string T; cin >> T;
    vector<pair<char, int>>S(T.size());
    for (long long i = 0; i < T.size(); i++) {
        S.at(i) = make_pair(T.at(i), i);
    }
    sort(S.begin(), S.end());
    if (S.at(0).first == S.at(1).second) {
        cout << S.at(T.size() - 1).second << ' ' << S.at(T.size() - 1).first;
    }
    else {
        cout << S.at(0).second + 1 << ' ' << S.at(0).first;
    }
}
0