結果
問題 | No.1362 [Zelkova 8th Tune] Black Sheep |
ユーザー |
![]() |
提出日時 | 2021-01-22 21:36:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 17 ms / 1,000 ms |
コード長 | 575 bytes |
コンパイル時間 | 1,920 ms |
コンパイル使用メモリ | 173,124 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-27 22:11:28 |
合計ジャッジ時間 | 3,924 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long int ll;typedef pair<ll,ll> P;typedef vector<ll> VI;typedef vector<VI> VVI;#define REP(i,n) for(int i=0;i<(n);i++)#define ALL(v) v.begin(),v.end()constexpr ll MOD=998244353;constexpr ll INF=1e18;int main(){string s; cin >> s;int n=s.size();map<char,int> mp;REP(i,n){if(mp[s[i]]==0)mp[s[i]]=i+1;elsemp[s[i]]=-1;}for(auto p:mp){if(p.second!=-1)cout << p.second << " " << p.first << endl;}return 0;}