結果
問題 |
No.1362 [Zelkova 8th Tune] Black Sheep
|
ユーザー |
|
提出日時 | 2021-01-29 23:07:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 14 ms / 1,000 ms |
コード長 | 242 bytes |
コンパイル時間 | 652 ms |
コンパイル使用メモリ | 76,416 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 09:35:18 |
合計ジャッジ時間 | 2,824 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream> #include<map> using namespace std; main() { string s; cin>>s; map<char,int>c; for(char d:s)c[d]++; for(pair<char,int>p:c)if(p.second==1) { int id=0; while(s[id]!=p.first)id++; cout<<id+1<<" "<<s[id]<<endl; } }