Submission #73890840
Source Code Expand
#include <bits/stdc++.h>
#define ll long long
const ll N = 2e5 + 5, MOD = 998244353, inf = 2e18;
using namespace std;
int dx[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[] = {1, -1, 0, 0, 1, -1, 1, -1};
char di[] = {'R', 'L', 'D', 'U'};
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<class T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
void Ebraam() {
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("Input.txt", "r", stdin);
freopen("Output.txt", "w", stdout);
#endif
}
void solve() {
int n, x;
cin >> n >> x;
vector<int> v(n);
for (int i = 0; i < n; i++) {
cin >> v[i];
}
for (int i = 0; i < n; i++) {
cout << (v[i] < x) << '\n';
x = min(x, v[i]);
}
}
int main() {
Ebraam();
int t = 1;
// cin >> t;
while (t--) {
solve();
if (t)cout << endl;
}
return 0;
}
Submission Info
| Submission Time |
|
| Task |
A - chmin |
| User |
Ebraam_Yousef |
| Language |
C++23 (GCC 15.2.0) |
| Score |
100 |
| Code Size |
1197 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, sample_03.txt |
| All |
sample_01.txt, sample_02.txt, sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt |
| Case Name |
Status |
Exec Time |
Memory |
| sample_01.txt |
AC |
1 ms |
3480 KiB |
| sample_02.txt |
AC |
1 ms |
3452 KiB |
| sample_03.txt |
AC |
1 ms |
3416 KiB |
| test_01.txt |
AC |
1 ms |
3504 KiB |
| test_02.txt |
AC |
1 ms |
3572 KiB |
| test_03.txt |
AC |
1 ms |
3648 KiB |
| test_04.txt |
AC |
1 ms |
3416 KiB |
| test_05.txt |
AC |
1 ms |
3572 KiB |
| test_06.txt |
AC |
1 ms |
3584 KiB |
| test_07.txt |
AC |
1 ms |
3416 KiB |
| test_08.txt |
AC |
1 ms |
3640 KiB |
| test_09.txt |
AC |
1 ms |
3572 KiB |
| test_10.txt |
AC |
1 ms |
3572 KiB |
| test_11.txt |
AC |
1 ms |
3412 KiB |
| test_12.txt |
AC |
1 ms |
3504 KiB |