結果
問題 | No.2210 equence Squence Seuence |
ユーザー |
![]() |
提出日時 | 2023-02-10 22:21:42 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 672 bytes |
コンパイル時間 | 1,929 ms |
コンパイル使用メモリ | 210,928 KB |
実行使用メモリ | 817,536 KB |
最終ジャッジ日時 | 2024-07-07 16:32:05 |
合計ジャッジ時間 | 4,068 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 2 ms
5,376 KB |
testcase_02 | AC | 2 ms
5,376 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 | -- | - |
ソースコード
#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++; } }