Submission #57042949
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
for (int i = N - K; i < N; i++) {
cout << A.at(i) << " ";
}
if (N - K > 0) {
for (int i = 0; i < N - K - 1; ++i) {
cout << A.at(i) << " ";
}
cout << A.at(N - K - 1);
}
cout << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Cut |
| User | ASASONE_ |
| Language | C++ 20 (gcc 12.2) |
| Score | 100 |
| Code Size | 379 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3648 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 1 ms | 3424 KiB |
| random_02.txt | AC | 1 ms | 3568 KiB |
| random_03.txt | AC | 1 ms | 3648 KiB |
| random_04.txt | AC | 1 ms | 3464 KiB |
| random_05.txt | AC | 1 ms | 3500 KiB |
| random_06.txt | AC | 1 ms | 3460 KiB |
| random_07.txt | AC | 1 ms | 3472 KiB |
| random_08.txt | AC | 1 ms | 3452 KiB |
| sample_01.txt | AC | 1 ms | 3568 KiB |
| sample_02.txt | AC | 1 ms | 3560 KiB |