結果

問題 No.2210 equence Squence Seuence
ユーザー ineedyourlovepineedyourlovep
提出日時 2023-02-10 22:21:42
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 672 bytes
コンパイル時間 2,259 ms
コンパイル使用メモリ 209,660 KB
実行使用メモリ 814,692 KB
最終ジャッジ日時 2023-09-21 23:36:05
合計ジャッジ時間 4,667 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 MLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

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