Submission #57037616


Source Code Expand

Copy
#include <bits/stdc++.h>
#define int long long
using namespace std;
int a[105];
signed main()
{
int n,k;
cin >> n >> k;
for (int i = 1; i <= n; i++) cin >> a[i];
for (int i = n - k + 1; i <= n; i++) printf("%lld ",a[i]);
for (int i = 1; i <= n - k; i++) printf("%lld ",a[i]);
return 0;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <bits/stdc++.h>
#define int long long
using namespace std;
int a[105];

signed main()
{
	int n,k;
	cin >> n >> k;
	for (int i = 1; i <= n; i++) cin >> a[i];
	for (int i = n - k + 1; i <= n; i++) printf("%lld ",a[i]);
	for (int i = 1; i <= n - k; i++) printf("%lld ",a[i]);
	return 0;
}

Submission Info

Submission Time
Task A - Cut
User Hyh12377
Language C++ 20 (gcc 12.2)
Score 100
Code Size 307 Byte
Status AC
Exec Time 1 ms
Memory 3812 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 10
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 3748 KB
random_02.txt AC 1 ms 3628 KB
random_03.txt AC 1 ms 3628 KB
random_04.txt AC 1 ms 3652 KB
random_05.txt AC 1 ms 3812 KB
random_06.txt AC 1 ms 3616 KB
random_07.txt AC 1 ms 3756 KB
random_08.txt AC 1 ms 3760 KB
sample_01.txt AC 1 ms 3716 KB
sample_02.txt AC 1 ms 3808 KB


2025-04-04 (Fri)
00:18:39 +00:00