結果
問題 | No.1362 [Zelkova 8th Tune] Black Sheep |
ユーザー |
|
提出日時 | 2021-01-22 21:21:19 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
CE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 623 bytes |
コンパイル時間 | 930 ms |
コンパイル使用メモリ | 89,532 KB |
最終ジャッジ日時 | 2025-01-18 03:33:15 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:22:21: error: variable ‘std::array<int, 256> cnt’ has initializer but incomplete type 22 | array<int, 256> cnt{}; | ^~~
ソースコード
#include <iostream>#include <algorithm>#include <map>#include <set>#include <queue>#include <stack>#include <numeric>#include <bitset>#include <cmath>static const int MOD = 1000000007;using ll = long long;using u32 = unsigned;using u64 = unsigned long long;using namespace std;template<class T> constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;int main() {string s;cin >> s;array<int, 256> cnt{};for (auto &&i : s) cnt[i]++;for (int i = 0; i < s.size(); ++i) {if(cnt[s[i]] == 1){cout << i+1 << " " << s[i] << "\n";}}return 0;}