Submission #73885648
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
typedef double db;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<int,char> pic;
typedef vector<int> vi;
typedef vector<ll> vll;
#define SZ(x) ((int)x.size())
ll ksm(ll a,ll b,ll p){if (p == 1)return 0;if (b == 0)return 1%p;
ll ans = 1; a %= p;while (b > 0){if (b&1){ans = ans*a%p;}a = (a*a)
%p;b >>= 1;}return ans;}
const int mod = 1e9+7;
const int P = 998244353;
const ll inf = (1LL << 50LL);
const ll N = 5010;
int n,x;
int a[110];
int main(){
scanf("%d%d",&n,&x);
for (int i = 1;i <= n;i++){
scanf("%d",&a[i]);
}
for (int i = 1;i <= n;i++){
if (a[i] < x){
x = a[i];
printf("1\n");
}
else {
printf("0\n");
}
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - chmin |
| User | wuqize |
| Language | C++23 (GCC 15.2.0) |
| Score | 100 |
| Code Size | 778 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3904 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 | 3800 KiB |
| sample_02.txt | AC | 1 ms | 3904 KiB |
| sample_03.txt | AC | 1 ms | 3828 KiB |
| test_01.txt | AC | 1 ms | 3724 KiB |
| test_02.txt | AC | 1 ms | 3780 KiB |
| test_03.txt | AC | 1 ms | 3836 KiB |
| test_04.txt | AC | 1 ms | 3764 KiB |
| test_05.txt | AC | 1 ms | 3888 KiB |
| test_06.txt | AC | 1 ms | 3616 KiB |
| test_07.txt | AC | 1 ms | 3828 KiB |
| test_08.txt | AC | 1 ms | 3616 KiB |
| test_09.txt | AC | 1 ms | 3812 KiB |
| test_10.txt | AC | 1 ms | 3780 KiB |
| test_11.txt | AC | 1 ms | 3764 KiB |
| test_12.txt | AC | 1 ms | 3764 KiB |