답안 #872522

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
872522 2023-11-13T09:34:16 Z Onur_Ilgaz Knjige (COCI20_knjige) C++17
0 / 50
2 ms 1904 KB
#include <bits/stdc++.h>
#define fast cin.tie(0)->sync_with_stdio(0);
#define int long long
#define inf ((int)1e18)
using namespace std;

int32_t main(){
	fast
	int n;
	cin >> n;
	vector <int> arr(n), order;
	for(int i = 0; i < n; i++) {
		cin >> arr[i];
		order.push_back(arr[i]);
	}
	sort(order.begin(), order.end());
	reverse(arr.begin(), arr.end());
	vector<string> output;
	for(int i = 0; i < n; i++) {
		int to = n - (lower_bound(order.begin(), order.end(), arr[i]) - order.begin()) - 1;
		cout << arr[i] << " " << to << "\n";
		for(int j = n - 1; j > i; j--) {
			output.push_back("UZMI L L\n");
			output.push_back("STAVI L D\n");
		} // iden büyük bütün kitaplar sağ rafta
		output.push_back("UZMI D L\n"); // i. nesneyi sağ ele aldık
		for(int j = i; j < n; j++) {
			if(j == to) {
				output.push_back("STAVI D L\n");
			}
			else {
				output.push_back("UZMI L D\n");
				output.push_back("STAVI L L\n");
			}
		}
	}
	cout << output.size() << "\n";
	for(auto &it:output) {
		cout << it;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 1492 KB Token "8" doesn't correspond to pattern "(UZMI|STAVI)"
2 Incorrect 2 ms 1904 KB Token "67" doesn't correspond to pattern "(UZMI|STAVI)"
3 Incorrect 2 ms 1492 KB Token "49" doesn't correspond to pattern "(UZMI|STAVI)"
4 Incorrect 1 ms 1492 KB Token "97" doesn't correspond to pattern "(UZMI|STAVI)"
5 Incorrect 1 ms 1492 KB Token "86" doesn't correspond to pattern "(UZMI|STAVI)"
6 Incorrect 2 ms 1496 KB Token "37" doesn't correspond to pattern "(UZMI|STAVI)"
7 Incorrect 2 ms 1492 KB Token "99" doesn't correspond to pattern "(UZMI|STAVI)"
8 Incorrect 2 ms 1496 KB Token "67" doesn't correspond to pattern "(UZMI|STAVI)"
9 Incorrect 1 ms 1748 KB Token "88" doesn't correspond to pattern "(UZMI|STAVI)"
10 Incorrect 1 ms 1496 KB Token "47" doesn't correspond to pattern "(UZMI|STAVI)"