結果

問題 No.2210 equence Squence Seuence
ユーザー ineedyourlovep
提出日時 2023-02-10 22:21:42
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 672 bytes
コンパイル時間 2,412 ms
コンパイル使用メモリ 204,444 KB
最終ジャッジ日時 2025-02-10 12:58:41
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 6 WA * 4 TLE * 5 MLE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
//const int mod = 1000000007;
//const int mod = 998244353;

int main()
{
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  rep(i, 0, n) cin >> a[i];
  map<vector<int>, int> mp;
  vector<int> b(n-1);
  rep(i, 0, n-1) b[i] = a[i+1];
  mp[b] = 0;
  rep(i, 0, n-1) {
    b[i] = a[i];
    mp[b] = i+1;
  }
  int cnt = 1;
  for (auto i : mp) {
    for (auto j : i.first) {
      if (cnt == k) cout << j << " ";
    }
    if (cnt == k) cout << endl;
    cnt++;
  }
}
0